* [PATCH net-next] net: reorganize IP MIB values (II)
@ 2025-03-20 10:14 Eric Dumazet
2025-03-25 15:00 ` patchwork-bot+netdevbpf
2025-12-11 23:38 ` Thomas Haller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2025-03-20 10:14 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet, Eric Dumazet
Commit 14a196807482 ("net: reorganize IP MIB values") changed
MIB values to group hot fields together.
Since then 5 new fields have been added without caring about
data locality.
This patch moves IPSTATS_MIB_OUTPKTS, IPSTATS_MIB_NOECTPKTS,
IPSTATS_MIB_ECT1PKTS, IPSTATS_MIB_ECT0PKTS, IPSTATS_MIB_CEPKTS
to the hot portion of per-cpu data.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
include/uapi/linux/snmp.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/uapi/linux/snmp.h b/include/uapi/linux/snmp.h
index eb9fb776fdc3e50c2ecfc6b36d5472f8f65b5985..ec47f9b68a1bfb1908f2197555c876424481ab1c 100644
--- a/include/uapi/linux/snmp.h
+++ b/include/uapi/linux/snmp.h
@@ -23,9 +23,14 @@ enum
IPSTATS_MIB_INPKTS, /* InReceives */
IPSTATS_MIB_INOCTETS, /* InOctets */
IPSTATS_MIB_INDELIVERS, /* InDelivers */
- IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */
+ IPSTATS_MIB_NOECTPKTS, /* InNoECTPkts */
+ IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */
+ IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */
+ IPSTATS_MIB_CEPKTS, /* InCEPkts */
IPSTATS_MIB_OUTREQUESTS, /* OutRequests */
+ IPSTATS_MIB_OUTPKTS, /* OutTransmits */
IPSTATS_MIB_OUTOCTETS, /* OutOctets */
+ IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */
/* other fields */
IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */
IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */
@@ -52,12 +57,7 @@ enum
IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
- IPSTATS_MIB_NOECTPKTS, /* InNoECTPkts */
- IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */
- IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */
- IPSTATS_MIB_CEPKTS, /* InCEPkts */
IPSTATS_MIB_REASM_OVERLAPS, /* ReasmOverlaps */
- IPSTATS_MIB_OUTPKTS, /* OutTransmits */
__IPSTATS_MIB_MAX
};
--
2.49.0.rc1.451.g8f38331e32-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: reorganize IP MIB values (II)
2025-03-20 10:14 [PATCH net-next] net: reorganize IP MIB values (II) Eric Dumazet
@ 2025-03-25 15:00 ` patchwork-bot+netdevbpf
2025-12-11 23:38 ` Thomas Haller
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-03-25 15:00 UTC (permalink / raw)
To: Eric Dumazet; +Cc: davem, kuba, pabeni, horms, netdev, eric.dumazet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 20 Mar 2025 10:14:34 +0000 you wrote:
> Commit 14a196807482 ("net: reorganize IP MIB values") changed
> MIB values to group hot fields together.
>
> Since then 5 new fields have been added without caring about
> data locality.
>
> This patch moves IPSTATS_MIB_OUTPKTS, IPSTATS_MIB_NOECTPKTS,
> IPSTATS_MIB_ECT1PKTS, IPSTATS_MIB_ECT0PKTS, IPSTATS_MIB_CEPKTS
> to the hot portion of per-cpu data.
>
> [...]
Here is the summary with links:
- [net-next] net: reorganize IP MIB values (II)
https://git.kernel.org/netdev/net-next/c/652e2c777862
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: reorganize IP MIB values (II)
2025-03-20 10:14 [PATCH net-next] net: reorganize IP MIB values (II) Eric Dumazet
2025-03-25 15:00 ` patchwork-bot+netdevbpf
@ 2025-12-11 23:38 ` Thomas Haller
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Haller @ 2025-12-11 23:38 UTC (permalink / raw)
To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
Cc: Simon Horman, netdev, eric.dumazet
On Thu, 2025-03-20 at 10:14 +0000, Eric Dumazet wrote:
> Commit 14a196807482 ("net: reorganize IP MIB values") changed
> MIB values to group hot fields together.
>
> Since then 5 new fields have been added without caring about
> data locality.
>
> This patch moves IPSTATS_MIB_OUTPKTS, IPSTATS_MIB_NOECTPKTS,
> IPSTATS_MIB_ECT1PKTS, IPSTATS_MIB_ECT0PKTS, IPSTATS_MIB_CEPKTS
> to the hot portion of per-cpu data.
Hi,
the patch
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=652e2c777862c869966082fec98174640ab20dc9
reorders the enum values in the user space header.
It's not only done by this patch, for example also
b4a11b2033b7d3dfdd46592f7036a775b18cecd1.
Similarly, the `LINUX_MIB_*` enums keep changing.
This seems problematic to me. For example, iproute2 does:
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/tree/lib/utils.c?id=24a5a424e3a0b3d85dd035540d874dd769ecb2d3#n1536
which only works as long as the kernel headers (at compile time) are in
sync with the running kernel. That is often not the case, for example
with containers.
libnl3 also is affected and tries to (badly) workaround this:
https://github.com/thom311/libnl/commit/5981a39583ab65dca230a8ee70625626d9ec9fc8
How do you suggest should API users handle this? In the future, would
it be possible to keep the API stable and backward compatible?
Thank you,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-11 23:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-20 10:14 [PATCH net-next] net: reorganize IP MIB values (II) Eric Dumazet
2025-03-25 15:00 ` patchwork-bot+netdevbpf
2025-12-11 23:38 ` Thomas Haller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).