Home
last modified time | relevance | path

Searched refs:nh (Results 1 – 25 of 72) sorted by relevance

123

/linux/kernel/
H A Dnotifier.c141 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()
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()
186 int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, in atomic_notifier_chain_unregister() argument
192 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_unregister()
[all …]
/linux/include/net/
H A Dnexthop.h108 struct nexthop *nh; member
200 struct nh_notifier_single_info nh; member
241 struct nh_notifier_single_info *nh; member
266 static inline bool nexthop_get(struct nexthop *nh) in nexthop_get() argument
268 return refcount_inc_not_zero(&nh->refcnt); in nexthop_get()
271 static inline void nexthop_put(struct nexthop *nh) in nexthop_put() argument
273 if (refcount_dec_and_test(&nh->refcnt)) in nexthop_put()
274 call_rcu_hurry(&nh->rcu, nexthop_free_rcu); in nexthop_put()
283 static inline bool nexthop_is_fdb(const struct nexthop *nh) in nexthop_is_fdb() argument
285 if (nh->is_group) { in nexthop_is_fdb()
[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/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; \
225 if (fi->nh) { in free_fib_info_rcu()
226 nexthop_put(fi->nh); in free_fib_info_rcu()
258 if (fi->nh) { in fib_release_info()
277 if (fi->nh || ofi->nh) in nh_comp()
278 return nexthop_cmp(fi->nh, of in nh_comp()
478 struct fib_nh *nh; ip_fib_check_default() local
552 struct fib_nh *nh; fib_nlmsg_size() local
673 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
748 struct fib_nh *nh; fib_get_nhs() local
908 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
952 struct fib_nh *nh; fib_nh_match() local
1102 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
1171 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
1265 fib_check_nh_nongw(struct net * net,struct fib_nh * nh,struct netlink_ext_ack * extack) fib_check_nh_nongw() argument
1300 fib_check_nh(struct net * net,struct fib_nh * nh,u32 table,u8 scope,struct netlink_ext_ack * extack) fib_check_nh() argument
1318 struct fib_nh *nh; fib_info_update_nhc_saddr() local
1341 struct fib_nh *nh; fib_result_prefsrc() local
1381 struct nexthop *nh = NULL; fib_create_info() local
1506 struct fib_nh *nh = fi->fib_nh; fib_create_info() local
1809 struct fib_nh *nh; fib_dump_info() local
1869 call_fib_nh_notifiers(struct fib_nh * nh,enum fib_event_type event_type) call_fib_nh_notifiers() argument
1927 struct fib_nh *nh; fib_sync_mtu() local
1948 struct fib_nh *nh; fib_sync_down_dev() local
2096 struct fib_nh *nh; fib_sync_up() local
2152 fib_good_nh(const struct fib_nh * nh) fib_good_nh() argument
2180 fib_nh_saddr(struct net * net,const struct fib_info * fi,struct fib_nh * nh,int genid) fib_nh_saddr() argument
[all...]
H A Dnexthop.c23 static bool __must_check remove_nexthop(struct net *net, struct nexthop *nh,
115 const struct nexthop *nh) in nh_notifier_single_info_init() argument
117 struct nh_info *nhi = rtnl_dereference(nh->nh_info); in nh_notifier_single_info_init()
120 info->nh = kzalloc_obj(*info->nh); in nh_notifier_single_info_init()
121 if (!info->nh) in nh_notifier_single_info_init()
124 __nh_notifier_single_info_init(info->nh, nhi); in nh_notifier_single_info_init()
131 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()
186 nhi = rtnl_dereference(nhge->nh->nh_info); in nh_notifier_res_table_info_init()
[all …]
/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/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
62 rta = rtattr_add(nh, type, strsz); in rtattr_add_str()
68 static struct rtattr *rtattr_add_any(struct nlmsghdr *nh, unsigned short type, in rtattr_add_any() argument
[all …]
H A Dipsec.c211 static inline struct rtattr *rtattr_hdr(struct nlmsghdr *nh) in rtattr_hdr()
213 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr()
216 static int rtattr_pack(struct nlmsghdr *nh, size_t req_sz, in rtattr_pack()
220 struct rtattr *attr = rtattr_hdr(nh); in rtattr_pack()
221 size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size); in rtattr_pack()
227 nh->nlmsg_len = nl_size; in rtattr_pack()
237 static struct rtattr *_rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in _rtattr_begin()
240 struct rtattr *ret = rtattr_hdr(nh); in _rtattr_begin()
242 if (rtattr_pack(nh, req_s in _rtattr_begin()
210 rtattr_hdr(struct nlmsghdr * nh) rtattr_hdr() argument
215 rtattr_pack(struct nlmsghdr * nh,size_t req_sz,unsigned short rta_type,const void * payload,size_t size) rtattr_pack() argument
236 _rtattr_begin(struct nlmsghdr * nh,size_t req_sz,unsigned short rta_type,const void * payload,size_t size) _rtattr_begin() argument
247 rtattr_begin(struct nlmsghdr * nh,size_t req_sz,unsigned short rta_type) rtattr_begin() argument
253 rtattr_end(struct nlmsghdr * nh,struct rtattr * attr) rtattr_end() argument
260 veth_pack_peerb(struct nlmsghdr * nh,size_t req_sz,const char * peer,int ns) veth_pack_peerb() argument
313 struct nlmsghdr nh; veth_add() member
363 struct nlmsghdr nh; ip4_addr_set() member
403 struct nlmsghdr nh; link_set_up() member
430 struct nlmsghdr nh; ip4_route_set() member
827 xfrm_state_pack_algo(struct nlmsghdr * nh,size_t req_sz,struct xfrm_desc * desc) xfrm_state_pack_algo() argument
920 struct nlmsghdr nh; xfrm_state_add() member
1009 struct nlmsghdr nh; xfrm_state_check() member
1013 struct nlmsghdr nh; xfrm_state_check() member
1102 struct nlmsghdr nh; xfrm_policy_add() member
1177 struct nlmsghdr nh; xfrm_policy_del() member
1227 struct nlmsghdr nh; xfrm_state_del() member
1278 struct nlmsghdr nh; xfrm_state_allocspi() member
1282 struct nlmsghdr nh; xfrm_state_allocspi() member
1368 struct nlmsghdr nh; xfrm_monitor_acquire() member
1439 struct nlmsghdr nh; xfrm_expire_state() member
1511 struct nlmsghdr nh; xfrm_expire_policy() member
1592 struct nlmsghdr nh; xfrm_spdinfo_set_thresh() member
1649 struct nlmsghdr nh; xfrm_spdinfo_attrs() member
[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/tools/testing/selftests/net/mptcp/
H A Dpm_nl_ctl.c50 struct nlmsghdr *nh = (void *)data; in init_genl_req() local
54 nh->nlmsg_type = family; in init_genl_req()
55 nh->nlmsg_flags = NLM_F_REQUEST; in init_genl_req()
56 nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in init_genl_req()
57 off += NLMSG_ALIGN(sizeof(*nh)); in init_genl_req()
66 static int nl_error(struct nlmsghdr *nh) in nl_error() argument
68 struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nh); in nl_error()
69 int len = nh->nlmsg_len - sizeof(*nh); in nl_error()
80 struct rtattr *attrs = (struct rtattr *)NLMSG_DATA(nh); in nl_error()
108 struct nlmsghdr *nh; capture_events() local
218 do_nl_req(int fd,struct nlmsghdr * nh,int len,int max) do_nl_req() argument
329 struct nlmsghdr *nh; resolve_mptcp_pm_netlink() local
356 struct nlmsghdr *nh; dsf() local
468 struct nlmsghdr *nh; csf() local
600 struct nlmsghdr *nh; remove_addr() local
653 struct nlmsghdr *nh; announce_addr() local
777 struct nlmsghdr *nh; add_addr() local
912 struct nlmsghdr *nh; del_addr() local
1084 print_addrs(struct nlmsghdr * nh,int pm_family,int total_len) print_addrs() argument
1117 struct nlmsghdr *nh; get_addr() local
1169 struct nlmsghdr *nh; dump_addrs() local
1207 struct nlmsghdr *nh; flush_addrs() local
1219 print_limits(struct nlmsghdr * nh,int pm_family,int total_len) print_limits() argument
1261 struct nlmsghdr *nh; get_set_limits() local
1356 struct nlmsghdr *nh; set_flags() 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()
192 libbpf_nla_dump_errormsg(nh); in libbpf_netlink_recv()
201 ret = _fn(nh, fn, cookie); in libbpf_netlink_recv()
[all …]
H A Dnlattr.h58 struct nlmsghdr nh; member
138 return (struct nlattr *)((void *)req + NLMSG_ALIGN(req->nh.nlmsg_len)); in req_tail()
146 if (NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(NLA_HDRLEN + len) > sizeof(*req)) in nlattr_add()
156 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add()
/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_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/net/mpls/
H A Daf_mpls.c118 static u8 *__mpls_nh_via(struct mpls_route *rt, struct mpls_nh *nh) in __mpls_nh_via() argument
120 return (u8 *)nh + rt->rt_via_offset; in __mpls_nh_via()
124 const struct mpls_nh *nh) in mpls_nh_via() argument
126 return __mpls_nh_via((struct mpls_route *)rt, (struct mpls_nh *)nh); in mpls_nh_via()
129 static unsigned int mpls_nh_header_size(const struct mpls_nh *nh) in mpls_nh_header_size() argument
132 return nh->nh_labels * sizeof(struct mpls_shim_hdr); in mpls_nh_header_size()
282 unsigned int nh_flags = READ_ONCE(nh->nh_flags); in mpls_select_multipath()
287 return nh; in mpls_select_multipath()
372 const struct mpls_nh *nh; in mpls_forward() local
418 nh = mpls_select_multipath(rt, skb); in mpls_forward()
[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
59 $(obj)/kzsize.h: $(obj)/vmlinux.nh.gz FORCE
78 OSFLAGS_vmlinux.nh := -v
[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
488 nh_upper_bound = atomic_read(&nh->fib_nh_upper_bound); in fib6_select_path()
491 if (rt6_score_route(nh, siblin in fib6_select_path()
506 __rt6_device_match(struct net * net,const struct fib6_nh * nh,const struct in6_addr * saddr,int oif,int flags) __rt6_device_match() argument
532 struct fib6_nh *nh; global() member
535 __rt6_nh_dev_match(struct fib6_nh * nh,void * _arg) __rt6_nh_dev_match() argument
545 rt6_nh_dev_match(struct net * net,struct nexthop * nh,struct fib6_result * res,const struct in6_addr * saddr,int oif,int flags) rt6_nh_dev_match() argument
571 struct fib6_nh *nh; rt6_device_match() local
752 rt6_score_route(const struct fib6_nh * nh,u32 fib6_flags,int oif,int strict) rt6_score_route() argument
774 find_match(struct fib6_nh * nh,u32 fib6_flags,int oif,int strict,int * mpri,bool * do_rr) find_match() argument
816 struct fib6_nh *nh; global() member
819 rt6_nh_find_match(struct fib6_nh * nh,void * _arg) rt6_nh_find_match() argument
841 struct fib6_nh *nh; __find_rr_leaf() local
1177 const struct fib6_nh *nh = res->nh; ip6_rt_copy_init() local
1642 const struct fib6_nh *nh = res->nh; fib6_mtu() local
1674 fib6_nh_get_excptn_bucket(const struct fib6_nh * nh,spinlock_t * lock) fib6_nh_get_excptn_bucket() argument
1704 fib6_nh_excptn_bucket_set_flushed(struct fib6_nh * nh,spinlock_t * lock) fib6_nh_excptn_bucket_set_flushed() argument
1727 struct fib6_nh *nh = res->nh; rt6_insert_exception() local
1808 fib6_nh_flush_exceptions(struct fib6_nh * nh,struct fib6_info * from) fib6_nh_flush_exceptions() argument
1838 rt6_nh_flush_exceptions(struct fib6_nh * nh,void * arg) rt6_nh_flush_exceptions() argument
1904 fib6_nh_remove_exception(const struct fib6_nh * nh,int plen,const struct rt6_info * rt) fib6_nh_remove_exception() argument
1947 rt6_nh_remove_exception_rt(struct fib6_nh * nh,void * _arg) rt6_nh_remove_exception_rt() argument
1988 fib6_nh_update_exception(const struct fib6_nh * nh,int plen,const struct rt6_info * rt) fib6_nh_update_exception() argument
2018 fib6_nh_find_match(struct fib6_nh * nh,void * _arg) fib6_nh_find_match() argument
2089 rt6_exceptions_update_pmtu(struct inet6_dev * idev,const struct fib6_nh * nh,int mtu) rt6_exceptions_update_pmtu() argument
2117 fib6_nh_exceptions_clean_tohost(const struct fib6_nh * nh,const struct in6_addr * gateway) fib6_nh_exceptions_clean_tohost() argument
2192 fib6_nh_age_exceptions(const struct fib6_nh * nh,struct fib6_gc_args * gc_args,unsigned long now) fib6_nh_age_exceptions() argument
2226 rt6_nh_age_exceptions(struct fib6_nh * nh,void * _arg) rt6_nh_age_exceptions() argument
3079 const struct fib6_nh *nh = res->nh; ip6_redirect_nh_match() local
3111 fib6_nh_redirect_match(struct fib6_nh * nh,void * _arg) fib6_nh_redirect_match() argument
3312 const struct fib6_nh *nh = res->nh; ip6_mtu_from_fib6() local
3892 struct nexthop *nh; ip6_route_info_create_nh() local
4122 ip6_del_cached_rt(struct fib6_config * cfg,struct fib6_info * rt,struct fib6_nh * nh) ip6_del_cached_rt() argument
4142 fib6_nh_del_cached_rt(struct fib6_nh * nh,void * _arg) fib6_nh_del_cached_rt() argument
4184 struct fib6_nh *nh; ip6_route_del() local
4481 struct fib6_nh *nh; rt6_get_dflt_router() local
4780 struct fib6_nh *nh; fib6_clean_tohost() local
5065 fib6_nh_mtu_change(struct fib6_nh * nh,void * _arg) fib6_nh_mtu_change() argument
5365 struct rt6_nh *nh; ip6_route_info_append() local
5441 struct rt6_nh *nh, *nh_safe; ip6_route_multipath_add() local
5702 rt6_nh_nlmsg_size(struct fib6_nh * nh,void * arg) rt6_nh_nlmsg_size() argument
5723 struct fib6_nh *nh; rt6_nlmsg_size() local
5767 rt6_fill_node_nexthop(struct sk_buff * skb,struct nexthop * nh,unsigned char * flags) rt6_fill_node_nexthop() argument
5995 fib6_info_nh_uses_dev(struct fib6_nh * nh,void * arg) fib6_info_nh_uses_dev() argument
6045 rt6_nh_dump_exceptions(struct fib6_nh * nh,void * arg) rt6_nh_dump_exceptions() argument
[all...]
H A Dexthdrs.c119 const unsigned char *nh = skb_network_header(skb); in ip6_parse_tlv() local
136 if (nh[off] == IPV6_TLV_PAD1) { in ip6_parse_tlv()
146 optlen = nh[off + 1] + 2; in ip6_parse_tlv()
150 if (nh[off] == IPV6_TLV_PADN) { in ip6_parse_tlv()
164 if (nh[off + i] != 0) in ip6_parse_tlv()
173 switch (nh[off]) { in ip6_parse_tlv()
197 switch (nh[off]) { in ip6_parse_tlv()
214 nh = skb_network_header(skb); in ip6_parse_tlv()
895 const unsigned char *nh = skb_network_header(skb); in ipv6_hop_ra() local
897 if (nh[optoff + 1] == 2) { in ipv6_hop_ra()
[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/openvswitch/
H A Dactions.c288 struct nshhdr *nh = (struct nshhdr *)buffer; in push_nsh() local
291 err = nsh_hdr_from_nlattr(a, nh, NSH_HDR_MAX_LEN); in push_nsh()
295 err = nsh_push(skb, nh); in push_nsh()
322 static void update_ip_l4_checksum(struct sk_buff *skb, struct iphdr *nh, in update_ip_l4_checksum() argument
327 if (nh->frag_off & htons(IP_OFFSET)) in update_ip_l4_checksum()
330 if (nh->protocol == IPPROTO_TCP) { in update_ip_l4_checksum()
334 } else if (nh->protocol == IPPROTO_UDP) { in update_ip_l4_checksum()
348 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, in set_ip_addr() argument
351 update_ip_l4_checksum(skb, nh, *addr, new_addr); in set_ip_addr()
352 csum_replace4(&nh in set_ip_addr()
406 set_ipv6_dsfield(struct sk_buff * skb,struct ipv6hdr * nh,u8 ipv6_tclass,u8 mask) set_ipv6_dsfield() argument
419 set_ipv6_fl(struct sk_buff * skb,struct ipv6hdr * nh,u32 fl,u32 mask) set_ipv6_fl() argument
435 set_ipv6_ttl(struct sk_buff * skb,struct ipv6hdr * nh,u8 new_ttl,u8 mask) set_ipv6_ttl() argument
445 set_ip_ttl(struct sk_buff * skb,struct iphdr * nh,u8 new_ttl,u8 mask) set_ip_ttl() argument
458 struct iphdr *nh; set_ipv4() local
510 struct ipv6hdr *nh; set_ipv6() local
1182 struct ipv6hdr *nh; execute_dec_ttl() local
1196 struct iphdr *nh; execute_dec_ttl() local
[all...]
H A Dflow.c269 static void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, in get_ipv6_ext_hdrs() argument
272 u8 next_type = nh->nexthdr; in get_ipv6_ext_hdrs()
387 struct ipv6hdr *nh; in parse_ipv6hdr() local
390 err = check_header(skb, nh_ofs + sizeof(*nh)); in parse_ipv6hdr()
394 nh = ipv6_hdr(skb); in parse_ipv6hdr()
396 get_ipv6_ext_hdrs(skb, nh, &key->ipv6.exthdrs); in parse_ipv6hdr()
399 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr()
400 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr()
401 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr()
402 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr()
[all …]
/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/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/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 …]
/linux/scripts/dtc/libfdt/
H A Dfdt_sw.c221 struct fdt_node_header *nh; in fdt_begin_node() local
227 nh = fdt_grab_space_(fdt, sizeof(*nh) + FDT_TAGALIGN(namelen)); in fdt_begin_node()
228 if (! nh) in fdt_begin_node()
231 nh->tag = cpu_to_fdt32(FDT_BEGIN_NODE); in fdt_begin_node()
232 memcpy(nh->name, name, namelen); in fdt_begin_node()

123