Skip to content

Commit 317122c

Browse files
idoschgregkh
authored andcommitted
vxlan: Rename FDB Tx lookup function
[ Upstream commit 5cde39e ] vxlan_find_mac() is only expected to be called from the Tx path as it updates the 'used' timestamp. Rename it to vxlan_find_mac_tx() to reflect that and to avoid incorrect updates of this timestamp like those addressed by commit 9722f83 ("vxlan: Avoid unnecessary updates to FDB 'used' time"). No functional changes intended. Reviewed-by: Petr Machata <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Link: https://patch.msgid.link/[email protected] Reviewed-by: Nikolay Aleksandrov <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Stable-dep-of: 1f5d2fd ("vxlan: Fix NPD in {arp,neigh}_reduce() when using nexthop objects") Signed-off-by: Sasha Levin <[email protected]>
1 parent 02bebe7 commit 317122c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/net/vxlan/vxlan_core.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ static struct vxlan_fdb *__vxlan_find_mac(struct vxlan_dev *vxlan,
428428
return NULL;
429429
}
430430

431-
static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
432-
const u8 *mac, __be32 vni)
431+
static struct vxlan_fdb *vxlan_find_mac_tx(struct vxlan_dev *vxlan,
432+
const u8 *mac, __be32 vni)
433433
{
434434
struct vxlan_fdb *f;
435435

@@ -1910,7 +1910,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
19101910
}
19111911

19121912
rcu_read_lock();
1913-
f = vxlan_find_mac(vxlan, n->ha, vni);
1913+
f = vxlan_find_mac_tx(vxlan, n->ha, vni);
19141914
if (f && vxlan_addr_any(&(first_remote_rcu(f)->remote_ip))) {
19151915
/* bridge-local neighbor */
19161916
neigh_release(n);
@@ -2076,7 +2076,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
20762076
goto out;
20772077
}
20782078

2079-
f = vxlan_find_mac(vxlan, n->ha, vni);
2079+
f = vxlan_find_mac_tx(vxlan, n->ha, vni);
20802080
if (f && vxlan_addr_any(&(first_remote_rcu(f)->remote_ip))) {
20812081
/* bridge-local neighbor */
20822082
neigh_release(n);
@@ -2766,19 +2766,19 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
27662766

27672767
eth = eth_hdr(skb);
27682768
rcu_read_lock();
2769-
f = vxlan_find_mac(vxlan, eth->h_dest, vni);
2769+
f = vxlan_find_mac_tx(vxlan, eth->h_dest, vni);
27702770
did_rsc = false;
27712771

27722772
if (f && (f->flags & NTF_ROUTER) && (vxlan->cfg.flags & VXLAN_F_RSC) &&
27732773
(ntohs(eth->h_proto) == ETH_P_IP ||
27742774
ntohs(eth->h_proto) == ETH_P_IPV6)) {
27752775
did_rsc = route_shortcircuit(dev, skb);
27762776
if (did_rsc)
2777-
f = vxlan_find_mac(vxlan, eth->h_dest, vni);
2777+
f = vxlan_find_mac_tx(vxlan, eth->h_dest, vni);
27782778
}
27792779

27802780
if (f == NULL) {
2781-
f = vxlan_find_mac(vxlan, all_zeros_mac, vni);
2781+
f = vxlan_find_mac_tx(vxlan, all_zeros_mac, vni);
27822782
if (f == NULL) {
27832783
if ((vxlan->cfg.flags & VXLAN_F_L2MISS) &&
27842784
!is_multicast_ether_addr(eth->h_dest))

0 commit comments

Comments
 (0)