[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220428111903.5f4304e0@canb.auug.org.au>
Date: Thu, 28 Apr 2022 11:19:03 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: David Miller <davem@...emloft.net>,
Networking <netdev@...r.kernel.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
Jeffrey Ji <jeffreyji@...gle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: linux-next: manual merge of the net-next tree with the net tree
Hi all,
Today's linux-next merge of the net-next tree got conflicts in:
include/linux/netdevice.h
net/core/dev.c
between commit:
6510ea973d8d ("net: Use this_cpu_inc() to increment net->core_stats")
from the net tree and commit:
794c24e9921f ("net-core: rx_otherhost_dropped to core_stats")
from the net-next tree.
I fixed it up (hopefully - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc include/linux/netdevice.h
index b1fbe21650bb,ac8a5f71220a..000000000000
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@@ -199,10 -200,11 +200,11 @@@ struct net_device_stats
* Try to fit them in a single cache line, for dev_get_stats() sake.
*/
struct net_device_core_stats {
- local_t rx_dropped;
- local_t tx_dropped;
- local_t rx_nohandler;
- local_t rx_otherhost_dropped;
-} __aligned(4 * sizeof(local_t));
+ unsigned long rx_dropped;
+ unsigned long tx_dropped;
+ unsigned long rx_nohandler;
++ unsigned long rx_otherhost_dropped;
+} __aligned(4 * sizeof(unsigned long));
#include <linux/cache.h>
#include <linux/skbuff.h>
diff --cc net/core/dev.c
index 1461c2d9dec8,611bd7197064..000000000000
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@@ -10352,9 -10409,10 +10405,10 @@@ struct rtnl_link_stats64 *dev_get_stats
for_each_possible_cpu(i) {
core_stats = per_cpu_ptr(p, i);
- storage->rx_dropped += local_read(&core_stats->rx_dropped);
- storage->tx_dropped += local_read(&core_stats->tx_dropped);
- storage->rx_nohandler += local_read(&core_stats->rx_nohandler);
- storage->rx_otherhost_dropped += local_read(&core_stats->rx_otherhost_dropped);
+ storage->rx_dropped += READ_ONCE(core_stats->rx_dropped);
+ storage->tx_dropped += READ_ONCE(core_stats->tx_dropped);
+ storage->rx_nohandler += READ_ONCE(core_stats->rx_nohandler);
++ storage->rx_otherhost_dropped += READ_ONCE(&core_stats->rx_otherhost_dropped);
}
}
return storage;
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists