/linux-6.1.9/kernel/ |
D | notifier.c | 143 int atomic_notifier_chain_register(struct atomic_notifier_head *nh, in atomic_notifier_chain_register() argument 149 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register() 150 ret = notifier_chain_register(&nh->head, n, false); in atomic_notifier_chain_register() 151 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register() 166 int atomic_notifier_chain_register_unique_prio(struct atomic_notifier_head *nh, in atomic_notifier_chain_register_unique_prio() argument 172 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register_unique_prio() 173 ret = notifier_chain_register(&nh->head, n, true); in atomic_notifier_chain_register_unique_prio() 174 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register_unique_prio() 188 int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, in atomic_notifier_chain_unregister() argument 194 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_unregister() [all …]
|
/linux-6.1.9/include/net/ |
D | nexthop.h | 99 struct nexthop *nh; member 184 struct nh_notifier_single_info nh; member 212 struct nh_notifier_single_info *nh; member 232 static inline bool nexthop_get(struct nexthop *nh) in nexthop_get() argument 234 return refcount_inc_not_zero(&nh->refcnt); in nexthop_get() 237 static inline void nexthop_put(struct nexthop *nh) in nexthop_put() argument 239 if (refcount_dec_and_test(&nh->refcnt)) in nexthop_put() 240 call_rcu(&nh->rcu, nexthop_free_rcu); in nexthop_put() 249 static inline bool nexthop_is_fdb(const struct nexthop *nh) in nexthop_is_fdb() argument 251 if (nh->is_group) { in nexthop_is_fdb() [all …]
|
/linux-6.1.9/net/ipv4/ |
D | fib_semantics.c | 70 int nhsel; const struct fib_nh *nh; \ 71 for (nhsel = 0, nh = (fi)->fib_nh; \ 73 nh++, nhsel++) 86 int nhsel; const struct fib_nh *nh = (fi)->fib_nh; \ 237 if (fi->nh) { in free_fib_info_rcu() 238 nexthop_put(fi->nh); in free_fib_info_rcu() 272 if (fi->nh) { in fib_release_info() 291 if (fi->nh || ofi->nh) in nh_comp() 292 return nexthop_cmp(fi->nh, ofi->nh) ? 0 : -1; in nh_comp() 300 if (nh->fib_nh_oif != onh->fib_nh_oif || in nh_comp() [all …]
|
D | nexthop.c | 23 static void remove_nexthop(struct net *net, struct nexthop *nh, 101 const struct nexthop *nh) in nh_notifier_single_info_init() argument 103 struct nh_info *nhi = rtnl_dereference(nh->nh_info); in nh_notifier_single_info_init() 106 info->nh = kzalloc(sizeof(*info->nh), GFP_KERNEL); in nh_notifier_single_info_init() 107 if (!info->nh) in nh_notifier_single_info_init() 110 __nh_notifier_single_info_init(info->nh, nhi); in nh_notifier_single_info_init() 117 kfree(info->nh); in nh_notifier_single_info_fini() 139 nhi = rtnl_dereference(nhge->nh->nh_info); in nh_notifier_mpath_info_init() 140 info->nh_grp->nh_entries[i].id = nhge->nh->id; in nh_notifier_mpath_info_init() 142 __nh_notifier_single_info_init(&info->nh_grp->nh_entries[i].nh, in nh_notifier_mpath_info_init() [all …]
|
/linux-6.1.9/tools/testing/selftests/net/ |
D | tap.c | 33 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 …]
|
D | ipsec.c | 210 static inline struct rtattr *rtattr_hdr(struct nlmsghdr *nh) in rtattr_hdr() argument 212 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr() 215 static int rtattr_pack(struct nlmsghdr *nh, size_t req_sz, in rtattr_pack() argument 219 struct rtattr *attr = rtattr_hdr(nh); in rtattr_pack() 220 size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size); in rtattr_pack() 226 nh->nlmsg_len = nl_size; in rtattr_pack() 235 static struct rtattr *_rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in _rtattr_begin() argument 238 struct rtattr *ret = rtattr_hdr(nh); in _rtattr_begin() 240 if (rtattr_pack(nh, req_sz, rta_type, payload, size)) in _rtattr_begin() 246 static inline struct rtattr *rtattr_begin(struct nlmsghdr *nh, size_t req_sz, in rtattr_begin() argument [all …]
|
D | tun.c | 70 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-6.1.9/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, 154 struct atomic_notifier_head *nh, struct notifier_block *nb); 156 struct blocking_notifier_head *nh, struct notifier_block *nb); 158 extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, 160 extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, 162 extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, [all …]
|
/linux-6.1.9/tools/testing/selftests/net/mptcp/ |
D | pm_nl_ctl.c | 53 struct nlmsghdr *nh = (void *)data; in init_genl_req() local 57 nh->nlmsg_type = family; in init_genl_req() 58 nh->nlmsg_flags = NLM_F_REQUEST; in init_genl_req() 59 nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN); in init_genl_req() 60 off += NLMSG_ALIGN(sizeof(*nh)); in init_genl_req() 69 static void nl_error(struct nlmsghdr *nh) in nl_error() argument 71 struct nlmsgerr *err = (struct nlmsgerr *)NLMSG_DATA(nh); in nl_error() 72 int len = nh->nlmsg_len - sizeof(*nh); in nl_error() 81 struct rtattr *attrs = (struct rtattr *)NLMSG_DATA(nh); in nl_error() 105 struct nlmsghdr *nh; in capture_events() local [all …]
|
/linux-6.1.9/net/openvswitch/ |
D | actions.c | 313 const struct nshhdr *nh) in push_nsh() argument 317 err = nsh_push(skb, nh); in push_nsh() 344 static void update_ip_l4_checksum(struct sk_buff *skb, struct iphdr *nh, in update_ip_l4_checksum() argument 349 if (nh->frag_off & htons(IP_OFFSET)) in update_ip_l4_checksum() 352 if (nh->protocol == IPPROTO_TCP) { in update_ip_l4_checksum() 356 } else if (nh->protocol == IPPROTO_UDP) { in update_ip_l4_checksum() 370 static void set_ip_addr(struct sk_buff *skb, struct iphdr *nh, in set_ip_addr() argument 373 update_ip_l4_checksum(skb, nh, *addr, new_addr); in set_ip_addr() 374 csum_replace4(&nh->check, *addr, new_addr); in set_ip_addr() 428 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 | 270 static void get_ipv6_ext_hdrs(struct sk_buff *skb, struct ipv6hdr *nh, in get_ipv6_ext_hdrs() argument 273 u8 next_type = nh->nexthdr; in get_ipv6_ext_hdrs() 388 struct ipv6hdr *nh; in parse_ipv6hdr() local 391 err = check_header(skb, nh_ofs + sizeof(*nh)); in parse_ipv6hdr() 395 nh = ipv6_hdr(skb); in parse_ipv6hdr() 397 get_ipv6_ext_hdrs(skb, nh, &key->ipv6.exthdrs); in parse_ipv6hdr() 400 key->ip.tos = ipv6_get_dsfield(nh); in parse_ipv6hdr() 401 key->ip.ttl = nh->hop_limit; in parse_ipv6hdr() 402 key->ipv6.label = *(__be32 *)nh & htonl(IPV6_FLOWINFO_FLOWLABEL); in parse_ipv6hdr() 403 key->ipv6.addr.src = nh->saddr; in parse_ipv6hdr() [all …]
|
/linux-6.1.9/drivers/net/ethernet/mellanox/mlxsw/ |
D | spectrum_router.h | 135 struct mlxsw_sp_nexthop *nh); 136 bool mlxsw_sp_nexthop_is_forward(const struct mlxsw_sp_nexthop *nh); 137 unsigned char *mlxsw_sp_nexthop_ha(struct mlxsw_sp_nexthop *nh); 138 int mlxsw_sp_nexthop_indexes(struct mlxsw_sp_nexthop *nh, u32 *p_adj_index, 140 struct mlxsw_sp_rif *mlxsw_sp_nexthop_rif(struct mlxsw_sp_nexthop *nh); 141 bool mlxsw_sp_nexthop_group_has_ipip(struct mlxsw_sp_nexthop *nh); 142 #define mlxsw_sp_nexthop_for_each(nh, router) \ argument 143 for (nh = mlxsw_sp_nexthop_next(router, NULL); nh; \ 144 nh = mlxsw_sp_nexthop_next(router, nh)) 146 struct mlxsw_sp_nexthop *nh, u64 *p_counter); [all …]
|
D | spectrum_router.c | 2985 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_counter_alloc() argument 2994 if (mlxsw_sp_flow_counter_alloc(mlxsw_sp, &nh->counter_index)) in mlxsw_sp_nexthop_counter_alloc() 2997 nh->counter_valid = true; in mlxsw_sp_nexthop_counter_alloc() 3001 struct mlxsw_sp_nexthop *nh) in mlxsw_sp_nexthop_counter_free() argument 3003 if (!nh->counter_valid) in mlxsw_sp_nexthop_counter_free() 3005 mlxsw_sp_flow_counter_free(mlxsw_sp, nh->counter_index); in mlxsw_sp_nexthop_counter_free() 3006 nh->counter_valid = false; in mlxsw_sp_nexthop_counter_free() 3010 struct mlxsw_sp_nexthop *nh, u64 *p_counter) in mlxsw_sp_nexthop_counter_get() argument 3012 if (!nh->counter_valid) in mlxsw_sp_nexthop_counter_get() 3015 return mlxsw_sp_flow_counter_get(mlxsw_sp, nh->counter_index, in mlxsw_sp_nexthop_counter_get() [all …]
|
/linux-6.1.9/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() 346 const struct mpls_nh *nh; in mpls_forward() local 392 nh = mpls_select_multipath(rt, skb); in mpls_forward() [all …]
|
D | internal.h | 161 int nhsel; const struct mpls_nh *nh; \ 162 for (nhsel = 0, nh = (rt)->rt_nh; \ 164 nh = (void *)nh + (rt)->rt_nh_size, nhsel++) 167 int nhsel; struct mpls_nh *nh; \ 168 for (nhsel = 0, nh = (rt)->rt_nh; \ 170 nh = (void *)nh + (rt)->rt_nh_size, nhsel++)
|
/linux-6.1.9/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 …]
|
/linux-6.1.9/net/ipv6/ |
D | route.c | 106 static int rt6_score_route(const struct fib6_nh *nh, u32 fib6_flags, int oif, 422 if (!match->nh && (!match->fib6_nsiblings || have_oif_match)) in fib6_select_path() 425 if (match->nh && have_oif_match && res->nh) in fib6_select_path() 432 (!match->nh || nexthop_is_multipath(match->nh))) in fib6_select_path() 435 if (unlikely(match->nh)) { in fib6_select_path() 445 const struct fib6_nh *nh = sibling->fib6_nh; in fib6_select_path() local 448 nh_upper_bound = atomic_read(&nh->fib_nh_upper_bound); in fib6_select_path() 451 if (rt6_score_route(nh, sibling->fib6_flags, oif, strict) < 0) in fib6_select_path() 459 res->nh = match->fib6_nh; in fib6_select_path() 466 static bool __rt6_device_match(struct net *net, const struct fib6_nh *nh, in __rt6_device_match() argument [all …]
|
/linux-6.1.9/tools/lib/bpf/ |
D | netlink.c | 135 struct nlmsghdr *nh; in libbpf_netlink_recv() local 166 for (nh = (struct nlmsghdr *)iov.iov_base; NLMSG_OK(nh, len); in libbpf_netlink_recv() 167 nh = NLMSG_NEXT(nh, len)) { in libbpf_netlink_recv() 168 if (nh->nlmsg_pid != nl_pid) { in libbpf_netlink_recv() 172 if (nh->nlmsg_seq != seq) { in libbpf_netlink_recv() 176 if (nh->nlmsg_flags & NLM_F_MULTI) in libbpf_netlink_recv() 178 switch (nh->nlmsg_type) { in libbpf_netlink_recv() 180 err = (struct nlmsgerr *)NLMSG_DATA(nh); in libbpf_netlink_recv() 184 libbpf_nla_dump_errormsg(nh); in libbpf_netlink_recv() 193 ret = _fn(nh, fn, cookie); in libbpf_netlink_recv() [all …]
|
D | nlattr.h | 57 struct nlmsghdr nh; member 126 return (struct nlattr *)((void *)req + NLMSG_ALIGN(req->nh.nlmsg_len)); in req_tail() 134 if (NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(NLA_HDRLEN + len) > sizeof(*req)) in nlattr_add() 144 req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len); in nlattr_add()
|
/linux-6.1.9/samples/bpf/ |
D | xdp_router_ipv4_user.c | 63 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-6.1.9/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 …]
|
/linux-6.1.9/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()
|
/linux-6.1.9/tools/testing/selftests/bpf/progs/ |
D | bpf_iter_ipv6_route.c | 19 struct nexthop *nh; in dump_ipv6_route() local 28 nh = rt->nh; in dump_ipv6_route() 29 if (rt->nh) in dump_ipv6_route() 30 fib6_nh = &nh->nh_info->fib6_nh; in dump_ipv6_route()
|
/linux-6.1.9/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()
|
/linux-6.1.9/include/trace/events/ |
D | fib6.h | 65 if (res->nh && res->nh->fib_nh_dev) { 66 strlcpy(__entry->name, res->nh->fib_nh_dev->name, IFNAMSIZ); 76 } else if (res->nh) { 78 *in6 = res->nh->fib_nh_gw6;
|