Home
last modified time | relevance | path

Searched refs:neigh (Results 1 – 25 of 90) sorted by relevance

1234

/Linux-v5.15/net/rose/
Drose_link.c30 static void rose_transmit_restart_confirmation(struct rose_neigh *neigh);
31 static void rose_transmit_restart_request(struct rose_neigh *neigh);
33 void rose_start_ftimer(struct rose_neigh *neigh) in rose_start_ftimer() argument
35 del_timer(&neigh->ftimer); in rose_start_ftimer()
37 neigh->ftimer.function = rose_ftimer_expiry; in rose_start_ftimer()
38 neigh->ftimer.expires = in rose_start_ftimer()
41 add_timer(&neigh->ftimer); in rose_start_ftimer()
44 static void rose_start_t0timer(struct rose_neigh *neigh) in rose_start_t0timer() argument
46 del_timer(&neigh->t0timer); in rose_start_t0timer()
48 neigh->t0timer.function = rose_t0timer_expiry; in rose_start_t0timer()
[all …]
/Linux-v5.15/net/mctp/
Dneigh.c29 struct mctp_neigh *neigh; in mctp_neigh_add() local
38 if (lladdr_len > sizeof(neigh->ha)) { in mctp_neigh_add()
43 neigh = kzalloc(sizeof(*neigh), GFP_KERNEL); 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 dev_hold(neigh->dev->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-v5.15/net/decnet/
Ddn_neigh.c54 static int dn_neigh_output(struct neighbour *neigh, struct sk_buff *skb);
73 static bool dn_key_eq(const struct neighbour *neigh, const void *pkey) in dn_key_eq() argument
75 return neigh_key_eq16(neigh, pkey); in dn_key_eq()
111 static int dn_neigh_construct(struct neighbour *neigh) in dn_neigh_construct() argument
113 struct net_device *dev = neigh->dev; in dn_neigh_construct()
114 struct dn_neigh *dn = container_of(neigh, struct dn_neigh, n); in dn_neigh_construct()
131 __neigh_parms_put(neigh->parms); in dn_neigh_construct()
132 neigh->parms = neigh_parms_clone(parms); in dn_neigh_construct()
135 neigh->ops = &dn_neigh_ops; in dn_neigh_construct()
136 neigh->nud_state = NUD_NOARP; in dn_neigh_construct()
[all …]
/Linux-v5.15/net/core/
Dneighbour.c56 static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid);
92 static int neigh_blackhole(struct neighbour *neigh, struct sk_buff *skb) in neigh_blackhole() argument
98 static void neigh_cleanup_and_release(struct neighbour *neigh) in neigh_cleanup_and_release() argument
100 trace_neigh_cleanup_and_release(neigh, 0); in neigh_cleanup_and_release()
101 __neigh_notify(neigh, RTM_DELNEIGH, 0, 0); in neigh_cleanup_and_release()
102 call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); in neigh_cleanup_and_release()
103 neigh_release(neigh); in neigh_cleanup_and_release()
158 static bool neigh_update_ext_learned(struct neighbour *neigh, u32 flags, in neigh_update_ext_learned() argument
168 if ((neigh->flags ^ ndm_flags) & NTF_EXT_LEARNED) { in neigh_update_ext_learned()
170 neigh->flags |= NTF_EXT_LEARNED; in neigh_update_ext_learned()
[all …]
/Linux-v5.15/drivers/net/ethernet/chelsio/cxgb3/
Dl2t.c77 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()
184 neigh_event_send(e->neigh, NULL); in t3_l2t_send_event()
210 neigh_event_send(e->neigh, NULL); in t3_l2t_send_event()
268 if (e->neigh) { in t3_l2e_free()
269 neigh_release(e->neigh); in t3_l2e_free()
[all …]
/Linux-v5.15/drivers/net/ethernet/qlogic/qed/
Dqed_nvmetcp_ip_services.c28 struct neighbour *neigh = NULL; in qed_route_ipv4() local
44 neigh = dst_neigh_lookup(&rt->dst, rem_ip); in qed_route_ipv4()
45 if (!neigh) { in qed_route_ipv4()
55 if (!(neigh->nud_state & NUD_VALID)) in qed_route_ipv4()
56 neigh_event_send(neigh, NULL); in qed_route_ipv4()
60 while (!(neigh->nud_state & NUD_VALID) && retry > 0) { in qed_route_ipv4()
65 if (neigh->nud_state & NUD_VALID) { in qed_route_ipv4()
67 neigh_ha_snapshot(hardware_address->sa_data, neigh, *ndev); in qed_route_ipv4()
72 neigh_release(neigh); in qed_route_ipv4()
89 struct neighbour *neigh = NULL; in qed_route_ipv6() local
[all …]
/Linux-v5.15/drivers/infiniband/ulp/ipoib/
Dipoib_main.c752 struct ipoib_neigh *neigh, *tn; in path_rec_completion() local
808 list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { in path_rec_completion()
809 if (neigh->ah) { in path_rec_completion()
810 WARN_ON(neigh->ah != old_ah); in path_rec_completion()
818 ipoib_put_ah(neigh->ah); in path_rec_completion()
821 neigh->ah = path->ah; in path_rec_completion()
823 if (ipoib_cm_enabled(dev, neigh->daddr)) { in path_rec_completion()
824 if (!ipoib_cm_get(neigh)) in path_rec_completion()
825 ipoib_cm_set(neigh, ipoib_cm_create_tx(dev, in path_rec_completion()
827 neigh)); in path_rec_completion()
[all …]
Dipoib.h250 struct ipoib_neigh *neigh; member
464 void ipoib_neigh_dtor(struct ipoib_neigh *neigh);
465 static inline void ipoib_neigh_put(struct ipoib_neigh *neigh) in ipoib_neigh_put() argument
467 if (refcount_dec_and_test(&neigh->refcnt)) in ipoib_neigh_put()
468 ipoib_neigh_dtor(neigh); in ipoib_neigh_put()
473 void ipoib_neigh_free(struct ipoib_neigh *neigh);
637 static inline int ipoib_cm_up(struct ipoib_neigh *neigh) in ipoib_cm_up() argument
640 return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags); in ipoib_cm_up()
643 static inline struct ipoib_cm_tx *ipoib_cm_get(struct ipoib_neigh *neigh) in ipoib_cm_get() argument
645 return neigh->cm; in ipoib_cm_get()
[all …]
Dipoib_cm.c834 struct ipoib_neigh *neigh; in ipoib_cm_handle_tx_wc() local
850 neigh = tx->neigh; in ipoib_cm_handle_tx_wc()
852 if (neigh) { in ipoib_cm_handle_tx_wc()
853 neigh->cm = NULL; in ipoib_cm_handle_tx_wc()
854 ipoib_neigh_free(neigh); in ipoib_cm_handle_tx_wc()
856 tx->neigh = NULL; in ipoib_cm_handle_tx_wc()
1035 if (p->neigh) in ipoib_cm_rep_handler()
1036 while ((skb = __skb_dequeue(&p->neigh->queue))) in ipoib_cm_rep_handler()
1255 struct ipoib_neigh *neigh; in ipoib_cm_tx_handler() local
1277 neigh = tx->neigh; in ipoib_cm_tx_handler()
[all …]
/Linux-v5.15/net/ipv4/
Darp.c124 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);
217 static bool arp_key_eq(const struct neighbour *neigh, const void *pkey) in arp_key_eq() argument
219 return neigh_key_eq32(neigh, pkey); in arp_key_eq()
222 static int arp_constructor(struct neighbour *neigh) in arp_constructor() argument
225 struct net_device *dev = neigh->dev; in arp_constructor()
231 memcpy(neigh->primary_key, &inaddr_any, arp_tbl.key_len); in arp_constructor()
233 addr = *(__be32 *)neigh->primary_key; in arp_constructor()
241 neigh->type = inet_addr_type_dev_table(dev_net(dev), dev, addr); in arp_constructor()
[all …]
/Linux-v5.15/drivers/net/ethernet/chelsio/cxgb4/
Dl2t.c129 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-v5.15/net/ipv6/
Dndisc.c75 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);
325 static int ndisc_constructor(struct neighbour *neigh) in ndisc_constructor() argument
327 struct in6_addr *addr = (struct in6_addr *)&neigh->primary_key; in ndisc_constructor()
328 struct net_device *dev = neigh->dev; in ndisc_constructor()
339 __neigh_parms_put(neigh->parms); in ndisc_constructor()
340 neigh->parms = neigh_parms_clone(parms); in ndisc_constructor()
342 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; in ndisc_constructor()
[all …]
/Linux-v5.15/net/batman-adv/
Dbat_v_elp.c67 static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_get_throughput() argument
69 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput()
95 ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo); in batadv_v_elp_get_throughput()
166 struct batadv_hardif_neigh_node *neigh; in batadv_v_elp_throughput_metric_update() local
170 neigh = container_of(neigh_bat_v, struct batadv_hardif_neigh_node, in batadv_v_elp_throughput_metric_update()
173 ewma_throughput_add(&neigh->bat_v.throughput, in batadv_v_elp_throughput_metric_update()
174 batadv_v_elp_get_throughput(neigh)); in batadv_v_elp_throughput_metric_update()
179 batadv_hardif_neigh_put(neigh); in batadv_v_elp_throughput_metric_update()
194 batadv_v_elp_wifi_neigh_probe(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_wifi_neigh_probe() argument
196 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_wifi_neigh_probe()
[all …]
Doriginator.c402 batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_get() argument
409 hlist_for_each_entry_rcu(tmp_neigh_ifinfo, &neigh->ifinfo_list, in batadv_neigh_ifinfo_get()
437 batadv_neigh_ifinfo_new(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_new() argument
442 spin_lock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new()
444 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); in batadv_neigh_ifinfo_new()
460 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); in batadv_neigh_ifinfo_new()
463 spin_unlock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new()
541 if (bat_priv->algo_ops->neigh.hardif_init) in batadv_hardif_neigh_create()
542 bat_priv->algo_ops->neigh.hardif_init(hardif_neigh); in batadv_hardif_neigh_create()
749 if (!bat_priv->algo_ops->neigh.dump) { in batadv_hardif_neigh_dump()
[all …]
/Linux-v5.15/include/net/
Dneighbour.h326 void neigh_destroy(struct neighbour *neigh);
327 int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb);
328 int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new, u32 flags,
330 void __neigh_set_probe_once(struct neighbour *neigh);
335 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb);
336 int neigh_connected_output(struct neighbour *neigh, struct sk_buff *skb);
337 int neigh_direct_output(struct neighbour *neigh, struct sk_buff *skb);
422 static inline void neigh_release(struct neighbour *neigh) in neigh_release() argument
424 if (refcount_dec_and_test(&neigh->refcnt)) in neigh_release()
425 neigh_destroy(neigh); in neigh_release()
[all …]
Dndisc.h211 struct neighbour *neigh, u8 *ha_buf,
267 struct neighbour *neigh, in ndisc_ops_redirect_opt_addr_space() argument
272 neigh, ha_buf, ha); in ndisc_ops_redirect_opt_addr_space()
343 struct neighbour *neigh, in ndisc_redirect_opt_addr_space() argument
349 ndisc_ops_redirect_opt_addr_space(dev, neigh, ops_data_buf, in ndisc_redirect_opt_addr_space()
445 struct neighbour *neigh; in ip_neigh_gw6() local
447 neigh = __ipv6_neigh_lookup_noref_stub(dev, addr); in ip_neigh_gw6()
448 if (unlikely(!neigh)) in ip_neigh_gw6()
449 neigh = __neigh_create(ipv6_stub->nd_tbl, addr, dev, false); in ip_neigh_gw6()
451 return neigh; in ip_neigh_gw6()
[all …]
Droute.h370 struct neighbour *neigh; in ip_neigh_gw4() local
372 neigh = __ipv4_neigh_lookup_noref(dev, daddr); in ip_neigh_gw4()
373 if (unlikely(!neigh)) in ip_neigh_gw4()
374 neigh = __neigh_create(&arp_tbl, &daddr, dev, false); in ip_neigh_gw4()
376 return neigh; in ip_neigh_gw4()
384 struct neighbour *neigh; in ip_neigh_for_gw() local
387 neigh = ip_neigh_gw4(dev, rt->rt_gw4); in ip_neigh_for_gw()
389 neigh = ip_neigh_gw6(dev, &rt->rt_gw6); in ip_neigh_for_gw()
392 neigh = ip_neigh_gw4(dev, ip_hdr(skb)->daddr); in ip_neigh_for_gw()
394 return neigh; in ip_neigh_for_gw()
/Linux-v5.15/net/atm/
Dclip.c78 pr_debug("%p to entry %p (neigh %p)\n", clip_vcc, entry, entry->neigh); in link_vcc()
83 entry->neigh->used = jiffies; in link_vcc()
95 netif_tx_lock_bh(entry->neigh->dev); /* block clip_start_xmit() */ in unlink_clip_vcc()
96 entry->neigh->used = jiffies; in unlink_clip_vcc()
104 netif_wake_queue(entry->neigh->dev); in unlink_clip_vcc()
109 error = neigh_update(entry->neigh, NULL, NUD_NONE, in unlink_clip_vcc()
117 netif_tx_unlock_bh(entry->neigh->dev); in unlink_clip_vcc()
211 skb->dev = clip_vcc->entry ? clip_vcc->entry->neigh->dev : clip_devs; in clip_push()
266 static void clip_neigh_solicit(struct neighbour *neigh, struct sk_buff *skb) in clip_neigh_solicit() argument
268 __be32 *ip = (__be32 *) neigh->primary_key; in clip_neigh_solicit()
[all …]
/Linux-v5.15/tools/testing/selftests/netfilter/
Dnft_nat_zones.sh40 v4gc1=$(sysctl -n net.ipv4.neigh.default.gc_thresh1 2>/dev/null)
41 v4gc2=$(sysctl -n net.ipv4.neigh.default.gc_thresh2 2>/dev/null)
42 v4gc3=$(sysctl -n net.ipv4.neigh.default.gc_thresh3 2>/dev/null)
43 v6gc1=$(sysctl -n net.ipv6.neigh.default.gc_thresh1 2>/dev/null)
44 v6gc2=$(sysctl -n net.ipv6.neigh.default.gc_thresh2 2>/dev/null)
45 v6gc3=$(sysctl -n net.ipv6.neigh.default.gc_thresh3 2>/dev/null)
55 sysctl -q net.ipv4.neigh.default.gc_thresh1=$v4gc1 2>/dev/null
56 sysctl -q net.ipv4.neigh.default.gc_thresh2=$v4gc2 2>/dev/null
57 sysctl -q net.ipv4.neigh.default.gc_thresh3=$v4gc3 2>/dev/null
58 sysctl -q net.ipv6.neigh.default.gc_thresh1=$v6gc1 2>/dev/null
[all …]
/Linux-v5.15/net/6lowpan/
Dndisc.c60 struct lowpan_802154_neigh *neigh = lowpan_802154_neigh(neighbour_priv(n)); in lowpan_ndisc_802154_update() local
95 ieee802154_be16_to_le16(&neigh->short_addr, lladdr_short); in lowpan_ndisc_802154_update()
96 if (!lowpan_802154_is_valid_src_short_addr(neigh->short_addr)) in lowpan_ndisc_802154_update()
97 neigh->short_addr = cpu_to_le16(IEEE802154_ADDR_SHORT_UNSPEC); in lowpan_ndisc_802154_update()
115 u8 icmp6_type, struct neighbour *neigh, in lowpan_ndisc_opt_addr_space() argument
127 n = lowpan_802154_neigh(neighbour_priv(neigh)); in lowpan_ndisc_opt_addr_space()
129 read_lock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space()
133 read_unlock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space()
137 read_unlock_bh(&neigh->lock); in lowpan_ndisc_opt_addr_space()
/Linux-v5.15/tools/testing/selftests/net/forwarding/
Dcustom_multipath_hash.sh280 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
281 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
282 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
300 sysctl_restore net.ipv4.neigh.default.gc_thresh3
301 sysctl_restore net.ipv4.neigh.default.gc_thresh2
302 sysctl_restore net.ipv4.neigh.default.gc_thresh1
315 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024
316 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024
317 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024
339 sysctl_restore net.ipv6.neigh.default.gc_thresh3
[all …]
Dgre_custom_multipath_hash.sh373 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
374 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
375 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
393 sysctl_restore net.ipv4.neigh.default.gc_thresh3
394 sysctl_restore net.ipv4.neigh.default.gc_thresh2
395 sysctl_restore net.ipv4.neigh.default.gc_thresh1
404 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024
405 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024
406 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024
428 sysctl_restore net.ipv6.neigh.default.gc_thresh3
[all …]
Dip6gre_custom_multipath_hash.sh375 sysctl_set net.ipv4.neigh.default.gc_thresh1 1024
376 sysctl_set net.ipv4.neigh.default.gc_thresh2 1024
377 sysctl_set net.ipv4.neigh.default.gc_thresh3 1024
395 sysctl_restore net.ipv4.neigh.default.gc_thresh3
396 sysctl_restore net.ipv4.neigh.default.gc_thresh2
397 sysctl_restore net.ipv4.neigh.default.gc_thresh1
406 sysctl_set net.ipv6.neigh.default.gc_thresh1 1024
407 sysctl_set net.ipv6.neigh.default.gc_thresh2 1024
408 sysctl_set net.ipv6.neigh.default.gc_thresh3 1024
430 sysctl_restore net.ipv6.neigh.default.gc_thresh3
[all …]
/Linux-v5.15/include/trace/events/
Dneigh.h2 #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, int rc),
[all …]
/Linux-v5.15/tools/testing/selftests/drivers/net/mlxsw/
Drtnetlink.sh655 ip -4 neigh add 192.0.2.2 lladdr de:ad:be:ef:13:37 nud perm dev $swp1
656 ip -6 neigh add 2001:db8:1::2 lladdr de:ad:be:ef:13:37 nud perm \
660 ip -4 neigh show dev $swp1 192.0.2.2
663 ip -6 neigh show dev $swp1 2001:db8:1::2
668 ip -6 neigh del 2001:db8:1::2 dev $swp1
669 ip -4 neigh del 192.0.2.2 dev $swp1
782 ip neigh replace 192.0.2.2 lladdr 00:11:22:33:44:55 nud reachable \
789 ip neigh replace 192.0.2.2 nud failed dev $swp1
794 ip neigh replace 192.0.2.2 lladdr 00:11:22:33:44:55 nud reachable \
812 ip neigh del 192.0.2.2 dev $swp1
[all …]

1234