Skip to content

net: airoha: fix silent RX loss on the shared CPU ring

Vitaliy Sochnev linux-arm-kernel linux-mediatek lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 4 repliesIn review 1 of 2 applied
  2. v23 patches 3 repliesSuperseded
  3. v14 patches 3 repliesSuperseded

Patches in v3 1 of 2 applied

#Subject and filesSizeRepliesApplied
1/2net: airoha: handle RX_NO_CPU_DSCP interrupt, not just RX_DONEdrivers/net/ethernet/airoha/airoha_eth.c drivers/net/ethernet/airoha/airoha_regs.h+13 -52 replies
2/2net: airoha: grow the small RX ringsdrivers/net/ethernet/airoha/airoha_eth.h+2 -10 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLorenzo Bianconi
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net v3 0/2] net: airoha: fix silent RX loss on the shared CPU ring

v3: dropped the RX ring stall recovery (v2 2/3) as asked [1]. At 128 the stall does not occur - 500 forced PPPoE reconnects over 20 h with the detector compiled in and armed, zero triggers - and it did not fix the bug on its own anyway. I will resend it if the stall turns up at the larger ring.

2/2 keeps its code and its Acked-by; the commit message changed. It now cites the register capture taken with no recovery in the tree instead of numbers from builds carrying it, states that 1/2 does not cover this failure, and quantifies what the bigger rings cost in memory.

v2 [2] answered the v1 review: DONE-bit overwrite hypothesis disproven, QDMA_DESC_DROP_MASK never set, RX_DSCP_NUM default raised to the vendor SDK's 32.

Still open for the airoha folks: in 2/2 hw set DONE on descriptor 15 while 0-14 were untouched and the driver's consumer sat at 0. Is out-of-order completion within an RX ring expected, or is the driver violating a constraint on RX_CPU_IDX by leaving one descriptor unposted? Growing the ring avoids the symptom; the rule behind it is still unknown.

Tested on Nokia XG-040G-MF (AN7583) on a live PPPoE line. These two patches without the recovery are what ran longest here: 508 forced reconnects over 20 h 32 min, zero rx_dropped/rx_errors across 39158 samples.

[1] https://lore.kernel.org/netdev/apaA5jDYH71F0JaS@lore-desk/
[2] https://lore.kernel.org/netdev/[email protected]/

Vitaliy Sochnev (2):
net: airoha: handle RX_NO_CPU_DSCP interrupt, not just RX_DONE
net: airoha: grow the small RX rings

 drivers/net/ethernet/airoha/airoha_eth.c  | 16 +++++++++++-----
 drivers/net/ethernet/airoha/airoha_eth.h  |  3 ++-
 drivers/net/ethernet/airoha/airoha_regs.h |  2 ++
 3 files changed, 15 insertions(+), 6 deletions(-)
Signature · 1 line
2.55.0