Home
last modified time | relevance | path

Searched full:nh (Results 1 – 25 of 120) sorted by relevance

12345

/linux/include/net/
H A Dnexthop.h106 struct nexthop *nh; member
144 struct list_head fi_list; /* v4 entries using nh */
145 struct list_head f6i_list; /* v6 entries using nh */
146 struct list_head fdb_list; /* fdb entries using this nh */
147 struct list_head grp_list; /* nh group entries using this nh */
152 u8 protocol; /* app managing this nh */
198 struct nh_notifier_single_info nh;
239 struct nh_notifier_single_info *nh;
264 static inline bool nexthop_get(struct nexthop *nh) in nexthop_get()
196 struct nh_notifier_single_info nh; global() member
237 struct nh_notifier_single_info *nh; global() member
262 nexthop_get(struct nexthop * nh) nexthop_get() argument
267 nexthop_put(struct nexthop * nh) nexthop_put() argument
279 nexthop_is_fdb(const struct nexthop * nh) nexthop_is_fdb() argument
294 nexthop_has_v4(const struct nexthop * nh) nexthop_has_v4() argument
305 nexthop_is_multipath(const struct nexthop * nh) nexthop_is_multipath() argument
318 nexthop_num_path(const struct nexthop * nh) nexthop_num_path() argument
346 nexthop_mpath_fill_node(struct sk_buff * skb,struct nexthop * nh,u8 rt_family) nexthop_mpath_fill_node() argument
366 nexthop_is_blackhole(const struct nexthop * nh) nexthop_is_blackhole() argument
387 struct nexthop *nh; nexthop_path_fib_result() local
396 nexthop_fib_nhc(struct nexthop * nh,int nhsel) nexthop_fib_nhc() argument
420 nexthop_get_nhc_lookup(const struct nexthop * nh,int fib_flags,const struct flowi4 * flp,int * nhsel) nexthop_get_nhc_lookup() argument
451 nexthop_uses_dev(const struct nexthop * nh,const struct net_device * dev) nexthop_uses_dev() argument
510 nexthop_fib6_nh(struct nexthop * nh) nexthop_fib6_nh() argument
540 struct nexthop *nh = res->f6i->nh; nexthop_path_fib6_result() local
559 nexthop_get_family(struct nexthop * nh) nexthop_get_family() argument
567 nexthop_fdb_nhc(struct nexthop * nh) nexthop_fdb_nhc() argument
574 nexthop_path_fdb_result(struct nexthop * nh,int hash) nexthop_path_fdb_result() argument
[all...]
/linux/tools/testing/selftests/net/tcp_ao/lib/
H A Dnetlink.c60 static inline struct rtattr *rtattr_hdr(struct nlmsghdr *nh) in rtattr_hdr() argument
62 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr()
65 static int rtattr_pack(struct nlmsghdr *nh, size_t req_sz, in rtattr_pack() argument
69 struct rtattr *attr = rtattr_hdr(nh); in rtattr_pack()
70 size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size); in rtattr_pack()
76 nh->nlmsg_len = nl_size; in rtattr_pack()
85 static struct rtattr *_rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in _rtattr_begin() argument
88 struct rtattr *ret = rtattr_hdr(nh); in _rtattr_begin()
90 if (rtattr_pack(nh, req_sz, rta_type, payload, size)) in _rtattr_begin()
96 static inline struct rtattr *rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in rtattr_begin() argument
[all …]
/linux/kernel/
H A Dnotifier.c134 * @nh: Pointer to head of the atomic notifier chain
141 int atomic_notifier_chain_register(struct atomic_notifier_head *nh, in atomic_notifier_chain_register() argument
147 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register()
148 ret = notifier_chain_register(&nh->head, n, false); in atomic_notifier_chain_register()
149 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register()
156 * @nh: Pointer to head of the atomic notifier chain
164 int atomic_notifier_chain_register_unique_prio(struct atomic_notifier_head *nh, in atomic_notifier_chain_register_unique_prio() argument
170 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register_unique_prio()
171 ret = notifier_chain_register(&nh->head, n, true); in atomic_notifier_chain_register_unique_prio()
172 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register_unique_prio()
[all …]
/linux/net/ipv4/
H A Dfib_semantics.c59 int nhsel; const struct fib_nh *nh; \
60 for (nhsel = 0, nh = (fi)->fib_nh; \
62 nh++, nhsel++)
75 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \
226 if (fi->nh) { in free_fib_info_rcu()
227 nexthop_put(fi->nh); in free_fib_info_rcu()
259 if (fi->nh) { in fib_release_info()
278 if (fi->nh || ofi->nh) in nh_comp()
279 return nexthop_cmp(fi->nh, of in nh_comp()
480 struct fib_nh *nh; ip_fib_check_default() local
651 fib_nh_init(struct net * net,struct fib_nh * nh,struct fib_config * cfg,int nh_weight,struct netlink_ext_ack * extack) fib_nh_init() argument
726 struct fib_nh *nh; fib_get_nhs() local
886 fib_encap_match(struct net * net,u16 encap_type,struct nlattr * encap,const struct fib_nh * nh,const struct fib_config * cfg,struct netlink_ext_ack * extack) fib_encap_match() argument
930 struct fib_nh *nh; fib_nh_match() local
1080 fib_check_nh_v6_gw(struct net * net,struct fib_nh * nh,u32 table,struct netlink_ext_ack * extack) fib_check_nh_v6_gw() argument
1149 fib_check_nh_v4_gw(struct net * net,struct fib_nh * nh,u32 table,u8 scope,struct netlink_ext_ack * extack) fib_check_nh_v4_gw() argument
1243 fib_check_nh_nongw(struct net * net,struct fib_nh * nh,struct netlink_ext_ack * extack) fib_check_nh_nongw() argument
1278 fib_check_nh(struct net * net,struct fib_nh * nh,u32 table,u8 scope,struct netlink_ext_ack * extack) fib_check_nh() argument
1296 struct fib_nh *nh; fib_info_update_nhc_saddr() local
1319 struct fib_nh *nh; fib_result_prefsrc() local
1359 struct nexthop *nh = NULL; fib_create_info() local
1484 struct fib_nh *nh = fi->fib_nh; fib_create_info() local
1790 struct fib_nh *nh; fib_dump_info() local
1850 call_fib_nh_notifiers(struct fib_nh * nh,enum fib_event_type event_type) call_fib_nh_notifiers() argument
1920 struct fib_nh *nh; fib_sync_mtu() local
1941 struct fib_nh *nh; fib_sync_down_dev() local
2089 struct fib_nh *nh; fib_sync_up() local
2145 fib_good_nh(const struct fib_nh * nh) fib_good_nh() argument
[all...]
H A Dnexthop.c23 static void remove_nexthop(struct net *net, struct nexthop *nh,
114 const struct nexthop *nh) in nh_notifier_single_info_init() argument
116 struct nh_info *nhi = rtnl_dereference(nh->nh_info); in nh_notifier_single_info_init()
119 info->nh = kzalloc(sizeof(*info->nh), GFP_KERNEL); in nh_notifier_single_info_init()
120 if (!info->nh) in nh_notifier_single_info_init()
123 __nh_notifier_single_info_init(info->nh, nhi); in nh_notifier_single_info_init()
130 kfree(info->nh); in nh_notifier_single_info_fini()
153 nhi = rtnl_dereference(nhge->nh->nh_info); in nh_notifier_mpath_info_init()
155 __nh_notifier_single_info_init(&info->nh_grp->nh_entries[i].nh, in nh_notifier_mpath_info_init()
195 nh_notifier_grp_info_init(struct nh_notifier_info * info,const struct nexthop * nh) nh_notifier_grp_info_init() argument
207 nh_notifier_grp_info_fini(struct nh_notifier_info * info,const struct nexthop * nh) nh_notifier_grp_info_fini() argument
218 nh_notifier_info_init(struct nh_notifier_info * info,const struct nexthop * nh) nh_notifier_info_init() argument
229 nh_notifier_info_fini(struct nh_notifier_info * info,const struct nexthop * nh) nh_notifier_info_fini() argument
239 call_nexthop_notifiers(struct net * net,enum nexthop_event_type event_type,struct nexthop * nh,struct netlink_ext_ack * extack) call_nexthop_notifiers() argument
272 struct nexthop *nh; nh_notifier_res_bucket_idle_timer_get() local
404 call_nexthop_res_table_notifiers(struct net * net,struct nexthop * nh,struct netlink_ext_ack * extack) call_nexthop_res_table_notifiers() argument
441 call_nexthop_notifier(struct notifier_block * nb,struct net * net,enum nexthop_event_type event_type,struct nexthop * nh,struct netlink_ext_ack * extack) call_nexthop_notifier() argument
482 nexthop_free_group(struct nexthop * nh) nexthop_free_group() argument
505 nexthop_free_single(struct nexthop * nh) nexthop_free_single() argument
523 struct nexthop *nh = container_of(head, struct nexthop, rcu); nexthop_free_rcu() local
536 struct nexthop *nh; nexthop_alloc() local
596 struct nexthop *nh; nexthop_find_by_id() local
707 nh_notifier_grp_hw_stats_init(struct nh_notifier_info * info,const struct nexthop * nh) nh_notifier_grp_hw_stats_init() argument
747 nh_grp_hw_stats_apply_update(struct nexthop * nh,struct nh_notifier_info * info) nh_grp_hw_stats_apply_update() argument
763 nh_grp_hw_stats_update(struct nexthop * nh,bool * hw_stats_used) nh_grp_hw_stats_update() argument
825 nla_put_nh_group_stats(struct sk_buff * skb,struct nexthop * nh,u32 op_flags) nla_put_nh_group_stats() argument
867 nla_put_nh_group(struct sk_buff * skb,struct nexthop * nh,u32 op_flags,u32 * resp_op_flags) nla_put_nh_group() argument
917 nh_fill_node(struct sk_buff * skb,struct nexthop * nh,int event,u32 portid,u32 seq,unsigned int nlflags,u32 op_flags) nh_fill_node() argument
1010 nh_nlmsg_size_grp(struct nexthop * nh) nh_nlmsg_size_grp() argument
1023 nh_nlmsg_size_single(struct nexthop * nh) nh_nlmsg_size_single() argument
1054 nh_nlmsg_size(struct nexthop * nh) nh_nlmsg_size() argument
1070 nexthop_notify(int event,struct nexthop * nh,struct nl_info * info) nexthop_notify() argument
1142 nh_fill_res_bucket(struct sk_buff * skb,struct nexthop * nh,struct nh_res_bucket * bucket,u16 bucket_index,int event,u32 portid,u32 seq,unsigned int nlflags,struct netlink_ext_ack * extack) nh_fill_res_bucket() argument
1194 struct nexthop *nh = nhge->nh_parent; nexthop_bucket_notify() local
1216 valid_group_nh(struct nexthop * nh,unsigned int npaths,bool * is_fdb,struct netlink_ext_ack * extack) valid_group_nh() argument
1248 nh_check_attr_fdb_group(struct nexthop * nh,u8 * nh_family,struct netlink_ext_ack * extack) nh_check_attr_fdb_group() argument
1343 struct nexthop *nh; nh_check_attr_group_rtnl() local
1366 ipv6_good_nh(const struct fib6_nh * nh) ipv6_good_nh() argument
1382 ipv4_good_nh(const struct fib_nh * nh) ipv4_good_nh() argument
1399 nexthop_is_good_nh(const struct nexthop * nh) nexthop_is_good_nh() argument
1481 nexthop_select_path(struct nexthop * nh,int hash) nexthop_select_path() argument
1499 nexthop_for_each_fib6_nh(struct nexthop * nh,int (* cb)(struct fib6_nh * nh,void * arg),void * arg) nexthop_for_each_fib6_nh() argument
1500 nexthop_for_each_fib6_nh(struct nexthop * nh,int (* cb)(struct fib6_nh * nh,void * arg),void * arg) nexthop_for_each_fib6_nh() argument
1540 fib6_check_nexthop(struct nexthop * nh,struct fib6_config * cfg,struct netlink_ext_ack * extack) fib6_check_nexthop() argument
1621 fib_check_nexthop(struct nexthop * nh,u8 scope,struct netlink_ext_ack * extack) fib_check_nexthop() argument
2013 struct nexthop *nh = nhge->nh; remove_nh_grp_entry() local
2085 remove_nexthop_from_groups(struct net * net,struct nexthop * nh,struct nl_info * nlinfo) remove_nexthop_from_groups() argument
2097 remove_nexthop_group(struct nexthop * nh,struct nl_info * nlinfo) remove_nexthop_group() argument
2119 __remove_nexthop_fib(struct net * net,struct nexthop * nh) __remove_nexthop_fib() argument
2141 __remove_nexthop(struct net * net,struct nexthop * nh,struct nl_info * nlinfo) __remove_nexthop() argument
2159 remove_nexthop(struct net * net,struct nexthop * nh,struct nl_info * nlinfo) remove_nexthop() argument
2179 nh_rt_cache_flush(struct net * net,struct nexthop * nh,struct nexthop * replaced_nh) nh_rt_cache_flush() argument
2456 __nexthop_replace_notify(struct net * net,struct nexthop * nh,struct nl_info * info) __nexthop_replace_notify() argument
2485 nexthop_replace_notify(struct net * net,struct nexthop * nh,struct nl_info * info) nexthop_replace_notify() argument
2569 struct nexthop *nh; insert_nexthop() local
2675 struct nexthop *nh; flush_all_nexthops() local
2691 struct nexthop *nh; nexthop_create_group() local
2791 nh_create_ipv4(struct net * net,struct nexthop * nh,struct nh_info * nhi,struct nh_config * cfg,struct netlink_ext_ack * extack) nh_create_ipv4() argument
2830 nh_create_ipv6(struct net * net,struct nexthop * nh,struct nh_info * nhi,struct nh_config * cfg,struct netlink_ext_ack * extack) nh_create_ipv6() argument
2869 struct nexthop *nh; nexthop_create() local
2925 struct nexthop *nh; nexthop_add() local
3229 struct nexthop *nh; rtm_new_nexthop() local
3303 struct nexthop *nh; rtm_del_nexthop() local
3337 struct nexthop *nh; rtm_get_nexthop() local
3387 nh_dump_filtered(struct nexthop * nh,struct nh_dump_filter * filter,u8 family) nh_dump_filtered() argument
3496 rtm_dump_walk_nexthops(struct sk_buff * skb,struct netlink_callback * cb,struct rb_root * root,struct rtm_dump_nh_ctx * ctx,int (* nh_cb)(struct sk_buff * skb,struct netlink_callback * cb,struct nexthop * nh,void * data),void * data) rtm_dump_walk_nexthops() argument
3505 struct nexthop *nh; rtm_dump_walk_nexthops() local
3521 rtm_dump_nexthop_cb(struct sk_buff * skb,struct netlink_callback * cb,struct nexthop * nh,void * data) rtm_dump_nexthop_cb() argument
3560 struct nexthop *nh; nexthop_find_group_resilient() local
3638 struct rtm_dump_nh_ctx nh; global() member
3658 rtm_dump_nexthop_bucket_nh(struct sk_buff * skb,struct netlink_callback * cb,struct nexthop * nh,struct rtm_dump_nexthop_bucket_data * dd) rtm_dump_nexthop_bucket_nh() argument
3701 rtm_dump_nexthop_bucket_cb(struct sk_buff * skb,struct netlink_callback * cb,struct nexthop * nh,void * data) rtm_dump_nexthop_bucket_cb() argument
3723 struct nexthop *nh; rtm_dump_nexthop_bucket() local
3807 struct nexthop *nh; rtm_get_nexthop_bucket() local
3902 struct nexthop *nh; nexthops_dump() local
[all...]
/linux/tools/testing/selftests/net/
H A Dtap.c33 static struct rtattr *rtattr_add(struct nlmsghdr *nh, unsigned short type, in rtattr_add() argument
37 (struct rtattr *)((uint8_t *)nh + RTA_ALIGN(nh->nlmsg_len)); in rtattr_add()
40 nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len); in rtattr_add()
44 static struct rtattr *rtattr_begin(struct nlmsghdr *nh, unsigned short type) in rtattr_begin() argument
46 return rtattr_add(nh, type, 0); in rtattr_begin()
49 static void rtattr_end(struct nlmsghdr *nh, struct rtattr *attr) in rtattr_end() argument
51 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end()
56 static struct rtattr *rtattr_add_str(struct nlmsghdr *nh, unsigned short type, in rtattr_add_str() argument
59 struct rtattr *rta = rtattr_add(nh, type, strlen(s)); in rtattr_add_str()
65 static struct rtattr *rtattr_add_strsz(struct nlmsghdr *nh, unsigned short type, in rtattr_add_strsz() argument
[all …]
H A Dtun.c70 struct nlmsghdr nh; in tun_delete() member
84 req.nh.nlmsg_len = NLMSG_ALIGN(NLMSG_LENGTH(sizeof(req.ifm))); in tun_delete()
85 req.nh.nlmsg_flags = NLM_F_REQUEST; in tun_delete()
86 req.nh.nlmsg_type = RTM_DELLINK; in tun_delete()
90 rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len)); in tun_delete()
93 req.nh.nlmsg_len += rta->rta_len; in tun_delete()
96 ret = send(rtnl, &req, req.nh.nlmsg_len, 0); in tun_delete()
99 ret = (unsigned int)ret != req.nh.nlmsg_len; in tun_delete()
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dxfrm_info.c171 static struct rtattr *rtattr_add(struct nlmsghdr *nh, unsigned short type, in rtattr_add() argument
175 (struct rtattr *)((uint8_t *)nh + RTA_ALIGN(nh->nlmsg_len)); in rtattr_add()
178 nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len); in rtattr_add()
182 static struct rtattr *rtattr_add_str(struct nlmsghdr *nh, unsigned short type, in rtattr_add_str() argument
185 struct rtattr *rta = rtattr_add(nh, type, strlen(s)); in rtattr_add_str()
191 static struct rtattr *rtattr_begin(struct nlmsghdr *nh, unsigned short type) in rtattr_begin() argument
193 return rtattr_add(nh, type, 0); in rtattr_begin()
196 static void rtattr_end(struct nlmsghdr *nh, struct rtattr *attr) in rtattr_end() argument
198 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end()
206 struct nlmsghdr nh; in setup_xfrmi_external_dev() member
[all …]
/linux/net/openvswitch/
H A Dactions.c287 struct nshhdr *nh = (struct nshhdr *)buffer; in push_nsh() local
290 err = nsh_hdr_from_nlattr(a, nh, NSH_HDR_MAX_LEN); in push_nsh()
294 err = nsh_push(skb, nh); in push_nsh()
321 static void update_ip_l4_checksum(struct sk_buff *skb, struct iphdr *nh, in update_ip_l4_checksum() argument
326 if (nh->frag_off & htons(IP_OFFSET)) in update_ip_l4_checksum()
329 if (nh->protocol == IPPROTO_TCP) { in update_ip_l4_checksum()
333 } else if (nh->protocol == IPPROTO_UDP) { in update_ip_l4_checksum()
347 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, in set_ip_addr() argument
350 update_ip_l4_checksum(skb, nh, *addr, new_addr); in set_ip_addr()
351 csum_replace4(&nh->check, *addr, new_addr); in set_ip_addr()
[all …]
H A Dflow.c251 * @nh: ipv6 header
273 static void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, in get_ipv6_ext_hdrs() argument
276 u8 next_type = nh->nexthdr; in get_ipv6_ext_hdrs()
391 struct ipv6hdr *nh; in parse_ipv6hdr() local
394 err = check_header(skb, nh_ofs + sizeof(*nh)); in parse_ipv6hdr()
398 nh = ipv6_hdr(skb); in parse_ipv6hdr()
400 get_ipv6_ext_hdrs(skb, nh, &key->ipv6.exthdrs); in parse_ipv6hdr()
403 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
404 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
405 key->ipv6.label = *(__be32 *)nh in parse_ipv6hdr()
631 struct nshhdr *nh; parse_nsh() local
689 struct iphdr *nh; key_extract_l3l4() local
[all...]
/linux/tools/lib/bpf/
H A Dnetlink.c143 struct nlmsghdr *nh; in libbpf_netlink_recv() local
174 for (nh = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(nh, len); in libbpf_netlink_recv()
175 nh = NLMSG_NEXT(nh, len)) { in libbpf_netlink_recv()
176 if (nh->nlmsg_pid != nl_pid) { in libbpf_netlink_recv()
180 if (nh->nlmsg_seq != seq) { in libbpf_netlink_recv()
184 if (nh->nlmsg_flags & NLM_F_MULTI) in libbpf_netlink_recv()
186 switch (nh->nlmsg_type) { in libbpf_netlink_recv()
188 err = (struct nlmsgerr *)NLMSG_DATA(nh); in libbpf_netlink_recv()
249 parse_genl_family_id(struct nlmsghdr * nh,libbpf_dump_nlmsg_t fn,void * cookie) parse_genl_family_id() argument
405 parse_xdp_features(struct nlmsghdr * nh,libbpf_dump_nlmsg_t fn,void * cookie) parse_xdp_features() argument
681 get_tc_info(struct nlmsghdr * nh,libbpf_dump_nlmsg_t fn,void * cookie) get_tc_info() argument
[all...]
/linux/drivers/net/ethernet/mellanox/mlxsw/
H A Dspectrum_router.h143 struct mlxsw_sp_nexthop *nh);
144 bool mlxsw_sp_nexthop_is_forward(const struct mlxsw_sp_nexthop *nh);
145 unsigned char *mlxsw_sp_nexthop_ha(struct mlxsw_sp_nexthop *nh);
146 int mlxsw_sp_nexthop_indexes(struct mlxsw_sp_nexthop *nh, u32 *p_adj_index,
148 struct mlxsw_sp_rif *mlxsw_sp_nexthop_rif(struct mlxsw_sp_nexthop *nh);
149 bool mlxsw_sp_nexthop_group_has_ipip(struct mlxsw_sp_nexthop *nh);
150 #define mlxsw_sp_nexthop_for_each(nh, router) \ argument
151 for (nh = mlxsw_sp_nexthop_next(router, NULL); nh; \
152 nh = mlxsw_sp_nexthop_next(router, nh))
154 struct mlxsw_sp_nexthop *nh, u64 *p_counter);
[all …]
H A Dspectrum_router.c3090 u32 id; /* NH ID for members of a NH object group. */
3094 mlxsw_sp_nexthop_dev(const struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_dev() argument
3096 if (!nh->crif) in mlxsw_sp_nexthop_dev()
3098 return nh->crif->key.dev; in mlxsw_sp_nexthop_dev()
3199 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_sh_counter_get() argument
3201 struct mlxsw_sp_nexthop_group *nh_grp = nh->nhgi->nh_grp; in mlxsw_sp_nexthop_sh_counter_get()
3205 nhct = xa_load(&nh_grp->nhgi->nexthop_counters, nh->id); in mlxsw_sp_nexthop_sh_counter_get()
3215 err = xa_err(xa_store(&nh_grp->nhgi->nexthop_counters, nh->id, nhct, in mlxsw_sp_nexthop_sh_counter_get()
3228 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_sh_counter_put() argument
3230 struct mlxsw_sp_nexthop_group *nh_grp = nh->nhgi->nh_grp; in mlxsw_sp_nexthop_sh_counter_put()
[all …]
H A Dspectrum_dpipe.c911 struct mlxsw_sp_nexthop *nh; in mlxsw_sp_dpipe_table_adj_size() local
914 mlxsw_sp_nexthop_for_each(nh, mlxsw_sp->router) in mlxsw_sp_dpipe_table_adj_size()
915 if (mlxsw_sp_nexthop_is_forward(nh) && in mlxsw_sp_dpipe_table_adj_size()
916 !mlxsw_sp_nexthop_group_has_ipip(nh)) in mlxsw_sp_dpipe_table_adj_size()
1065 struct mlxsw_sp_nexthop *nh, in mlxsw_sp_dpipe_table_adj_entry_fill() argument
1068 struct mlxsw_sp_rif *rif = mlxsw_sp_nexthop_rif(nh); in mlxsw_sp_dpipe_table_adj_entry_fill()
1069 unsigned char *ha = mlxsw_sp_nexthop_ha(nh); in mlxsw_sp_dpipe_table_adj_entry_fill()
1075 mlxsw_sp_nexthop_indexes(nh, &adj_index, &adj_size, &adj_hash_index); in mlxsw_sp_dpipe_table_adj_entry_fill()
1078 err = mlxsw_sp_nexthop_counter_get(mlxsw_sp, nh, &entry->counter); in mlxsw_sp_dpipe_table_adj_entry_fill()
1089 struct mlxsw_sp_nexthop *nh; in mlxsw_sp_dpipe_table_adj_entries_get() local
[all …]
/linux/arch/alpha/boot/
H A DMakefile13 vmlinux.nh tools/lxboot tools/bootlx tools/bootph \
21 $(obj)/bootimage: $(addprefix $(obj)/tools/,mkbb lxboot bootlx) $(obj)/vmlinux.nh
22 ( cat $(obj)/tools/lxboot $(obj)/tools/bootlx $(obj)/vmlinux.nh ) > $@
27 $(obj)/bootpfile: $(obj)/tools/bootph $(obj)/vmlinux.nh
28 cat $(obj)/tools/bootph $(obj)/vmlinux.nh > $@
35 $(obj)/bootpzfile: $(obj)/tools/bootpzh $(obj)/vmlinux.nh.gz
36 cat $(obj)/tools/bootpzh $(obj)/vmlinux.nh.gz > $@
50 $(obj)/ksize.h: $(obj)/vmlinux.nh FORCE
51 echo "#define KERNEL_SIZE `ls -l $(obj)/vmlinux.nh | awk '{print $$5}'`" > $@T
59 $(obj)/kzsize.h: $(obj)/vmlinux.nh.gz FORCE
[all …]
/linux/tools/testing/selftests/net/mptcp/
H A Dpm_nl_ctl.c47 struct nlmsghdr *nh = (void *)data; in init_genl_req() local
51 nh->nlmsg_type = family; in init_genl_req()
52 nh->nlmsg_flags = NLM_F_REQUEST; in init_genl_req()
53 nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in init_genl_req()
54 off += NLMSG_ALIGN(sizeof(*nh)); in init_genl_req()
63 static int nl_error(struct nlmsghdr *nh) in nl_error() argument
65 struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nh); in nl_error()
66 int len = nh->nlmsg_len - sizeof(*nh); in nl_error()
77 struct rtattr *attrs = (struct rtattr *)NLMSG_DATA(nh); in nl_error()
105 struct nlmsghdr *nh; in capture_events() local
[all …]
/linux/include/linux/
H A Dnotifier.h94 extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
146 extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
148 extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
150 extern int raw_notifier_chain_register(struct raw_notifier_head *nh,
152 extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
156 struct atomic_notifier_head *nh, struct notifier_block *nb);
158 struct blocking_notifier_head *nh, struct notifier_block *nb);
160 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
162 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
164 extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh,
[all …]
/linux/net/mpls/
H A Daf_mpls.c96 static u8 *__mpls_nh_via(struct mpls_route *rt, struct mpls_nh *nh) in __mpls_nh_via() argument
98 return (u8 *)nh + rt->rt_via_offset; in __mpls_nh_via()
102 const struct mpls_nh *nh) in mpls_nh_via() argument
104 return __mpls_nh_via((struct mpls_route *)rt, (struct mpls_nh *)nh); in mpls_nh_via()
107 static unsigned int mpls_nh_header_size(const struct mpls_nh *nh) in mpls_nh_header_size() argument
110 return nh->nh_labels * sizeof(struct mpls_shim_hdr); in mpls_nh_header_size()
230 * a next hop (nh->nh_flags) are modified by netdev event handlers.
257 unsigned int nh_flags = READ_ONCE(nh->nh_flags); in mpls_select_multipath()
262 return nh; in mpls_select_multipath()
347 const struct mpls_nh *nh; in mpls_forward() local
[all …]
/linux/net/ipv6/
H A Droute.c107 static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif,
447 if (!match->nh && (!match->fib6_nsiblings || have_oif_match)) in fib6_select_path()
450 if (match->nh && have_oif_match && res->nh) in fib6_select_path()
460 (!match->nh || nexthop_is_multipath(match->nh))) in fib6_select_path()
463 if (unlikely(match->nh)) { in fib6_select_path()
482 const struct fib6_nh *nh = sibling->fib6_nh; in fib6_select_path() local
485 nh_upper_bound = atomic_read(&nh->fib_nh_upper_bound); in fib6_select_path()
488 if (rt6_score_route(nh, sibling->fib6_flags, oif, strict) < 0) in fib6_select_path()
496 res->nh = match->fib6_nh; in fib6_select_path()
503 static bool __rt6_device_match(struct net *net, const struct fib6_nh *nh, in __rt6_device_match() argument
[all …]
/linux/samples/bpf/
H A Dxdp_router_ipv4_user.c63 struct nlmsghdr *nh; in recv_msg() local
73 nh = (struct nlmsghdr *)buf_ptr; in recv_msg()
75 if (nh->nlmsg_type == NLMSG_DONE) in recv_msg()
91 static void read_route(struct nlmsghdr *nh, int nll) in read_route() argument
117 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_route()
118 rt_msg = (struct rtmsg *)NLMSG_DATA(nh); in read_route()
124 rtl = RTM_PAYLOAD(nh); in read_route()
175 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
205 if (nh->nlmsg_type == RTM_DELROUTE) { in read_route()
254 struct nlmsghdr *nh; in get_route_table() local
[all …]
/linux/net/nsh/
H A Dnsh.c17 struct nshhdr *nh; in nsh_push() local
34 nh = (struct nshhdr *)(skb->data); in nsh_push()
35 memcpy(nh, pushed_nh, length); in nsh_push()
36 nh->np = next_proto; in nsh_push()
37 skb_postpush_rcsum(skb, nh, length); in nsh_push()
50 struct nshhdr *nh; in nsh_pop() local
56 nh = (struct nshhdr *)(skb->data); in nsh_pop()
57 length = nsh_hdr_len(nh); in nsh_pop()
60 inner_proto = tun_p_to_eth_p(nh->np); in nsh_pop()
/linux/arch/arm/vfp/
H A Dvfp.h44 static inline void add128(u64 *resh, u64 *resl, u64 nh, u64 nl, u64 mh, u64 ml) in add128() argument
50 : "=r" (nl), "=r" (nh) in add128()
51 : "0" (nl), "1" (nh), "r" (ml), "r" (mh) in add128()
53 *resh = nh; in add128()
57 static inline void sub128(u64 *resh, u64 *resl, u64 nh, u64 nl, u64 mh, u64 ml) in sub128() argument
63 : "=r" (nl), "=r" (nh) in sub128()
64 : "0" (nl), "1" (nh), "r" (ml), "r" (mh) in sub128()
66 *resh = nh; in sub128()
72 u32 nh, nl, mh, ml; in mul64to128() local
79 nh = n >> 32; in mul64to128()
[all …]
/linux/Documentation/devicetree/bindings/sound/
H A Dcs35l34.txt18 in nH and they can be values of 1000nH, 1100nH, 1200nH, 1500nH, and 2200nH.
/linux/net/netfilter/
H A Dutils.c186 unsigned char *nh; in nf_ip6_check_hbh_len() local
190 nh = (unsigned char *)(ipv6_hdr(skb) + 1); in nf_ip6_check_hbh_len()
191 len = (nh[1] + 1) << 3; in nf_ip6_check_hbh_len()
195 nh = skb_network_header(skb); in nf_ip6_check_hbh_len()
202 if (nh[off] == IPV6_TLV_PAD1) { in nf_ip6_check_hbh_len()
209 optlen = nh[off + 1] + 2; in nf_ip6_check_hbh_len()
213 if (nh[off] == IPV6_TLV_JUMBO) { in nf_ip6_check_hbh_len()
216 if (nh[off + 1] != 4 || (off & 3) != 2) in nf_ip6_check_hbh_len()
218 pkt_len = ntohl(*(__be32 *)(nh + off + 2)); in nf_ip6_check_hbh_len()
/linux/tools/testing/selftests/bpf/
H A Dxsk.c87 struct nlmsghdr nh; member
338 struct nlmsghdr *nh; in netlink_recv() local
368 for (nh = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(nh, len); in netlink_recv()
369 nh = NLMSG_NEXT(nh, len)) { in netlink_recv()
370 if (nh->nlmsg_flags & NLM_F_MULTI) in netlink_recv()
372 switch (nh->nlmsg_type) { in netlink_recv()
374 err = (struct nlmsgerr *)NLMSG_DATA(nh); in netlink_recv()
404 req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)); in xsk_set_mtu()
405 req.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK; in xsk_set_mtu()
406 req.nh.nlmsg_type = RTM_NEWLINK; in xsk_set_mtu()
[all …]

12345