| /linux/drivers/net/ethernet/sfc/ |
| H A D | tc_encap_actions.c | 43 struct efx_neigh_binder *neigh = ptr; in efx_neigh_free() local 45 WARN_ON(refcount_read(&neigh->ref)); in efx_neigh_free() 46 WARN_ON(!list_empty(&neigh->users)); in efx_neigh_free() 47 put_net_track(neigh->net, &neigh->ns_tracker); in efx_neigh_free() 48 netdev_put(neigh->egdev, &neigh->dev_tracker); in efx_neigh_free() 49 kfree(neigh); in efx_neigh_free() 90 struct efx_neigh_binder *neigh, *old; in efx_bind_neigh() local 123 neigh = kzalloc_obj(*neigh, GFP_KERNEL_ACCOUNT); in efx_bind_neigh() 124 if (!neigh) in efx_bind_neigh() 126 neigh->net = get_net_track(net, &neigh->ns_tracker, GFP_KERNEL_ACCOUNT); in efx_bind_neigh() [all …]
|
| /linux/net/mctp/ |
| H A D | neigh.c | 29 struct mctp_neigh *neigh; in mctp_neigh_add() local 38 if (lladdr_len > sizeof(neigh->ha)) { in mctp_neigh_add() 43 neigh = kzalloc_obj(*neigh); in mctp_neigh_add() 44 if (!neigh) { in mctp_neigh_add() 48 INIT_LIST_HEAD(&neigh->list); in mctp_neigh_add() 49 neigh->dev = mdev; in mctp_neigh_add() 50 mctp_dev_hold(neigh->dev); in mctp_neigh_add() 51 neigh->eid = eid; in mctp_neigh_add() 52 neigh->source = source; in mctp_neigh_add() 53 memcpy(neigh->ha, lladdr, lladdr_len); in mctp_neigh_add() [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb3/ |
| H A D | l2t.c | 77 if (e->neigh) in neigh_replace() 78 neigh_release(e->neigh); in neigh_replace() 79 e->neigh = n; in neigh_replace() 105 memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac)); in setup_l2e_send_pending() 134 neigh_event_send(e->neigh, NULL); in t3_l2t_send_slow() 160 if (!neigh_event_send(e->neigh, NULL)) { in t3_l2t_send_slow() 231 if (e->neigh) { in t3_l2e_free() 232 neigh_release(e->neigh); in t3_l2e_free() 233 e->neigh = NULL; in t3_l2e_free() 246 static inline void reuse_entry(struct l2t_entry *e, struct neighbour *neigh) in reuse_entry() argument [all …]
|
| /linux/drivers/net/ethernet/chelsio/cxgb4/ |
| H A D | l2t.c | 129 if (e->neigh) in neigh_replace() 130 neigh_release(e->neigh); in neigh_replace() 131 e->neigh = n; in neigh_replace() 158 if (e->neigh && !(e->neigh->dev->flags & IFF_LOOPBACK)) in write_l2e() 159 memcpy(e->dmac, e->neigh->ha, sizeof(e->dmac)); in write_l2e() 205 e->state = (e->neigh->nud_state & NUD_STALE) ? in do_l2t_write_rpl() 229 neigh_event_send(e->neigh, NULL); in cxgb4_l2t_send() 249 !neigh_event_send(e->neigh, NULL)) { in cxgb4_l2t_send() 356 if (e->neigh) { in _t4_l2e_free() 357 neigh_release(e->neigh); in _t4_l2e_free() [all …]
|
| /linux/net/ipv4/ |
| H A D | arp.c | 124 static int arp_constructor(struct neighbour *neigh); 125 static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb); 126 static void arp_error_report(struct neighbour *neigh, struct sk_buff *skb); 218 static bool arp_key_eq(const struct neighbour *neigh, const void *pkey) in arp_key_eq() argument 220 return neigh_key_eq32(neigh, pkey); in arp_key_eq() 223 static int arp_constructor(struct neighbour *neigh) in arp_constructor() argument 226 struct net_device *dev = neigh->dev; in arp_constructor() 232 memcpy(neigh->primary_key, &inaddr_any, arp_tbl.key_len); in arp_constructor() 234 addr = *(__be32 *)neigh->primary_key; in arp_constructor() 242 neigh->type = inet_addr_type_dev_table(dev_net(dev), dev, addr); in arp_constructor() [all …]
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_router_hw.c | 289 struct prestera_nh_neigh *neigh) in __prestera_nh_neigh_destroy() argument 292 &neigh->ht_node, in __prestera_nh_neigh_destroy() 294 kfree(neigh); in __prestera_nh_neigh_destroy() 301 struct prestera_nh_neigh *neigh; in __prestera_nh_neigh_create() local 304 neigh = kzalloc_obj(*neigh); in __prestera_nh_neigh_create() 305 if (!neigh) in __prestera_nh_neigh_create() 308 memcpy(&neigh->key, key, sizeof(*key)); in __prestera_nh_neigh_create() 309 neigh->info.connected = false; in __prestera_nh_neigh_create() 310 INIT_LIST_HEAD(&neigh->nexthop_group_list); in __prestera_nh_neigh_create() 312 &neigh->ht_node, in __prestera_nh_neigh_create() [all …]
|
| /linux/net/ipv6/ |
| H A D | ndisc.c | 75 static bool ndisc_key_eq(const struct neighbour *neigh, const void *pkey); 78 static int ndisc_constructor(struct neighbour *neigh); 79 static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb); 80 static void ndisc_error_report(struct neighbour *neigh, struct sk_buff *skb); 326 static int ndisc_constructor(struct neighbour *neigh) in ndisc_constructor() argument 328 struct in6_addr *addr = (struct in6_addr *)&neigh->primary_key; in ndisc_constructor() 329 struct net_device *dev = neigh->dev; in ndisc_constructor() 340 __neigh_parms_put(neigh->parms); in ndisc_constructor() 341 neigh->parms = neigh_parms_clone(parms); in ndisc_constructor() 343 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; in ndisc_constructor() [all …]
|
| /linux/tools/testing/selftests/net/netfilter/ |
| H A D | nft_nat_zones.sh | 34 v4gc1=$(sysctl -n net.ipv4.neigh.default.gc_thresh1 2>/dev/null) 35 v4gc2=$(sysctl -n net.ipv4.neigh.default.gc_thresh2 2>/dev/null) 36 v4gc3=$(sysctl -n net.ipv4.neigh.default.gc_thresh3 2>/dev/null) 37 v6gc1=$(sysctl -n net.ipv6.neigh.default.gc_thresh1 2>/dev/null) 38 v6gc2=$(sysctl -n net.ipv6.neigh.default.gc_thresh2 2>/dev/null) 39 v6gc3=$(sysctl -n net.ipv6.neigh.default.gc_thresh3 2>/dev/null) 45 sysctl -q net.ipv4.neigh.default.gc_thresh1="$v4gc1" 2>/dev/null 46 sysctl -q net.ipv4.neigh.default.gc_thresh2="$v4gc2" 2>/dev/null 47 sysctl -q net.ipv4.neigh.default.gc_thresh3="$v4gc3" 2>/dev/null 48 sysctl -q net.ipv6.neigh [all...] |
| /linux/include/net/ |
| H A D | neighbour.h | 354 void neigh_destroy(struct neighbour *neigh); 355 int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb, 357 int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags, 359 void __neigh_set_probe_once(struct neighbour *neigh); 364 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb); 365 int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb); 366 int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb); 456 static inline void neigh_release(struct neighbour *neigh) in neigh_release() argument 458 if (refcount_dec_and_test(&neigh->refcnt)) in neigh_release() 459 neigh_destroy(neigh); in neigh_release() [all …]
|
| H A D | ndisc.h | 194 struct neighbour *neigh, u8 *ha_buf, 241 struct neighbour *neigh, in ndisc_ops_redirect_opt_addr_space() argument 246 neigh, ha_buf, ha); in ndisc_ops_redirect_opt_addr_space() 317 struct neighbour *neigh, in ndisc_redirect_opt_addr_space() argument 323 ndisc_ops_redirect_opt_addr_space(dev, neigh, ops_data_buf, in ndisc_redirect_opt_addr_space() 388 struct neighbour *neigh; in ip_neigh_gw6() local 390 neigh = __ipv6_neigh_lookup_noref(dev, addr); in ip_neigh_gw6() 391 if (unlikely(!neigh)) in ip_neigh_gw6() 392 neigh = __neigh_create(&nd_tbl, addr, dev, false); in ip_neigh_gw6() 394 return neigh; in ip_neigh_gw6() [all …]
|
| H A D | route.h | 405 struct neighbour *neigh; in ip_neigh_gw4() local 407 neigh = __ipv4_neigh_lookup_noref(dev, (__force u32)daddr); in ip_neigh_gw4() 408 if (unlikely(!neigh)) in ip_neigh_gw4() 409 neigh = __neigh_create(&arp_tbl, &daddr, dev, false); in ip_neigh_gw4() 411 return neigh; in ip_neigh_gw4() 419 struct neighbour *neigh; in ip_neigh_for_gw() local 422 neigh = ip_neigh_gw4(dev, rt->rt_gw4); in ip_neigh_for_gw() 424 neigh = ip_neigh_gw6(dev, &rt->rt_gw6); in ip_neigh_for_gw() 427 neigh = ip_neigh_gw4(dev, ip_hdr(skb)->daddr); in ip_neigh_for_gw() 429 return neigh; in ip_neigh_for_gw()
|
| /linux/tools/testing/selftests/net/ |
| H A D | srv6_end_flavors_test.sh | 360 local neigh 366 for neigh in ${rt_neighs}; do 367 neigh_nsname="$(get_rtname "${neigh}")" 369 ip link add "veth-rt-${rt}-${neigh}" netns "${nsname}" \ 370 type veth peer name "veth-rt-${neigh}-${rt}" \ 378 local neigh="$2" 380 local q="${neigh}" 425 local neigh 429 for neigh in ${rt_neighs}; do 430 devname="veth-rt-${rt}-${neigh}" [all...] |
| H A D | srv6_hl2encap_red_l2vpn_test.sh | 251 local neigh 257 for neigh in ${rt_neighs}; do 258 eval neigh_nsname=\${$(get_rtname "${neigh}")} 260 ip link add "veth-rt-${rt}-${neigh}" netns "${nsname}" \ 261 type veth peer name "veth-rt-${neigh}-${rt}" \ 269 local neigh="$2" 271 local q="${neigh}" 288 local neigh 292 for neigh in ${rt_neighs}; do 293 devname="veth-rt-${rt}-${neigh}" [all …]
|
| H A D | srv6_hencap_red_l3vpn_test.sh | 301 local neigh 307 for neigh in ${rt_neighs}; do 308 eval neigh_nsname=\${$(get_rtname "${neigh}")} 310 ip link add "veth-rt-${rt}-${neigh}" netns "${nsname}" \ 311 type veth peer name "veth-rt-${neigh}-${rt}" \ 319 local neigh="$2" 321 local q="${neigh}" 338 local neigh 342 for neigh in ${rt_neighs}; do 343 devname="veth-rt-${rt}-${neigh}" [all...] |
| H A D | srv6_end_next_csid_l3vpn_test.sh | 428 local neigh 434 for neigh in ${rt_neighs}; do 435 eval neigh_nsname=\${$(get_rtname "${neigh}")} 437 ip link add "veth-rt-${rt}-${neigh}" netns "${nsname}" \ 438 type veth peer name "veth-rt-${neigh}-${rt}" \ 446 local neigh="$2" 448 local q="${neigh}" 465 local neigh 469 for neigh in ${rt_neighs}; do 470 devname="veth-rt-${rt}-${neigh}" [all …]
|
| H A D | arp_ndisc_evict_nocarrier.sh | 48 ip netns exec ${me} ip -6 neigh get $V6_ADDR1 dev veth1 >/dev/null 2>&1 75 ip neigh get $V4_ADDR1 dev veth0 >/dev/null 2>&1 87 ip neigh flush dev veth0 101 ip neigh get $V4_ADDR1 dev veth0 >/dev/null 2>&1 119 ip neigh get $V4_ADDR1 dev veth0 >/dev/null 2>&1 136 ip neigh get $V4_ADDR1 dev veth0 >/dev/null 2>&1 152 ip netns exec ${me} ip -6 neigh get $V6_ADDR1 dev veth1 >/dev/null 2>&1 169 ip netns exec ${me} ip -6 neigh get $V6_ADDR1 dev veth1 >/dev/null 2>&1 186 ip netns exec ${me} ip -6 neigh get $V6_ADDR1 dev veth1 >/dev/null 2>&1
|
| H A D | srv6_end_x_next_csid_l3vpn_test.sh | 478 local neigh 484 for neigh in ${rt_neighs}; do 485 eval neigh_nsname=\${$(get_rtname "${neigh}")} 487 ip link add "veth-rt-${rt}-${neigh}" netns "${nsname}" \ 488 type veth peer name "veth-rt-${neigh}-${rt}" \ 496 local neigh="$2" 498 local q="${neigh}" 515 local neigh 519 for neigh in ${rt_neighs}; do 520 devname="veth-rt-${rt}-${neigh}" [all …]
|
| /linux/net/batman-adv/ |
| H A D | bat_v_elp.c | 81 static bool batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh, in batadv_v_elp_get_throughput() argument 84 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput() 123 ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo); in batadv_v_elp_get_throughput() 206 batadv_v_elp_throughput_metric_update(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_throughput_metric_update() argument 211 valid = batadv_v_elp_get_throughput(neigh, &throughput); in batadv_v_elp_throughput_metric_update() 215 ewma_throughput_add(&neigh->bat_v.throughput, throughput); in batadv_v_elp_throughput_metric_update() 230 batadv_v_elp_wifi_neigh_probe(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_wifi_neigh_probe() argument 232 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_wifi_neigh_probe() 253 last_tx_diff = jiffies_to_msecs(jiffies - neigh->bat_v.last_unicast_tx); in batadv_v_elp_wifi_neigh_probe() 276 hard_iface->net_dev->name, neigh->addr); in batadv_v_elp_wifi_neigh_probe() [all …]
|
| H A D | originator.c | 454 batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_get() argument 461 hlist_for_each_entry_rcu(tmp_neigh_ifinfo, &neigh->ifinfo_list, in batadv_neigh_ifinfo_get() 489 batadv_neigh_ifinfo_new(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_new() argument 494 spin_lock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new() 496 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); in batadv_neigh_ifinfo_new() 512 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); in batadv_neigh_ifinfo_new() 515 spin_unlock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new() 594 if (bat_priv->algo_ops->neigh.hardif_init) in batadv_hardif_neigh_create() 595 bat_priv->algo_ops->neigh.hardif_init(hardif_neigh); in batadv_hardif_neigh_create() 795 if (!bat_priv->algo_ops->neigh.dump) { in batadv_hardif_neigh_dump() [all …]
|
| /linux/net/6lowpan/ |
| H A D | ndisc.c | 54 struct lowpan_802154_neigh *neigh = lowpan_802154_neigh(neighbour_priv(n)); in lowpan_ndisc_802154_update() local 87 ieee802154_be16_to_le16(&neigh->short_addr, lladdr_short); in lowpan_ndisc_802154_update() 88 if (!lowpan_802154_is_valid_src_short_addr(neigh->short_addr)) in lowpan_ndisc_802154_update() 89 neigh->short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_UNSPEC); in lowpan_ndisc_802154_update() 107 u8 icmp6_type, struct neighbour *neigh, in lowpan_ndisc_opt_addr_space() argument 119 n = lowpan_802154_neigh(neighbour_priv(neigh)); in lowpan_ndisc_opt_addr_space() 121 read_lock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space() 125 read_unlock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space() 129 read_unlock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space()
|
| /linux/tools/testing/selftests/net/forwarding/ |
| H A D | custom_multipath_hash.sh | 288 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024 289 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024 290 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024 308 sysctl_restore net.ipv4.neigh.default.gc_thresh3 309 sysctl_restore net.ipv4.neigh.default.gc_thresh2 310 sysctl_restore net.ipv4.neigh.default.gc_thresh1 323 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024 324 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024 325 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024 347 sysctl_restore net.ipv6.neigh [all...] |
| H A D | gre_custom_multipath_hash.sh | 381 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024 382 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024 383 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024 401 sysctl_restore net.ipv4.neigh.default.gc_thresh3 402 sysctl_restore net.ipv4.neigh.default.gc_thresh2 403 sysctl_restore net.ipv4.neigh.default.gc_thresh1 412 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024 413 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024 414 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024 436 sysctl_restore net.ipv6.neigh [all...] |
| H A D | ip6gre_custom_multipath_hash.sh | 383 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024 384 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024 385 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024 403 sysctl_restore net.ipv4.neigh.default.gc_thresh3 404 sysctl_restore net.ipv4.neigh.default.gc_thresh2 405 sysctl_restore net.ipv4.neigh.default.gc_thresh1 414 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024 415 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024 416 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024 438 sysctl_restore net.ipv6.neigh [all...] |
| /linux/include/trace/events/ |
| H A D | neigh.h | 2 #define TRACE_SYSTEM neigh 228 TP_PROTO(struct neighbour *neigh, int err), 229 TP_ARGS(neigh, err) 233 TP_PROTO(struct neighbour *neigh, int err), 234 TP_ARGS(neigh, err) 238 TP_PROTO(struct neighbour *neigh, int err), 239 TP_ARGS(neigh, err) 243 TP_PROTO(struct neighbour *neigh, int err), 244 TP_ARGS(neigh, err) 248 TP_PROTO(struct neighbour *neigh, in [all...] |
| /linux/tools/testing/selftests/drivers/net/hw/ |
| H A D | ethtool_rmon.sh | 42 local neigh=$1; shift 63 run_on "$neigh" \ 64 "$MZ" "$neigh" -q -c "$num_rx" -p "$len" -a own -b bcast -d 10us 83 local neigh=$1; shift 91 for if in "$iface" "$neigh"; do 99 if ! bucket_test "$iface" "$neigh" "$set" "$nbuckets" "${bucket[0]}"; then
|