public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH RFC net-next 0/4] improve hw flow offload byte accounting
@ 2026-04-09 13:07 Daniel Golle
  2026-04-09 13:07 ` [PATCH RFC net-next 1/4] net: flow_offload: let drivers report byte counter semantics Daniel Golle
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Daniel Golle @ 2026-04-09 13:07 UTC (permalink / raw)
  To: Felix Fietkau, John Crispin, Lorenzo Bianconi, Andrew Lunn,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Matthias Brugger, AngeloGioacchino Del Regno, Simon Horman,
	Pablo Neira Ayuso, Florian Westphal, Phil Sutter, netdev,
	linux-kernel, linux-arm-kernel, linux-mediatek, netfilter-devel,
	coreteam

Hardware flow counters report raw byte counts whose semantics
vary by vendor -- some count ingress L2 frames, others egress
L2, others L3. The nf_flow_table framework currently passes
these bytes straight to conntrack without conversion, and
sub-interfaces (VLAN, PPPoE) that are bypassed by hw offload
never see any counter updates at all.

This series lets drivers declare what their counters represent,
so the framework can normalize to L3 for conntrack and
propagate per-layer stats to encap sub-interfaces.

Questions:
 - Sub-interface stats accesses vlan_dev_priv() directly --
   should there be a generic netdev callback instead?
 - Are there hw offload drivers whose counters do not fit the
   ingress-L2 / egress-L2 / L3 model?

Daniel Golle (4):
  net: flow_offload: let drivers report byte counter semantics
  nf_flow_table: track sub-interface and bridge ifindex in flow tuple
  nf_flow_table: convert hw byte counts and update sub-interface stats
  net: ethernet: mtk_eth_soc: report INGRESS_L2 byte_type in flow stats

 .../net/ethernet/mediatek/mtk_ppe_offload.c   |   1 +
 include/net/flow_offload.h                    |   7 +
 include/net/netfilter/nf_flow_table.h         |   5 +
 net/netfilter/nf_flow_table_core.c            |   2 +
 net/netfilter/nf_flow_table_offload.c         | 174 +++++++++++++++++-
 net/netfilter/nf_flow_table_path.c            |   8 +
 6 files changed, 195 insertions(+), 2 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-04-09 14:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 13:07 [PATCH RFC net-next 0/4] improve hw flow offload byte accounting Daniel Golle
2026-04-09 13:07 ` [PATCH RFC net-next 1/4] net: flow_offload: let drivers report byte counter semantics Daniel Golle
2026-04-09 13:07 ` [PATCH RFC net-next 2/4] nf_flow_table: track sub-interface and bridge ifindex in flow tuple Daniel Golle
2026-04-09 13:07 ` [PATCH RFC net-next 3/4] nf_flow_table: convert hw byte counts and update sub-interface stats Daniel Golle
2026-04-09 13:07 ` [PATCH RFC net-next 4/4] net: ethernet: mtk_eth_soc: report INGRESS_L2 byte_type in flow stats Daniel Golle
2026-04-09 13:52 ` [PATCH RFC net-next 0/4] improve hw flow offload byte accounting Pablo Neira Ayuso
2026-04-09 14:21   ` Daniel Golle

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