Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] ipvlan/macvlan: fix local RX byte accounting
@ 2026-11-12  2:56 Xia Yan
  2026-11-12  2:56 ` [PATCH net-next v2 1/2] ipvlan: fix RX byte accounting for local traffic Xia Yan
  2026-11-12  2:56 ` [PATCH net-next v2 2/2] macvlan: fix RX byte accounting for local broadcast and multicast Xia Yan
  0 siblings, 2 replies; 6+ messages in thread
From: Xia Yan @ 2026-11-12  2:56 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, maheshb, arnd,
	kaber, dskr99, linux-kernel, yana06070

Both ipvlan and macvlan count the Ethernet header twice for some
traffic between virtual devices sharing one lower device.

Patch 1 fixes ipvlan local unicast, broadcast and multicast RX
accounting. Patch 2 fixes macvlan bridge-mode local broadcast and
multicast RX accounting. The lower-device receive paths retain
their existing Ethernet-header adjustment.

Tested in UML on net-next 368fbf5d82da with IPv4 and IPv6 UDP
traffic: 26 ipvlan cases and 20 macvlan cases. The corrected byte
counts match the received Ethernet frame lengths. The external
RX cases and macvlan local unicast cases retain their counts.

The ipvlan fix was first submitted to net. This v2 targets net-next
and adds the macvlan fix as Eric suggested. Cc: stable is dropped.

Changes since v1:
- Target net-next and drop Cc: stable.
- Add the macvlan local broadcast and multicast accounting fix.

v1: https://lore.kernel.org/netdev/20261025014251.542973-1-yanxia@cmss.chinamobile.com/
Review: https://lore.kernel.org/netdev/CAL4WiioxAR1ZBjVJNgYfLM0hUwyHapRu+TAUzedpOpe0yheH3w@mail.gmail.com/

Xia Yan (2):
  ipvlan: fix RX byte accounting for local traffic
  macvlan: fix RX byte accounting for local broadcast and multicast

 drivers/net/ipvlan/ipvlan_core.c | 4 ++--
 drivers/net/macvlan.c            | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)


base-commit: 368fbf5d82da9ebce309449c74fc0b128f7d0219



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-18 17:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12  2:56 [PATCH net-next v2 0/2] ipvlan/macvlan: fix local RX byte accounting Xia Yan
2026-11-12  2:56 ` [PATCH net-next v2 1/2] ipvlan: fix RX byte accounting for local traffic Xia Yan
2026-11-18 17:43   ` Simon Horman
2026-11-12  2:56 ` [PATCH net-next v2 2/2] macvlan: fix RX byte accounting for local broadcast and multicast Xia Yan
2026-11-18 17:43   ` Simon Horman
2026-11-18 17:48   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox