/linux/include/net/ |
A D | nexthop.h | 99 struct nexthop *nh; member 347 nh = nh_grp->nh_entries[0].nh; in nexthop_is_blackhole() 359 nh = nexthop_select_path(res->fi->nh, hash); in nexthop_path_fib_result() 379 if (!nh) in nexthop_fib_nhc() 468 WARN_ON(fi->nh); in fib_info_nh() 489 if (!nh) in nexthop_fib6_nh() 512 if (!nh) in nexthop_fib6_nh_bh() 527 fib6_nh = f6i->nh ? nexthop_fib6_nh(f6i->nh) : f6i->fib6_nh; in fib6_info_nh_dev() 533 struct nexthop *nh = res->f6i->nh; in nexthop_path_fib6_result() local 536 nh = nexthop_select_path(nh, hash); in nexthop_path_fib6_result() [all …]
|
/linux/kernel/ |
A D | notifier.c | 234 down_write(&nh->rwsem); in blocking_notifier_chain_register() 236 up_write(&nh->rwsem); in blocking_notifier_chain_register() 264 down_write(&nh->rwsem); in blocking_notifier_chain_unregister() 266 up_write(&nh->rwsem); in blocking_notifier_chain_unregister() 282 down_read(&nh->rwsem); in blocking_notifier_call_chain_robust() 284 up_read(&nh->rwsem); in blocking_notifier_call_chain_robust() 317 down_read(&nh->rwsem); in blocking_notifier_call_chain() 319 up_read(&nh->rwsem); in blocking_notifier_call_chain() 424 mutex_lock(&nh->mutex); in srcu_notifier_chain_register() 454 mutex_lock(&nh->mutex); in srcu_notifier_chain_unregister() [all …]
|
/linux/net/ipv4/ |
A D | fib_semantics.c | 233 if (fi->nh) { in free_fib_info_rcu() 284 if (fi->nh || ofi->nh) in nh_comp() 285 return nexthop_cmp(fi->nh, ofi->nh) ? 0 : -1; in nh_comp() 382 if (!fi->nh || fi->nh->id != cfg->fc_nh_id) in fib_find_info_nh() 466 if (fi->nh) in fib_nlmsg_size() 877 if (fi->nh && cfg->fc_nh_id == fi->nh->id) in fib_nh_match() 1047 nh->fib_nh_oif = nh->fib_nh_dev->ifindex; in fib_check_nh_v6_gw() 1334 nh->nh_saddr = inet_select_addr(nh->fib_nh_dev, nh->fib_nh_gw4, scope); in fib_info_update_nhc_saddr() 1417 if (!nh) { in fib_create_info() 1476 if (nh) { in fib_create_info() [all …]
|
A D | nexthop.c | 105 info->nh = kzalloc(sizeof(*info->nh), GFP_KERNEL); in nh_notifier_single_info_init() 277 if (!nh) { in nh_notifier_res_bucket_idle_timer_get() 513 kfree(nh); in nexthop_free_rcu() 522 if (nh) { in nexthop_alloc() 1738 struct nexthop *nh = nhge->nh; in remove_nh_grp_entry() local 1767 if (nhg->nh_entries[i].nh == nh) { in remove_nh_grp_entry() 1778 new_nhges[j].nh = nhges[i].nh; in remove_nh_grp_entry() 2423 if (!nh) in nexthop_create_group() 2588 if (!nh) in nexthop_create() 3005 if (!nh) in rtm_del_nexthop() [all …]
|
/linux/net/decnet/ |
A D | dn_fib.c | 54 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++) 95 dev_put(nh->nh_dev); in dn_fib_free_info() 96 nh->nh_dev = NULL; in dn_fib_free_info() 198 if (nh->nh_gw) { in dn_fib_check_nh() 213 nh->nh_dev = dev; in dn_fib_check_nh() 257 nh->nh_dev = dev; in dn_fib_check_nh() 337 nh->nh_weight = 1; in dn_fib_create_info() 468 nh->nh_power = nh->nh_weight; in dn_fib_select_multipath() 482 if (!(nh->nh_flags&RTNH_F_DEAD) && nh->nh_power) { in dn_fib_select_multipath() 484 nh->nh_power--; in dn_fib_select_multipath() [all …]
|
/linux/tools/testing/selftests/net/mptcp/ |
A D | pm_nl_ctl.c | 59 int len = nh->nlmsg_len - sizeof(*nh); in nl_error() 91 void *data = nh; in do_nl_req() 95 nh->nlmsg_len = len; in do_nl_req() 108 for (; NLMSG_OK(nh, rem); nh = NLMSG_NEXT(nh, rem)) { in do_nl_req() 110 nl_error(nh); in do_nl_req() 159 nh = (void *)data; in resolve_mptcp_pm_netlink() 188 nh = (void *)data; in add_addr() 465 for (; NLMSG_OK(nh, total_len); nh = NLMSG_NEXT(nh, total_len)) { in print_addrs() 471 nl_error(nh); in print_addrs() 572 for (; NLMSG_OK(nh, total_len); nh = NLMSG_NEXT(nh, total_len)) { in print_limits() [all …]
|
/linux/tools/testing/selftests/net/ |
A D | ipsec.c | 174 return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len)); in rtattr_hdr() 216 char *nlmsg_end = (char *)nh + nh->nlmsg_len; in rtattr_end() 274 struct nlmsghdr nh; in veth_add() member 285 req.nh.nlmsg_seq = seq; in veth_add() 324 struct nlmsghdr nh; in ip4_addr_set() member 364 struct nlmsghdr nh; in link_set_up() member 391 struct nlmsghdr nh; in ip4_route_set() member 934 struct nlmsghdr nh; in xfrm_state_add() member 1382 struct nlmsghdr nh; in xfrm_monitor_acquire() member 1453 struct nlmsghdr nh; in xfrm_expire_state() member [all …]
|
/linux/include/linux/ |
A 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, 148 extern int raw_notifier_chain_register(struct raw_notifier_head *nh, 150 extern int srcu_notifier_chain_register(struct srcu_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, 164 extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh, 166 extern int raw_notifier_call_chain(struct raw_notifier_head *nh, 168 extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh, [all …]
|
/linux/net/openvswitch/ |
A D | actions.c | 439 csum_replace2(&nh->check, htons(nh->ttl << 8), htons(new_ttl << 8)); in set_ip_ttl() 440 nh->ttl = new_ttl; in set_ip_ttl() 447 struct iphdr *nh; in set_ipv4() local 456 nh = ip_hdr(skb); in set_ipv4() 466 set_ip_addr(skb, nh, &nh->saddr, new_addr); in set_ipv4() 474 set_ip_addr(skb, nh, &nh->daddr, new_addr); in set_ipv4() 499 struct ipv6hdr *nh; in set_ipv6() local 569 struct nshhdr *nh; in set_nsh() local 587 nh = nsh_hdr(skb); in set_nsh() 596 nh = nsh_hdr(skb); in set_nsh() [all …]
|
A D | flow.c | 249 struct ipv6hdr *nh; in parse_ipv6hdr() local 256 nh = ipv6_hdr(skb); in parse_ipv6hdr() 486 struct nshhdr *nh; in parse_nsh() local 495 nh = nsh_hdr(skb); in parse_nsh() 497 length = nsh_hdr_len(nh); in parse_nsh() 506 nh = nsh_hdr(skb); in parse_nsh() 517 sizeof(nh->md1)); in parse_nsh() 544 struct iphdr *nh; in key_extract_l3l4() local 558 nh = ip_hdr(skb); in key_extract_l3l4() 563 key->ip.tos = nh->tos; in key_extract_l3l4() [all …]
|
/linux/net/mpls/ |
A D | af_mpls.c | 261 return nh; in mpls_select_multipath() 393 if (!nh) in mpls_forward() 701 nh->nh_dev = dev; in mpls_nh_assign_dev() 775 if (!nh) in mpls_nh_build_from_cfg() 806 if (!nh) in mpls_nh_build() 817 err = nla_get_via(via, &nh->nh_via_alen, &nh->nh_via_table, in mpls_nh_build() 1513 if (!nh->nh_dev || nh->nh_dev == dev) in mpls_ifdown() 2025 nla_put_via(skb, nh->nh_via_table, mpls_nh_via(rt, nh), in mpls_dump_route() 2241 if (nh->nh_dev) in lfib_nlmsg_size() 2459 if (!nh) { in mpls_getroute() [all …]
|
A 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++)
|
/linux/tools/lib/bpf/ |
A D | netlink.c | 96 struct nlmsghdr *nh; in libbpf_netlink_recv() local 112 for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); in libbpf_netlink_recv() 113 nh = NLMSG_NEXT(nh, len)) { in libbpf_netlink_recv() 114 if (nh->nlmsg_pid != nl_pid) { in libbpf_netlink_recv() 118 if (nh->nlmsg_seq != seq) { in libbpf_netlink_recv() 124 switch (nh->nlmsg_type) { in libbpf_netlink_recv() 130 libbpf_nla_dump_errormsg(nh); in libbpf_netlink_recv() 138 ret = _fn(nh, fn, cookie); in libbpf_netlink_recv() 169 req->nh.nlmsg_pid = 0; in libbpf_netlink_send_recv() 170 req->nh.nlmsg_seq = time(NULL); in libbpf_netlink_send_recv() [all …]
|
A 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/net/ipv6/ |
A D | route.c | 497 arg->nh = nh; in __rt6_nh_dev_match() 569 nh = nexthop_fib6_nh(f6i->nh); in rt6_device_match() 581 res->nh = nh; in rt6_device_match() 589 res->nh = nh; in rt6_device_match() 777 arg->nh = nh; in rt6_nh_find_match() 822 nh = arg.nh; in __find_rr_leaf() 832 res->nh = nh; in __find_rr_leaf() 1659 struct fib6_nh *nh = res->nh; in rt6_insert_exception() local 3031 arg->res->nh = nh; in fib6_nh_redirect_match() 3820 rt->nh = nh; in ip6_route_info_create() [all …]
|
/linux/samples/bpf/ |
A D | xdp_router_ipv4_user.c | 94 struct nlmsghdr *nh; in recv_msg() local 159 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_route() 166 rtl = RTM_PAYLOAD(nh); in read_route() 319 struct nlmsghdr *nh; in get_route_table() local 372 read_route(nh, nll); in get_route_table() 401 for (; NLMSG_OK(nh, nll); nh = NLMSG_NEXT(nh, nll)) { in read_arp() 470 struct nlmsghdr *nh; in get_arp_table() local 521 read_arp(nh, nll); in get_arp_table() 538 struct nlmsghdr *nh; in monitor_route() local 610 read_route(nh, nll); in monitor_route() [all …]
|
/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/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/drivers/net/ethernet/mellanox/mlxsw/ |
A D | spectrum_router.h | 204 struct mlxsw_sp_nexthop *nh); 205 bool mlxsw_sp_nexthop_is_forward(const struct mlxsw_sp_nexthop *nh); 206 unsigned char *mlxsw_sp_nexthop_ha(struct mlxsw_sp_nexthop *nh); 210 bool mlxsw_sp_nexthop_group_has_ipip(struct mlxsw_sp_nexthop *nh); 211 #define mlxsw_sp_nexthop_for_each(nh, router) \ argument 212 for (nh = mlxsw_sp_nexthop_next(router, NULL); nh; \ 213 nh = mlxsw_sp_nexthop_next(router, nh)) 215 struct mlxsw_sp_nexthop *nh, u64 *p_counter); 217 struct mlxsw_sp_nexthop *nh, bool force, 220 struct mlxsw_sp_nexthop *nh); [all …]
|
A D | spectrum_router.c | 3494 rif_index = nh->rif ? nh->rif->rif_index : in __mlxsw_sp_nexthop_eth_update() 3750 nh->norm_nh_weight = nh->nh_weight / g; in mlxsw_sp_nexthop_group_normalize() 3808 if (nh && nh->offloaded) in __mlxsw_sp_nexthop6_group_offload_refresh() 4045 n = neigh_lookup(nh->neigh_tbl, &nh->gw_addr, nh->rif->dev); in mlxsw_sp_nexthop_dead_neigh_replace() 4047 n = neigh_create(nh->neigh_tbl, &nh->gw_addr, nh->rif->dev); in mlxsw_sp_nexthop_dead_neigh_replace() 4138 if (!nh->nhgi->gateway || nh->neigh_entry) in mlxsw_sp_nexthop_neigh_init() 4146 n = neigh_lookup(nh->neigh_tbl, &nh->gw_addr, nh->rif->dev); in mlxsw_sp_nexthop_neigh_init() 4148 n = neigh_create(nh->neigh_tbl, &nh->gw_addr, nh->rif->dev); in mlxsw_sp_nexthop_neigh_init() 4229 if (!nh->nhgi->gateway || nh->ipip_entry) in mlxsw_sp_nexthop_ipip_init() 4610 if (!nh->gw_family && !nh->is_reject && in mlxsw_sp_nexthop_obj_group_entry_validate() [all …]
|
A D | spectrum_dpipe.c | 911 struct mlxsw_sp_nexthop *nh; in mlxsw_sp_dpipe_table_adj_size() local 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 1089 struct mlxsw_sp_nexthop *nh; in mlxsw_sp_dpipe_table_adj_entries_get() local 1107 if (!mlxsw_sp_nexthop_is_forward(nh) || in mlxsw_sp_dpipe_table_adj_entries_get() 1108 mlxsw_sp_nexthop_group_has_ipip(nh)) in mlxsw_sp_dpipe_table_adj_entries_get() 1183 struct mlxsw_sp_nexthop *nh; in mlxsw_sp_dpipe_table_adj_counters_update() local 1189 if (!mlxsw_sp_nexthop_is_forward(nh) || in mlxsw_sp_dpipe_table_adj_counters_update() 1190 mlxsw_sp_nexthop_group_has_ipip(nh)) in mlxsw_sp_dpipe_table_adj_counters_update() [all …]
|
/linux/net/nsh/ |
A 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/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/bridge/ |
A 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/include/trace/events/ |
A 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;
|