Home
last modified time | relevance | path

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

123

/Linux-v5.4/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.4/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.c957 struct neighbour *neigh = NULL; in dn_route_output_slow() local
1069 neigh = neigh_lookup_nodev(&dn_neigh_table, &init_net, &fld.daddr); in dn_route_output_slow()
1070 if (neigh) { in dn_route_output_slow()
1072 (neigh->dev->ifindex != oldflp->flowidn_oif)) || in dn_route_output_slow()
1074 (!dn_dev_islocal(neigh->dev, in dn_route_output_slow()
1076 neigh_release(neigh); in dn_route_output_slow()
1077 neigh = NULL; in dn_route_output_slow()
1081 if (dn_dev_islocal(neigh->dev, fld.daddr)) { in dn_route_output_slow()
1085 dev_out = neigh->dev; in dn_route_output_slow()
1111 neigh = neigh_clone(dn_db->router); in dn_route_output_slow()
[all …]
/Linux-v5.4/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 if (neigh->parms->neigh_cleanup) in neigh_cleanup_and_release()
102 neigh->parms->neigh_cleanup(neigh); in neigh_cleanup_and_release()
104 trace_neigh_cleanup_and_release(neigh, 0); in neigh_cleanup_and_release()
105 __neigh_notify(neigh, RTM_DELNEIGH, 0, 0); in neigh_cleanup_and_release()
106 call_netevent_notifiers(NETEVENT_NEIGH_UPDATE, neigh); in neigh_cleanup_and_release()
107 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
[all …]
/Linux-v5.4/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.4/drivers/infiniband/ulp/ipoib/
Dipoib_main.c750 struct ipoib_neigh *neigh, *tn; in path_rec_completion() local
806 list_for_each_entry_safe(neigh, tn, &path->neigh_list, list) { in path_rec_completion()
807 if (neigh->ah) { in path_rec_completion()
808 WARN_ON(neigh->ah != old_ah); in path_rec_completion()
816 ipoib_put_ah(neigh->ah); in path_rec_completion()
819 neigh->ah = path->ah; in path_rec_completion()
821 if (ipoib_cm_enabled(dev, neigh->daddr)) { in path_rec_completion()
822 if (!ipoib_cm_get(neigh)) in path_rec_completion()
823 ipoib_cm_set(neigh, ipoib_cm_create_tx(dev, in path_rec_completion()
825 neigh)); in path_rec_completion()
[all …]
Dipoib.h250 struct ipoib_neigh *neigh; member
461 void ipoib_neigh_dtor(struct ipoib_neigh *neigh);
462 static inline void ipoib_neigh_put(struct ipoib_neigh *neigh) in ipoib_neigh_put() argument
464 if (atomic_dec_and_test(&neigh->refcnt)) in ipoib_neigh_put()
465 ipoib_neigh_dtor(neigh); in ipoib_neigh_put()
470 void ipoib_neigh_free(struct ipoib_neigh *neigh);
634 static inline int ipoib_cm_up(struct ipoib_neigh *neigh) in ipoib_cm_up() argument
637 return test_bit(IPOIB_FLAG_OPER_UP, &neigh->cm->flags); in ipoib_cm_up()
640 static inline struct ipoib_cm_tx *ipoib_cm_get(struct ipoib_neigh *neigh) in ipoib_cm_get() argument
642 return neigh->cm; in ipoib_cm_get()
[all …]
Dipoib_cm.c832 struct ipoib_neigh *neigh; in ipoib_cm_handle_tx_wc() local
848 neigh = tx->neigh; in ipoib_cm_handle_tx_wc()
850 if (neigh) { in ipoib_cm_handle_tx_wc()
851 neigh->cm = NULL; in ipoib_cm_handle_tx_wc()
852 ipoib_neigh_free(neigh); in ipoib_cm_handle_tx_wc()
854 tx->neigh = NULL; in ipoib_cm_handle_tx_wc()
1033 if (p->neigh) in ipoib_cm_rep_handler()
1034 while ((skb = __skb_dequeue(&p->neigh->queue))) in ipoib_cm_rep_handler()
1256 struct ipoib_neigh *neigh; in ipoib_cm_tx_handler() local
1278 neigh = tx->neigh; in ipoib_cm_tx_handler()
[all …]
/Linux-v5.4/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);
215 static bool arp_key_eq(const struct neighbour *neigh, const void *pkey) in arp_key_eq() argument
217 return neigh_key_eq32(neigh, pkey); in arp_key_eq()
220 static int arp_constructor(struct neighbour *neigh) in arp_constructor() argument
223 struct net_device *dev = neigh->dev; in arp_constructor()
229 memcpy(neigh->primary_key, &inaddr_any, arp_tbl.key_len); in arp_constructor()
231 addr = *(__be32 *)neigh->primary_key; in arp_constructor()
239 neigh->type = inet_addr_type_dev_table(dev_net(dev), dev, addr); in arp_constructor()
[all …]
/Linux-v5.4/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()
357 if (e->neigh) { in _t4_l2e_free()
358 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.4/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);
322 static int ndisc_constructor(struct neighbour *neigh) in ndisc_constructor() argument
324 struct in6_addr *addr = (struct in6_addr *)&neigh->primary_key; in ndisc_constructor()
325 struct net_device *dev = neigh->dev; in ndisc_constructor()
336 __neigh_parms_put(neigh->parms); in ndisc_constructor()
337 neigh->parms = neigh_parms_clone(parms); in ndisc_constructor()
339 neigh->type = is_multicast ? RTN_MULTICAST : RTN_UNICAST; in ndisc_constructor()
[all …]
/Linux-v5.4/net/batman-adv/
Dbat_v_elp.c65 static u32 batadv_v_elp_get_throughput(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_get_throughput() argument
67 struct batadv_hard_iface *hard_iface = neigh->if_incoming; in batadv_v_elp_get_throughput()
93 ret = cfg80211_get_station(real_netdev, neigh->addr, &sinfo); in batadv_v_elp_get_throughput()
170 struct batadv_hardif_neigh_node *neigh; in batadv_v_elp_throughput_metric_update() local
174 neigh = container_of(neigh_bat_v, struct batadv_hardif_neigh_node, in batadv_v_elp_throughput_metric_update()
177 ewma_throughput_add(&neigh->bat_v.throughput, in batadv_v_elp_throughput_metric_update()
178 batadv_v_elp_get_throughput(neigh)); in batadv_v_elp_throughput_metric_update()
183 batadv_hardif_neigh_put(neigh); in batadv_v_elp_throughput_metric_update()
198 batadv_v_elp_wifi_neigh_probe(struct batadv_hardif_neigh_node *neigh) in batadv_v_elp_wifi_neigh_probe() argument
200 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 …]
/Linux-v5.4/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);
423 static inline void neigh_release(struct neighbour *neigh) in neigh_release() argument
425 if (refcount_dec_and_test(&neigh->refcnt)) in neigh_release()
426 neigh_destroy(neigh); in neigh_release()
[all …]
Dndisc.h210 struct neighbour *neigh, u8 *ha_buf,
266 struct neighbour *neigh, in ndisc_ops_redirect_opt_addr_space() argument
271 neigh, ha_buf, ha); in ndisc_ops_redirect_opt_addr_space()
342 struct neighbour *neigh, in ndisc_redirect_opt_addr_space() argument
348 ndisc_ops_redirect_opt_addr_space(dev, neigh, ops_data_buf, in ndisc_redirect_opt_addr_space()
444 struct neighbour *neigh; in ip_neigh_gw6() local
446 neigh = __ipv6_neigh_lookup_noref_stub(dev, addr); in ip_neigh_gw6()
447 if (unlikely(!neigh)) in ip_neigh_gw6()
448 neigh = __neigh_create(ipv6_stub->nd_tbl, addr, dev, false); in ip_neigh_gw6()
450 return neigh; in ip_neigh_gw6()
[all …]
Droute.h360 struct neighbour *neigh; in ip_neigh_gw4() local
362 neigh = __ipv4_neigh_lookup_noref(dev, daddr); in ip_neigh_gw4()
363 if (unlikely(!neigh)) in ip_neigh_gw4()
364 neigh = __neigh_create(&arp_tbl, &daddr, dev, false); in ip_neigh_gw4()
366 return neigh; in ip_neigh_gw4()
374 struct neighbour *neigh; in ip_neigh_for_gw() local
377 neigh = ip_neigh_gw4(dev, rt->rt_gw4); in ip_neigh_for_gw()
379 neigh = ip_neigh_gw6(dev, &rt->rt_gw6); in ip_neigh_for_gw()
382 neigh = ip_neigh_gw4(dev, ip_hdr(skb)->daddr); in ip_neigh_for_gw()
384 return neigh; in ip_neigh_for_gw()
/Linux-v5.4/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.4/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.4/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.4/drivers/infiniband/hw/qedr/
Dqedr_iw_cm.c407 struct neighbour *neigh = NULL; in qedr_addr4_resolve() local
417 neigh = dst_neigh_lookup(&rt->dst, &dst_ip); in qedr_addr4_resolve()
419 if (neigh) { in qedr_addr4_resolve()
421 if (neigh->nud_state & NUD_VALID) { in qedr_addr4_resolve()
422 ether_addr_copy(dst_mac, neigh->ha); in qedr_addr4_resolve()
425 neigh_event_send(neigh, NULL); in qedr_addr4_resolve()
428 neigh_release(neigh); in qedr_addr4_resolve()
441 struct neighbour *neigh = NULL; in qedr_addr6_resolve() local
461 neigh = dst_neigh_lookup(dst, &fl6.daddr); in qedr_addr6_resolve()
462 if (neigh) { in qedr_addr6_resolve()
[all …]
/Linux-v5.4/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
404 ip neigh add $ip1 lladdr $mac1 nud noarp dev vlan10 \
406 ip neigh add $ip2 lladdr $mac2 nud noarp dev vlan20 \
478 ip neigh del 10.1.1.102 dev vlan10
479 ip neigh del 10.1.2.102 dev vlan20
483 ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \
485 ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \
522 ip neigh del 10.1.1.102 dev vlan10
535 ip neigh del 10.1.1.102 dev vlan10 &> /dev/null
[all …]
/Linux-v5.4/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()
/Linux-v5.4/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_span.c113 struct neighbour *neigh = neigh_lookup(tbl, pkey, dev); in mlxsw_sp_span_dmac() local
116 if (!neigh) { in mlxsw_sp_span_dmac()
117 neigh = neigh_create(tbl, pkey, dev); in mlxsw_sp_span_dmac()
118 if (IS_ERR(neigh)) in mlxsw_sp_span_dmac()
119 return PTR_ERR(neigh); in mlxsw_sp_span_dmac()
122 neigh_event_send(neigh, NULL); in mlxsw_sp_span_dmac()
124 read_lock_bh(&neigh->lock); in mlxsw_sp_span_dmac()
125 if ((neigh->nud_state & NUD_VALID) && !neigh->dead) in mlxsw_sp_span_dmac()
126 memcpy(dmac, neigh->ha, ETH_ALEN); in mlxsw_sp_span_dmac()
129 read_unlock_bh(&neigh->lock); in mlxsw_sp_span_dmac()
[all …]
/Linux-v5.4/tools/testing/selftests/net/
Dfib_nexthops.sh806 $IP neigh sh | grep -q "${lladdr} dev veth1"
809 $IP neigh sh | grep 'dev veth1'
812 $IP neigh sh | grep -q "172.16.101.1 dev eth1"
815 $IP neigh sh | grep 'dev veth1'
834 $IP neigh sh | grep -q "${lladdr} dev veth1"
837 $IP neigh sh | grep 'dev veth1'
840 $IP neigh sh | grep -q "172.16.101.1 dev eth1"
843 $IP neigh sh | grep 'dev veth1'

123