/kernel/linux/linux-5.10/include/net/ |
D | nexthop.h | 67 struct nexthop *nh; member 118 static inline bool nexthop_get(struct nexthop *nh) in nexthop_get() argument 120 return refcount_inc_not_zero(&nh->refcnt); in nexthop_get() 123 static inline void nexthop_put(struct nexthop *nh) in nexthop_put() argument 125 if (refcount_dec_and_test(&nh->refcnt)) in nexthop_put() 126 call_rcu(&nh->rcu, nexthop_free_rcu); in nexthop_put() 135 static inline bool nexthop_is_fdb(const struct nexthop *nh) in nexthop_is_fdb() argument 137 if (nh->is_group) { in nexthop_is_fdb() 140 nh_grp = rcu_dereference_rtnl(nh->nh_grp); in nexthop_is_fdb() 145 nhi = rcu_dereference_rtnl(nh->nh_info); in nexthop_is_fdb() [all …]
|
/kernel/linux/linux-5.10/kernel/ |
D | notifier.c | 139 int atomic_notifier_chain_register(struct atomic_notifier_head *nh, in atomic_notifier_chain_register() argument 145 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register() 146 ret = notifier_chain_register(&nh->head, n); in atomic_notifier_chain_register() 147 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register() 161 int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, in atomic_notifier_chain_unregister() argument 167 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_unregister() 168 ret = notifier_chain_unregister(&nh->head, n); in atomic_notifier_chain_unregister() 169 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_unregister() 175 int atomic_notifier_call_chain_robust(struct atomic_notifier_head *nh, in atomic_notifier_call_chain_robust() argument 185 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_call_chain_robust() [all …]
|
/kernel/linux/linux-5.10/net/ipv4/ |
D | nexthop.c | 19 static void remove_nexthop(struct net *net, struct nexthop *nh, 41 struct nexthop *nh) in call_nexthop_notifiers() argument 46 event_type, nh); in call_nexthop_notifiers() 72 static void nexthop_free_mpath(struct nexthop *nh) in nexthop_free_mpath() argument 77 nhg = rcu_dereference_raw(nh->nh_grp); in nexthop_free_mpath() 82 nexthop_put(nhge->nh); in nexthop_free_mpath() 91 static void nexthop_free_single(struct nexthop *nh) in nexthop_free_single() argument 95 nhi = rcu_dereference_raw(nh->nh_info); in nexthop_free_single() 98 fib_nh_release(nh->net, &nhi->fib_nh); in nexthop_free_single() 109 struct nexthop *nh = container_of(head, struct nexthop, rcu); in nexthop_free_rcu() local [all …]
|
D | fib_semantics.c | 67 int nhsel; const struct fib_nh *nh; \ 68 for (nhsel = 0, nh = (fi)->fib_nh; \ 70 nh++, nhsel++) 83 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \ 236 if (fi->nh) { in free_fib_info_rcu() 237 nexthop_put(fi->nh); in free_fib_info_rcu() 271 if (fi->nh) { in fib_release_info() 290 if (fi->nh || ofi->nh) in nh_comp() 291 return nexthop_cmp(fi->nh, ofi->nh) ? 0 : -1; in nh_comp() 299 if (nh->fib_nh_oif != onh->fib_nh_oif || in nh_comp() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/mptcp/ |
D | pm_nl_ctl.c | 39 struct nlmsghdr *nh = (void *)data; in init_genl_req() local 43 nh->nlmsg_type = family; in init_genl_req() 44 nh->nlmsg_flags = NLM_F_REQUEST; in init_genl_req() 45 nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in init_genl_req() 46 off += NLMSG_ALIGN(sizeof(*nh)); in init_genl_req() 55 static void nl_error(struct nlmsghdr *nh) in nl_error() argument 57 struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nh); in nl_error() 58 int len = nh->nlmsg_len - sizeof(*nh); in nl_error() 67 struct rtattr *attrs = (struct rtattr *)NLMSG_DATA(nh); in nl_error() 86 static int do_nl_req(int fd, struct nlmsghdr *nh, int len, int max) in do_nl_req() argument [all …]
|
/kernel/linux/linux-5.10/net/decnet/ |
D | dn_fib.c | 53 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\ 54 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 56 #define change_nexthops(fi) { int nhsel; struct dn_fib_nh *nh;\ 57 for(nhsel = 0, nh = (struct dn_fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++) 95 if (nh->nh_dev) in dn_fib_free_info() 96 dev_put(nh->nh_dev); in dn_fib_free_info() 97 nh->nh_dev = NULL; in dn_fib_free_info() 123 if (nh->nh_oif != onh->nh_oif || in dn_fib_nh_comp() 124 nh->nh_gw != onh->nh_gw || in dn_fib_nh_comp() 125 nh->nh_scope != onh->nh_scope || in dn_fib_nh_comp() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
D | ipsec.c | 172 static inline struct rtattr *rtattr_hdr(struct nlmsghdr *nh) in rtattr_hdr() argument 174 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr() 177 static int rtattr_pack(struct nlmsghdr *nh, size_t req_sz, in rtattr_pack() argument 181 struct rtattr *attr = rtattr_hdr(nh); in rtattr_pack() 182 size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size); in rtattr_pack() 188 nh->nlmsg_len = nl_size; in rtattr_pack() 197 static struct rtattr *_rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in _rtattr_begin() argument 200 struct rtattr *ret = rtattr_hdr(nh); in _rtattr_begin() 202 if (rtattr_pack(nh, req_sz, rta_type, payload, size)) in _rtattr_begin() 208 static inline struct rtattr *rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in rtattr_begin() argument [all …]
|
/kernel/linux/linux-5.10/include/linux/ |
D | notifier.h | 93 extern void srcu_init_notifier_head(struct srcu_notifier_head *nh); 144 extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh, 146 extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh, 148 extern int raw_notifier_chain_register(struct raw_notifier_head *nh, 150 extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh, 153 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, 155 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, 157 extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, 159 extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, 162 extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh, [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_router.h | 125 struct mlxsw_sp_nexthop *nh); 126 bool mlxsw_sp_nexthop_offload(struct mlxsw_sp_nexthop *nh); 127 unsigned char *mlxsw_sp_nexthop_ha(struct mlxsw_sp_nexthop *nh); 128 int mlxsw_sp_nexthop_indexes(struct mlxsw_sp_nexthop *nh, u32 *p_adj_index, 130 struct mlxsw_sp_rif *mlxsw_sp_nexthop_rif(struct mlxsw_sp_nexthop *nh); 131 bool mlxsw_sp_nexthop_group_has_ipip(struct mlxsw_sp_nexthop *nh); 132 #define mlxsw_sp_nexthop_for_each(nh, router) \ argument 133 for (nh = mlxsw_sp_nexthop_next(router, NULL); nh; \ 134 nh = mlxsw_sp_nexthop_next(router, nh)) 136 struct mlxsw_sp_nexthop *nh, u64 *p_counter); [all …]
|
D | spectrum_router.c | 2800 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_counter_alloc() argument 2809 if (mlxsw_sp_flow_counter_alloc(mlxsw_sp, &nh->counter_index)) in mlxsw_sp_nexthop_counter_alloc() 2812 nh->counter_valid = true; in mlxsw_sp_nexthop_counter_alloc() 2816 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_counter_free() argument 2818 if (!nh->counter_valid) in mlxsw_sp_nexthop_counter_free() 2820 mlxsw_sp_flow_counter_free(mlxsw_sp, nh->counter_index); in mlxsw_sp_nexthop_counter_free() 2821 nh->counter_valid = false; in mlxsw_sp_nexthop_counter_free() 2825 struct mlxsw_sp_nexthop *nh, u64 *p_counter) in mlxsw_sp_nexthop_counter_get() argument 2827 if (!nh->counter_valid) in mlxsw_sp_nexthop_counter_get() 2830 return mlxsw_sp_flow_counter_get(mlxsw_sp, nh->counter_index, in mlxsw_sp_nexthop_counter_get() [all …]
|
D | spectrum_dpipe.c | 911 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_offload(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 …]
|
/kernel/linux/linux-5.10/net/openvswitch/ |
D | actions.c | 312 const struct nshhdr *nh) in push_nsh() argument 316 err = nsh_push(skb, nh); in push_nsh() 343 static void update_ip_l4_checksum(struct sk_buff *skb, struct iphdr *nh, in update_ip_l4_checksum() argument 348 if (nh->frag_off & htons(IP_OFFSET)) in update_ip_l4_checksum() 351 if (nh->protocol == IPPROTO_TCP) { in update_ip_l4_checksum() 355 } else if (nh->protocol == IPPROTO_UDP) { in update_ip_l4_checksum() 369 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, in set_ip_addr() argument 372 update_ip_l4_checksum(skb, nh, *addr, new_addr); in set_ip_addr() 373 csum_replace4(&nh->check, *addr, new_addr); in set_ip_addr() 427 static void set_ipv6_dsfield(struct sk_buff *skb, struct ipv6hdr *nh, u8 ipv6_tclass, u8 mask) in set_ipv6_dsfield() argument [all …]
|
D | flow.c | 248 struct ipv6hdr *nh; in parse_ipv6hdr() local 251 err = check_header(skb, nh_ofs + sizeof(*nh)); in parse_ipv6hdr() 255 nh = ipv6_hdr(skb); in parse_ipv6hdr() 258 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr() 259 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr() 260 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr() 261 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr() 262 key->ipv6.addr.dst = nh->daddr; in parse_ipv6hdr() 481 struct nshhdr *nh; in parse_nsh() local 490 nh = nsh_hdr(skb); in parse_nsh() [all …]
|
/kernel/linux/linux-5.10/samples/bpf/ |
D | xdp_router_ipv4_user.c | 94 struct nlmsghdr *nh; in recv_msg() local 104 nh = (struct nlmsghdr *)buf_ptr; in recv_msg() 106 if (nh->nlmsg_type == NLMSG_DONE) in recv_msg() 122 static void read_route(struct nlmsghdr *nh, int nll) in read_route() argument 148 if (nh->nlmsg_type == RTM_DELROUTE) in read_route() 150 else if (nh->nlmsg_type == RTM_GETROUTE) in read_route() 152 else if (nh->nlmsg_type == RTM_NEWROUTE) in read_route() 155 printf("%d\n", nh->nlmsg_type); in read_route() 159 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_route() 160 rt_msg = (struct rtmsg *)NLMSG_DATA(nh); in read_route() [all …]
|
/kernel/linux/linux-5.10/tools/lib/bpf/ |
D | netlink.c | 82 struct nlmsghdr *nh; in bpf_netlink_recv() local 97 for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); in bpf_netlink_recv() 98 nh = NLMSG_NEXT(nh, len)) { in bpf_netlink_recv() 99 if (nh->nlmsg_pid != nl_pid) { in bpf_netlink_recv() 103 if (nh->nlmsg_seq != seq) { in bpf_netlink_recv() 107 if (nh->nlmsg_flags & NLM_F_MULTI) in bpf_netlink_recv() 109 switch (nh->nlmsg_type) { in bpf_netlink_recv() 111 err = (struct nlmsgerr *)NLMSG_DATA(nh); in bpf_netlink_recv() 115 libbpf_nla_dump_errormsg(nh); in bpf_netlink_recv() 123 ret = _fn(nh, fn, cookie); in bpf_netlink_recv() [all …]
|
/kernel/linux/linux-5.10/arch/alpha/boot/ |
D | Makefile | 13 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 …]
|
/kernel/linux/linux-5.10/net/mpls/ |
D | af_mpls.c | 95 static u8 *__mpls_nh_via(struct mpls_route *rt, struct mpls_nh *nh) in __mpls_nh_via() argument 97 return (u8 *)nh + rt->rt_via_offset; in __mpls_nh_via() 101 const struct mpls_nh *nh) in mpls_nh_via() argument 103 return __mpls_nh_via((struct mpls_route *)rt, (struct mpls_nh *)nh); in mpls_nh_via() 106 static unsigned int mpls_nh_header_size(const struct mpls_nh *nh) in mpls_nh_header_size() argument 109 return nh->nh_labels * sizeof(struct mpls_shim_hdr); in mpls_nh_header_size() 256 unsigned int nh_flags = READ_ONCE(nh->nh_flags); in mpls_select_multipath() 261 return nh; in mpls_select_multipath() 347 struct mpls_nh *nh; in mpls_forward() local 390 nh = mpls_select_multipath(rt, skb); in mpls_forward() [all …]
|
D | internal.h | 161 int nhsel; struct mpls_nh *nh; u8 *__nh; \ 162 for (nhsel = 0, nh = (rt)->rt_nh, __nh = (u8 *)((rt)->rt_nh); \ 164 __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) 167 int nhsel; struct mpls_nh *nh; u8 *__nh; \ 168 for (nhsel = 0, nh = (struct mpls_nh *)((rt)->rt_nh), \ 171 __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++)
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | route.c | 104 static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, 418 if (!match->nh && (!match->fib6_nsiblings || have_oif_match)) in fib6_select_path() 421 if (match->nh && have_oif_match && res->nh) in fib6_select_path() 428 (!match->nh || nexthop_is_multipath(match->nh))) in fib6_select_path() 431 if (unlikely(match->nh)) { in fib6_select_path() 441 const struct fib6_nh *nh = sibling->fib6_nh; in fib6_select_path() local 444 nh_upper_bound = atomic_read(&nh->fib_nh_upper_bound); in fib6_select_path() 447 if (rt6_score_route(nh, sibling->fib6_flags, oif, strict) < 0) in fib6_select_path() 455 res->nh = match->fib6_nh; in fib6_select_path() 462 static bool __rt6_device_match(struct net *net, const struct fib6_nh *nh, in __rt6_device_match() argument [all …]
|
/kernel/linux/linux-5.10/arch/arm/vfp/ |
D | vfp.h | 44 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 …]
|
/kernel/linux/linux-5.10/net/nsh/ |
D | nsh.c | 16 struct nshhdr *nh; in nsh_push() local 33 nh = (struct nshhdr *)(skb->data); in nsh_push() 34 memcpy(nh, pushed_nh, length); in nsh_push() 35 nh->np = next_proto; in nsh_push() 36 skb_postpush_rcsum(skb, nh, length); in nsh_push() 49 struct nshhdr *nh; in nsh_pop() local 55 nh = (struct nshhdr *)(skb->data); in nsh_pop() 56 length = nsh_hdr_len(nh); in nsh_pop() 59 inner_proto = tun_p_to_eth_p(nh->np); in nsh_pop()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | bpf_iter_ipv6_route.c | 20 struct nexthop *nh; in dump_ipv6_route() local 29 nh = rt->nh; in dump_ipv6_route() 30 if (rt->nh) in dump_ipv6_route() 31 fib6_nh = &nh->nh_info->fib6_nh; in dump_ipv6_route()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/ |
D | pci_irq.c | 16 struct atomic_notifier_head nh; member 64 return atomic_notifier_chain_register(&irq->nh, nb); in mlx5_irq_attach_nb() 73 return atomic_notifier_chain_unregister(&irq->nh, nb); in mlx5_irq_detach_nb() 76 static irqreturn_t mlx5_irq_int_handler(int irq, void *nh) in mlx5_irq_int_handler() argument 78 atomic_notifier_call_chain(nh, 0, NULL); in mlx5_irq_int_handler() 105 ATOMIC_INIT_NOTIFIER_HEAD(&irq->nh); in request_irqs() 109 &irq->nh); in request_irqs() 122 free_irq(irqn, &irq->nh); in request_irqs() 258 &mlx5_irq_get(dev, i)->nh); in unrequest_irqs() 330 &mlx5_irq_get(dev, i)->nh); in mlx5_irq_table_destroy()
|
/kernel/linux/linux-5.10/net/bridge/ |
D | br_netfilter_ipv6.c | 50 const unsigned char *nh = skb_network_header(skb); in br_nf_check_hbh_len() local 51 int off = raw - nh; in br_nf_check_hbh_len() 61 int optlen = nh[off + 1] + 2; in br_nf_check_hbh_len() 63 switch (nh[off]) { in br_nf_check_hbh_len() 72 if (nh[off + 1] != 4 || (off & 3) != 2) in br_nf_check_hbh_len() 74 pkt_len = ntohl(*(__be32 *)(nh + off + 2)); in br_nf_check_hbh_len() 83 nh = skb_network_header(skb); in br_nf_check_hbh_len()
|
/kernel/linux/linux-5.10/include/trace/events/ |
D | fib6.h | 65 if (res->nh && res->nh->fib_nh_dev) { 66 __assign_str(name, res->nh->fib_nh_dev); 76 } else if (res->nh) { 78 *in6 = res->nh->fib_nh_gw6;
|