All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] net: stmmac: L3/L4 filter fixes and improvements
@ 2026-06-04  8:33 muhammad.nazim.amirul.nazle.asmade
  2026-06-04  8:33 ` [PATCH v2 0/3] net: stmmac: L3/L4 filter bug fixes muhammad.nazim.amirul.nazle.asmade
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: muhammad.nazim.amirul.nazle.asmade @ 2026-06-04  8:33 UTC (permalink / raw)
  To: netdev
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, rmk+kernel,
	maxime.chevallier, Jose.Abreu, linux-kernel

From: Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>

This series addresses several issues in the stmmac L3/L4 TC flower filter
implementation for the XGMAC2 core.

Patch 1 fixes a register corruption bug in the L4 filter port configuration.
The XGMAC_L4_ADDR register holds both source and destination port match
values in a single register. The original code overwrites the entire register
when setting either field, silently erasing the other. This is fixed by
using a read-modify-write sequence.

Patch 2 fixes the basic flow match parser to properly reject unsupported
offload requests with -EOPNOTSUPP instead of silently accepting them.
Unsupported cases include partial protocol masks, non-IPv4 network proto,
and non-TCP/UDP transport proto.

Patch 3 fixes a stale action bug on filter deletion. When a filter entry
with a drop action is deleted, the action field was not reset, causing
it to persist and potentially affect subsequent filter configurations.

Patch 4 adds L3/L4 filter match counting to the ethtool statistics by
reading the L3FM and L4FM bits from the RX descriptor status word (RDES2),
allowing users to observe filter hit rates via ethtool -S.

Patches 1-3 all fix the original L3/L4 filter implementation introduced in
425eabddaf0f ("net: stmmac: Implement L3/L4 Filters using TC Flower").

Nazim Amirul (4):
  net: stmmac: xgmac: fix l4 filter port overwrite on register update
  net: stmmac: fix l3l4 filter rejecting unsupported offload requests
  net: stmmac: reset residual action in L3L4 filters on delete
  net: stmmac: xgmac: report L3/L4 filter match count in ethtool stats

 .../net/ethernet/stmicro/stmmac/dwxgmac2.h    |  2 ++
 .../ethernet/stmicro/stmmac/dwxgmac2_core.c   | 28 +++++++++++--------
 .../ethernet/stmicro/stmmac/dwxgmac2_descs.c  |  6 ++++
 .../net/ethernet/stmicro/stmmac/stmmac_tc.c   | 27 ++++++++++++++++++
 4 files changed, 51 insertions(+), 12 deletions(-)

-- 
2.43.7


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

end of thread, other threads:[~2026-06-04 15:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04  8:33 [PATCH 0/4] net: stmmac: L3/L4 filter fixes and improvements muhammad.nazim.amirul.nazle.asmade
2026-06-04  8:33 ` [PATCH v2 0/3] net: stmmac: L3/L4 filter bug fixes muhammad.nazim.amirul.nazle.asmade
2026-06-04 15:00   ` Jakub Kicinski
2026-06-04  8:33 ` [PATCH v2 1/3] net: stmmac: xgmac: fix l4 filter port overwrite on register update muhammad.nazim.amirul.nazle.asmade
2026-06-04  8:33 ` [PATCH v2 2/3] net: stmmac: fix l3l4 filter rejecting unsupported offload requests muhammad.nazim.amirul.nazle.asmade
2026-06-04  8:33 ` [PATCH v2 3/3] net: stmmac: reset residual action in L3L4 filters on delete muhammad.nazim.amirul.nazle.asmade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.