| /linux/kernel/ |
| A D | notifier.c | 271 down_write(&nh->rwsem); in __blocking_notifier_chain_register() 273 up_write(&nh->rwsem); in __blocking_notifier_chain_register() 334 down_write(&nh->rwsem); in blocking_notifier_chain_unregister() 336 up_write(&nh->rwsem); in blocking_notifier_chain_unregister() 352 down_read(&nh->rwsem); in blocking_notifier_call_chain_robust() 354 up_read(&nh->rwsem); in blocking_notifier_call_chain_robust() 387 down_read(&nh->rwsem); in blocking_notifier_call_chain() 389 up_read(&nh->rwsem); in blocking_notifier_call_chain() 493 mutex_lock(&nh->mutex); in srcu_notifier_chain_register() 523 mutex_lock(&nh->mutex); in srcu_notifier_chain_unregister() [all …]
|
| /linux/include/net/ |
| A D | nexthop.h | 106 struct nexthop *nh; member 281 if (nh->is_group) { in nexthop_is_fdb() 377 nh = nh_grp->nh_entries[0].nh; in nexthop_is_blackhole() 389 nh = nexthop_select_path(res->fi->nh, hash); in nexthop_path_fib_result() 409 if (!nh) in nexthop_fib_nhc() 498 WARN_ON(fi->nh); in fib_info_nh() 519 if (!nh) in nexthop_fib6_nh() 534 fib6_nh = f6i->nh ? nexthop_fib6_nh(f6i->nh) : f6i->fib6_nh; in fib6_info_nh_dev() 540 struct nexthop *nh = res->f6i->nh; in nexthop_path_fib6_result() local 543 nh = nexthop_select_path(nh, hash); in nexthop_path_fib6_result() [all …]
|
| /linux/tools/testing/selftests/net/tcp_ao/lib/ |
| A D | netlink.c | 62 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr() 76 nh->nlmsg_len = nl_size; in rtattr_pack() 104 char *nlmsg_end = (char *)nh + nh->nlmsg_len; in rtattr_end() 139 struct nlmsghdr nh; in __add_veth() member 150 req.nh.nlmsg_seq = seq; in __add_veth() 202 struct nlmsghdr nh; in __ip_addr_add() member 213 req.nh.nlmsg_seq = seq; in __ip_addr_add() 249 struct nlmsghdr nh; in __ip_route_add() member 261 req.nh.nlmsg_seq = seq; in __ip_route_add() 311 struct nlmsghdr nh; in __link_set_up() member [all …]
|
| /linux/net/ipv4/ |
| A D | fib_semantics.c | 237 if (fi->nh) { in free_fib_info_rcu() 292 if (fi->nh || ofi->nh) in nh_comp() 293 return nexthop_cmp(fi->nh, ofi->nh) ? 0 : -1; in nh_comp() 394 if (!fi->nh || fi->nh->id != cfg->fc_nh_id) in fib_find_info_nh() 478 if (fi->nh) in fib_nlmsg_size() 888 if (fi->nh && cfg->fc_nh_id == fi->nh->id) in fib_nh_match() 1065 netdev_hold(nh->fib_nh_dev, &nh->fib_nh_dev_tracker, in fib_check_nh_v6_gw() 1067 nh->fib_nh_oif = nh->fib_nh_dev->ifindex; in fib_check_nh_v6_gw() 1419 if (!nh) { in fib_create_info() 1478 if (nh) { in fib_create_info() [all …]
|
| A D | nexthop.c | 119 info->nh = kzalloc(sizeof(*info->nh), GFP_KERNEL); in nh_notifier_single_info_init() 292 if (!nh) { in nh_notifier_res_bucket_idle_timer_get() 530 kfree(nh); in nexthop_free_rcu() 539 if (nh) { in nexthop_alloc() 545 return nh; in nexthop_alloc() 2000 struct nexthop *nh = nhge->nh; in remove_nh_grp_entry() local 2029 if (nhg->nh_entries[i].nh == nh) { in remove_nh_grp_entry() 2041 new_nhges[j].nh = nhges[i].nh; in remove_nh_grp_entry() 2686 if (!nh) in nexthop_create_group() 2863 if (!nh) in nexthop_create() [all …]
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| A D | xfrm_info.c | 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() 193 return rtattr_add(nh, type, 0); in rtattr_begin() 198 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end() 206 struct nlmsghdr nh; in setup_xfrmi_external_dev() member 213 struct nlmsghdr *nh; in setup_xfrmi_external_dev() local 216 nh = &req.nh; in setup_xfrmi_external_dev() 218 nh->nlmsg_type = RTM_NEWLINK; in setup_xfrmi_external_dev() 226 rtattr_end(nh, info_data); in setup_xfrmi_external_dev() 227 rtattr_end(nh, link_info); in setup_xfrmi_external_dev() [all …]
|
| /linux/tools/testing/selftests/net/ |
| A D | tap.c | 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() 46 return rtattr_add(nh, type, 0); in rtattr_begin() 51 uint8_t *end = (uint8_t *)nh + nh->nlmsg_len; in rtattr_end() 88 struct nlmsghdr nh; in dev_create() member 104 req.nh.nlmsg_type = RTM_NEWLINK; in dev_create() 115 ret = fill_rtattr(&req.nh); in dev_create() 126 ret = fill_info_data(&req.nh); in dev_create() 129 rtattr_end(&req.nh, info_data); in dev_create() 132 rtattr_end(&req.nh, link_info); in dev_create() [all …]
|
| A D | ipsec.c | 212 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr() 254 char *nlmsg_end = (char *)nh + nh->nlmsg_len; in rtattr_end() 312 struct nlmsghdr nh; in veth_add() member 362 struct nlmsghdr nh; in ip4_addr_set() member 402 struct nlmsghdr nh; in link_set_up() member 429 struct nlmsghdr nh; in ip4_route_set() member 919 struct nlmsghdr nh; in xfrm_state_add() member 1008 struct nlmsghdr nh; in xfrm_state_check() member 1367 struct nlmsghdr nh; in xfrm_monitor_acquire() member 1438 struct nlmsghdr nh; in xfrm_expire_state() member [all …]
|
| A 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/include/linux/ |
| A D | notifier.h | 94 extern void srcu_init_notifier_head(struct srcu_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); 164 extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh, 166 extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, 169 extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh, 173 extern int raw_notifier_call_chain(struct raw_notifier_head *nh, 175 extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh, [all …]
|
| /linux/tools/testing/selftests/net/mptcp/ |
| A D | pm_nl_ctl.c | 66 int len = nh->nlmsg_len - sizeof(*nh); in nl_error() 105 struct nlmsghdr *nh; in capture_events() local 132 for (; NLMSG_OK(nh, res_len); nh = NLMSG_NEXT(nh, res_len)) { in capture_events() 206 void *data = nh; in do_nl_req() 227 for (; NLMSG_OK(nh, rem); nh = NLMSG_NEXT(nh, rem)) { in do_nl_req() 231 if (nh->nlmsg_type == NLMSG_ERROR && nl_error(nh)) in do_nl_req() 319 nh = (void *)data; in resolve_mptcp_pm_netlink() 1054 for (; NLMSG_OK(nh, total_len); nh = NLMSG_NEXT(nh, total_len)) { in print_addrs() 1060 nl_error(nh); in print_addrs() 1190 for (; NLMSG_OK(nh, total_len); nh = NLMSG_NEXT(nh, total_len)) { in print_limits() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| A D | spectrum_router.h | 144 struct mlxsw_sp_nexthop *nh); 145 bool mlxsw_sp_nexthop_is_forward(const struct mlxsw_sp_nexthop *nh); 146 unsigned char *mlxsw_sp_nexthop_ha(struct mlxsw_sp_nexthop *nh); 150 bool mlxsw_sp_nexthop_group_has_ipip(struct mlxsw_sp_nexthop *nh); 151 #define mlxsw_sp_nexthop_for_each(nh, router) \ argument 152 for (nh = mlxsw_sp_nexthop_next(router, NULL); nh; \ 153 nh = mlxsw_sp_nexthop_next(router, nh)) 155 struct mlxsw_sp_nexthop *nh, u64 *p_counter); 157 struct mlxsw_sp_nexthop *nh, bool force, 160 struct mlxsw_sp_nexthop *nh); [all …]
|
| A D | spectrum_router.c | 3303 if (!nh) { in mlxsw_sp_nexthop_next() 4009 nh->norm_nh_weight = nh->nh_weight / g; in mlxsw_sp_nexthop_group_normalize() 4067 if (nh && nh->offloaded) in __mlxsw_sp_nexthop6_group_offload_refresh() 4176 if (nh->should_offload != nh->offloaded) { in mlxsw_sp_nexthop_group_refresh() 4306 n = neigh_lookup(nh->neigh_tbl, &nh->gw_addr, dev); in mlxsw_sp_nexthop_dead_neigh_replace() 4403 if (!nh->nhgi->gateway || nh->neigh_entry) in mlxsw_sp_nexthop_neigh_init() 4412 n = neigh_lookup(nh->neigh_tbl, &nh->gw_addr, dev); in mlxsw_sp_nexthop_neigh_init() 4496 if (!nh->nhgi->gateway || nh->ipip_entry) in mlxsw_sp_nexthop_ipip_init() 4677 if (!nh) in mlxsw_sp_nexthop4_event() 4928 if (!nh->gw_family && !nh->is_reject && in mlxsw_sp_nexthop_obj_group_entry_validate() [all …]
|
| /linux/tools/lib/bpf/ |
| A D | netlink.c | 143 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() 180 if (nh->nlmsg_seq != seq) { in libbpf_netlink_recv() 186 switch (nh->nlmsg_type) { in libbpf_netlink_recv() 201 ret = _fn(nh, fn, cookie); in libbpf_netlink_recv() 234 req->nh.nlmsg_pid = 0; in libbpf_netlink_send_recv() 235 req->nh.nlmsg_seq = time(NULL); in libbpf_netlink_send_recv() 271 .nh.nlmsg_type = GENL_ID_CTRL, in libbpf_netlink_resolve_genl_family_id() 486 req.nh.nlmsg_type = id; in bpf_xdp_query() [all …]
|
| /linux/net/openvswitch/ |
| A D | actions.c | 463 ofl = nh->flow_lbl[0] << 16 | nh->flow_lbl[1] << 8 | nh->flow_lbl[2]; in set_ipv6_fl() 490 csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8)); in set_ip_ttl() 491 nh->ttl = new_ttl; in set_ip_ttl() 498 struct iphdr *nh; in set_ipv4() local 507 nh = ip_hdr(skb); in set_ipv4() 517 set_ip_addr(skb, nh, &nh->saddr, new_addr); in set_ipv4() 525 set_ip_addr(skb, nh, &nh->daddr, new_addr); in set_ipv4() 619 struct nshhdr *nh; in set_nsh() local 637 nh = nsh_hdr(skb); in set_nsh() 646 nh = nsh_hdr(skb); in set_nsh() [all …]
|
| A D | flow.c | 391 struct ipv6hdr *nh; in parse_ipv6hdr() local 398 nh = ipv6_hdr(skb); in parse_ipv6hdr() 631 struct nshhdr *nh; in parse_nsh() local 640 nh = nsh_hdr(skb); in parse_nsh() 642 length = nsh_hdr_len(nh); in parse_nsh() 651 nh = nsh_hdr(skb); in parse_nsh() 662 sizeof(nh->md1)); in parse_nsh() 689 struct iphdr *nh; in key_extract_l3l4() local 703 nh = ip_hdr(skb); in key_extract_l3l4() 708 key->ip.tos = nh->tos; in key_extract_l3l4() [all …]
|
| /linux/net/mpls/ |
| A D | af_mpls.c | 262 return nh; in mpls_select_multipath() 394 if (!nh) in mpls_forward() 702 nh->nh_dev = dev; in mpls_nh_assign_dev() 776 if (!nh) in mpls_nh_build_from_cfg() 807 if (!nh) in mpls_nh_build() 818 err = nla_get_via(via, &nh->nh_via_alen, &nh->nh_via_table, in mpls_nh_build() 1501 if (!nh->nh_dev || nh->nh_dev == dev) in mpls_ifdown() 2012 nla_put_via(skb, nh->nh_via_table, mpls_nh_via(rt, nh), in mpls_dump_route() 2230 if (nh->nh_dev) in lfib_nlmsg_size() 2447 if (!nh) { in mpls_getroute() [all …]
|
| A 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/arch/alpha/boot/ |
| A D | Makefile | 13 vmlinux.nh tools/lxboot tools/bootlx tools/bootph \ 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 84 $(obj)/vmlinux.nh: vmlinux $(OBJSTRIP) FORCE [all …]
|
| /linux/net/ipv6/ |
| A D | route.c | 499 arg->nh = nh; in __rt6_nh_dev_match() 571 nh = nexthop_fib6_nh(f6i->nh); in rt6_device_match() 583 res->nh = nh; in rt6_device_match() 591 res->nh = nh; in rt6_device_match() 783 arg->nh = nh; in rt6_nh_find_match() 828 nh = arg.nh; in __find_rr_leaf() 838 res->nh = nh; in __find_rr_leaf() 1672 struct fib6_nh *nh = res->nh; in rt6_insert_exception() local 3041 arg->res->nh = nh; in fib6_nh_redirect_match() 3806 rt->nh = nh; in ip6_route_info_create() [all …]
|
| /linux/samples/bpf/ |
| A D | xdp_router_ipv4_user.c | 63 struct nlmsghdr *nh; in recv_msg() local 117 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_route() 124 rtl = RTM_PAYLOAD(nh); in read_route() 254 struct nlmsghdr *nh; in get_route_table() local 307 read_route(nh, nll); in get_route_table() 333 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_arp() 391 struct nlmsghdr *nh; in get_arp_table() local 442 read_arp(nh, nll); in get_arp_table() 456 struct nlmsghdr *nh; in monitor_routes_thread() local 518 read_route(nh, nll); in monitor_routes_thread() [all …]
|
| /linux/arch/arm/vfp/ |
| A D | vfp.h | 50 : "=r" (nl), "=r" (nh) in add128() 53 *resh = nh; in add128() 63 : "=r" (nl), "=r" (nh) in sub128() 66 *resh = nh; in sub128() 72 u32 nh, nl, mh, ml; in mul64to128() local 79 nh = n >> 32; in mul64to128() 80 rma = (u64)nh * ml; in mul64to128() 86 rh = (u64)nh * mh; in mul64to128() 114 if (nh >= m) in vfp_estimate_div128to64() 117 if (mh << 32 <= nh) { in vfp_estimate_div128to64() [all …]
|
| /linux/net/nsh/ |
| A D | nsh.c | 17 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/progs/ |
| A 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/net/netfilter/ |
| A D | utils.c | 186 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()
|