Skip to content

Commit 5cde39e

Browse files
idoschPaolo Abeni
authored andcommitted
vxlan: Rename FDB Tx lookup function
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]>
1 parent 54f4518 commit 5cde39e

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
@@ -429,8 +429,8 @@ static struct vxlan_fdb *__vxlan_find_mac(struct vxlan_dev *vxlan,
429429
return NULL;
430430
}
431431

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

@@ -1897,7 +1897,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
18971897
}
18981898

18991899
rcu_read_lock();
1900-
f = vxlan_find_mac(vxlan, n->ha, vni);
1900+
f = vxlan_find_mac_tx(vxlan, n->ha, vni);
19011901
if (f && vxlan_addr_any(&(first_remote_rcu(f)->remote_ip))) {
19021902
/* bridge-local neighbor */
19031903
neigh_release(n);
@@ -2063,7 +2063,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
20632063
goto out;
20642064
}
20652065

2066-
f = vxlan_find_mac(vxlan, n->ha, vni);
2066+
f = vxlan_find_mac_tx(vxlan, n->ha, vni);
20672067
if (f && vxlan_addr_any(&(first_remote_rcu(f)->remote_ip))) {
20682068
/* bridge-local neighbor */
20692069
neigh_release(n);
@@ -2762,19 +2762,19 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
27622762

27632763
eth = eth_hdr(skb);
27642764
rcu_read_lock();
2765-
f = vxlan_find_mac(vxlan, eth->h_dest, vni);
2765+
f = vxlan_find_mac_tx(vxlan, eth->h_dest, vni);
27662766
did_rsc = false;
27672767

27682768
if (f && (f->flags & NTF_ROUTER) && (vxlan->cfg.flags & VXLAN_F_RSC) &&
27692769
(ntohs(eth->h_proto) == ETH_P_IP ||
27702770
ntohs(eth->h_proto) == ETH_P_IPV6)) {
27712771
did_rsc = route_shortcircuit(dev, skb);
27722772
if (did_rsc)
2773-
f = vxlan_find_mac(vxlan, eth->h_dest, vni);
2773+
f = vxlan_find_mac_tx(vxlan, eth->h_dest, vni);
27742774
}
27752775

27762776
if (f == NULL) {
2777-
f = vxlan_find_mac(vxlan, all_zeros_mac, vni);
2777+
f = vxlan_find_mac_tx(vxlan, all_zeros_mac, vni);
27782778
if (f == NULL) {
27792779
if ((vxlan->cfg.flags & VXLAN_F_L2MISS) &&
27802780
!is_multicast_ether_addr(eth->h_dest))

0 commit comments

Comments
 (0)