From 4d59a2c9b9e647626ef4dbe0031e388f1b5f7c51 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 19 Sep 2023 12:22:58 +0000 Subject: [PATCH] Revert "ip_tunnels: use DEV_STATS_INC()" This reverts commit 62c363e6041c7884dc9f27574492a3c9e33845e1 which is commit 9b271ebaf9a2c5c566a54bc6cd915962e8241130 upstream. It breaks the build due to a previous commit that was reverted for Android ABI issues. If this needs to be added, it can be done so in the future in an abi-safe way. Bug: 161946584 Change-Id: I016ca3ddfafde35fe1b91876d3e9536fdbd00320 Signed-off-by: Greg Kroah-Hartman --- include/net/ip_tunnels.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/include/net/ip_tunnels.h b/include/net/ip_tunnels.h index 36376f8b84da..8d063e23aa40 100644 --- a/include/net/ip_tunnels.h +++ b/include/net/ip_tunnels.h @@ -449,14 +449,15 @@ static inline void iptunnel_xmit_stats(struct net_device *dev, int pkt_len) tstats->tx_packets++; u64_stats_update_end(&tstats->syncp); put_cpu_ptr(tstats); - return; - } - - if (pkt_len < 0) { - DEV_STATS_INC(dev, tx_errors); - DEV_STATS_INC(dev, tx_aborted_errors); } else { - DEV_STATS_INC(dev, tx_dropped); + struct net_device_stats *err_stats = &dev->stats; + + if (pkt_len < 0) { + err_stats->tx_errors++; + err_stats->tx_aborted_errors++; + } else { + err_stats->tx_dropped++; + } } }