Home
last modified time | relevance | path

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

1234

/Linux-v5.10/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.10/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 …]
Ddn_route.c961 struct neighbour *neigh = NULL; in dn_route_output_slow() local
1073 neigh = neigh_lookup_nodev(&dn_neigh_table, &init_net, &fld.daddr); in dn_route_output_slow()
1074 if (neigh) { in dn_route_output_slow()
1076 (neigh->dev->ifindex != oldflp->flowidn_oif)) || in dn_route_output_slow()
1078 (!dn_dev_islocal(neigh->dev, in dn_route_output_slow()
1080 neigh_release(neigh); in dn_route_output_slow()
1081 neigh = NULL; in dn_route_output_slow()
1085 if (dn_dev_islocal(neigh->dev, fld.daddr)) { in dn_route_output_slow()
1089 dev_out = neigh->dev; in dn_route_output_slow()
1115 neigh = neigh_clone(dn_db->router); in dn_route_output_slow()
[all …]
/Linux-v5.10/net/core/
Dneighbour.c57 static void neigh_update_notify(struct neighbour *neigh, u32 nlmsg_pid);
93 static int neigh_blackhole(struct neighbour *neigh, struct sk_buff *skb) in neigh_blackhole() argument
99 static void neigh_cleanup_and_release(struct neighbour *neigh) in neigh_cleanup_and_release() argument
101 trace_neigh_cleanup_and_release(neigh, 0); in neigh_cleanup_and_release()
102 __neigh_notify(neigh, RTM_DELNEIGH, 0, 0); in neigh_cleanup_and_release()
103 call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); in neigh_cleanup_and_release()
104 neigh_release(neigh); in neigh_cleanup_and_release()
155 static bool neigh_update_ext_learned(struct neighbour *neigh, u32 flags, in neigh_update_ext_learned() argument
165 if ((neigh->flags ^ ndm_flags) & NTF_EXT_LEARNED) { in neigh_update_ext_learned()
167 neigh->flags |= NTF_EXT_LEARNED; in neigh_update_ext_learned()
[all …]
/Linux-v5.10/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.10/drivers/infiniband/ulp/ipoib/
Dipoib_main.c748 struct ipoib_neigh *neigh, *tn; in path_rec_completion() local
804 list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { in path_rec_completion()
805 if (neigh->ah) { in path_rec_completion()
806 WARN_ON(neigh->ah != old_ah); in path_rec_completion()
814 ipoib_put_ah(neigh->ah); in path_rec_completion()
817 neigh->ah = path->ah; in path_rec_completion()
819 if (ipoib_cm_enabled(dev, neigh->daddr)) { in path_rec_completion()
820 if (!ipoib_cm_get(neigh)) in path_rec_completion()
821 ipoib_cm_set(neigh, ipoib_cm_create_tx(dev, in path_rec_completion()
823 neigh)); in path_rec_completion()
[all …]
Dipoib.h250 struct ipoib_neigh *neigh; member
465 void ipoib_neigh_dtor(struct ipoib_neigh *neigh);
466 static inline void ipoib_neigh_put(struct ipoib_neigh *neigh) in ipoib_neigh_put() argument
468 if (atomic_dec_and_test(&neigh->refcnt)) in ipoib_neigh_put()
469 ipoib_neigh_dtor(neigh); in ipoib_neigh_put()
474 void ipoib_neigh_free(struct ipoib_neigh *neigh);
638 static inline int ipoib_cm_up(struct ipoib_neigh *neigh) in ipoib_cm_up() argument
641 return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags); in ipoib_cm_up()
644 static inline struct ipoib_cm_tx *ipoib_cm_get(struct ipoib_neigh *neigh) in ipoib_cm_get() argument
646 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()
1259 struct ipoib_neigh *neigh; in ipoib_cm_tx_handler() local
1281 neigh = tx->neigh; in ipoib_cm_tx_handler()
[all …]
Dipoib_multicast.c809 struct ipoib_neigh *neigh; in ipoib_mcast_send() local
812 neigh = ipoib_neigh_get(dev, daddr); in ipoib_mcast_send()
814 if (!neigh) { in ipoib_mcast_send()
815 neigh = ipoib_neigh_alloc(daddr, dev); in ipoib_mcast_send()
819 if (neigh && list_empty(&neigh->list)) { in ipoib_mcast_send()
821 neigh->ah = mcast->ah; in ipoib_mcast_send()
822 neigh->ah->valid = 1; in ipoib_mcast_send()
823 list_add_tail(&neigh->list, &mcast->neigh_list); in ipoib_mcast_send()
829 if (neigh) in ipoib_mcast_send()
830 ipoib_neigh_put(neigh); in ipoib_mcast_send()
/Linux-v5.10/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.10/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 …]
Dl2t.h78 struct neighbour *neigh; /* associated neighbour */ member
113 struct l2t_entry *cxgb4_l2t_get(struct l2t_data *d, struct neighbour *neigh,
120 void t4_l2t_update(struct adapter *adap, struct neighbour *neigh);
/Linux-v5.10/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.10/net/batman-adv/
Dbat_v_elp.c66 static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_get_throughput() argument
68 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput()
94 ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo); in batadv_v_elp_get_throughput()
165 struct batadv_hardif_neigh_node *neigh; in batadv_v_elp_throughput_metric_update() local
169 neigh = container_of(neigh_bat_v, struct batadv_hardif_neigh_node, in batadv_v_elp_throughput_metric_update()
172 ewma_throughput_add(&neigh->bat_v.throughput, in batadv_v_elp_throughput_metric_update()
173 batadv_v_elp_get_throughput(neigh)); in batadv_v_elp_throughput_metric_update()
178 batadv_hardif_neigh_put(neigh); in batadv_v_elp_throughput_metric_update()
193 batadv_v_elp_wifi_neigh_probe(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_wifi_neigh_probe() argument
195 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_wifi_neigh_probe()
[all …]
Doriginator.c443 batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_get() argument
450 hlist_for_each_entry_rcu(tmp_neigh_ifinfo, &neigh->ifinfo_list, in batadv_neigh_ifinfo_get()
478 batadv_neigh_ifinfo_new(struct batadv_neigh_node *neigh, in batadv_neigh_ifinfo_new() argument
483 spin_lock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new()
485 neigh_ifinfo = batadv_neigh_ifinfo_get(neigh, if_outgoing); in batadv_neigh_ifinfo_new()
501 hlist_add_head_rcu(&neigh_ifinfo->list, &neigh->ifinfo_list); in batadv_neigh_ifinfo_new()
504 spin_unlock_bh(&neigh->ifinfo_lock); in batadv_neigh_ifinfo_new()
582 if (bat_priv->algo_ops->neigh.hardif_init) in batadv_hardif_neigh_create()
583 bat_priv->algo_ops->neigh.hardif_init(hardif_neigh); in batadv_hardif_neigh_create()
761 if (!bat_priv->algo_ops->neigh.print) { in batadv_hardif_neigh_seq_print_text()
[all …]
Doriginator.h41 batadv_neigh_ifinfo_new(struct batadv_neigh_node *neigh,
44 batadv_neigh_ifinfo_get(struct batadv_neigh_node *neigh,
/Linux-v5.10/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.10/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.10/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.10/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.10/drivers/infiniband/hw/qedr/
Dqedr_iw_cm.c446 struct neighbour *neigh = NULL; in qedr_addr4_resolve() local
456 neigh = dst_neigh_lookup(&rt->dst, &dst_ip); in qedr_addr4_resolve()
458 if (neigh) { in qedr_addr4_resolve()
460 if (neigh->nud_state & NUD_VALID) { in qedr_addr4_resolve()
461 ether_addr_copy(dst_mac, neigh->ha); in qedr_addr4_resolve()
464 neigh_event_send(neigh, NULL); in qedr_addr4_resolve()
467 neigh_release(neigh); in qedr_addr4_resolve()
480 struct neighbour *neigh = NULL; in qedr_addr6_resolve() local
500 neigh = dst_neigh_lookup(dst, &fl6.daddr); in qedr_addr6_resolve()
501 if (neigh) { in qedr_addr6_resolve()
[all …]
/Linux-v5.10/tools/testing/selftests/net/forwarding/
Dvxlan_asymmetric.sh117 ip neigh replace $gw_ip lladdr 00:00:5e:00:01:01 nud permanent \
131 ip neigh del $gw_ip dev $if_name
414 ip neigh add $ip1 lladdr $mac1 nud noarp dev vlan10 \
416 ip neigh add $ip2 lladdr $mac2 nud noarp dev vlan20 \
488 ip neigh del 10.1.1.102 dev vlan10
489 ip neigh del 10.1.2.102 dev vlan20
493 ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \
495 ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \
532 ip neigh del 10.1.1.102 dev vlan10
545 ip neigh del 10.1.1.102 dev vlan10 &> /dev/null
[all …]
/Linux-v5.10/lib/
Dcpu_rmap.c97 int neigh; in cpu_rmap_copy_neigh() local
99 for_each_cpu(neigh, mask) { in cpu_rmap_copy_neigh()
101 rmap->near[neigh].dist <= dist) { in cpu_rmap_copy_neigh()
102 rmap->near[cpu].index = rmap->near[neigh].index; in cpu_rmap_copy_neigh()

1234