From 3b3c26cb56c66445bc83ee1fd32b4b28ca8c5766 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Mon, 9 Sep 2024 17:07:09 +0200 Subject: [PATCH] UBUNTU: SAUCE: fan: fix racy device stat update BugLink: https://bugs.launchpad.net/bugs/2064176 Let's use a proper API to increase netdevice's tx_dropped statistics. Since upstream commit 6dee402daba4eb ("vxlan: Fix racy device stats updates.") we have to use dev_core_stats_tx_dropped_inc() function for that. This one was found while I was debugging an original issues from LP bug #2064176 and was reviewing a whole Ubuntu FAN implementation. Signed-off-by: Alexander Mikhalitsyn Acked-by: Mehmet Basaran Acked-by: Stefan Bader Signed-off-by: Roxana Nicolescu --- drivers/net/vxlan/vxlan_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c index 65219c68d6d2..e0c39f809aa6 100644 --- a/drivers/net/vxlan/vxlan_core.c +++ b/drivers/net/vxlan/vxlan_core.c @@ -2923,7 +2923,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev) netdev_dbg(vxlan->dev, "vxlan_xmit p %x d %pM\n", eth->h_proto, eth->h_dest); if (vxlan_fan_build_rdst(vxlan, skb, &fan_rdst)) { - dev->stats.tx_dropped++; + dev_core_stats_tx_dropped_inc(dev); kfree_skb(skb); return NETDEV_TX_OK; }