Skip to content

net: stmmac: improve tx timer logic

Christian Marangi linux-arm-kernel linux-wireless lkml netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 0 repliesApplied 4/4
  2. v34 patches 1 replySuperseded
  3. v24 patches 2 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches16 repliesSuperseded

Changes in v4 from the cover letter

- Fix W=1 warning for missing define of pending_packets Changes v3:
- Fix compilation error for missing comma Changes v2:
- Add patch to move tx timer arm outside tx clean.

Patches in v4 All 4 applied

#Subject and filesSizeRepliesApplied
1/4net: introduce napi_is_scheduled helperdrivers/net/ethernet/chelsio/cxgb3/sge.c drivers/net/wireless/realtek/rtw89/core.c include/linux/netdevice.h +1 more+25 -100 repliesApplied
2/4net: stmmac: improve TX timer arm logicdrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+15 -30 repliesApplied
3/4net: stmmac: move TX timer arm after DMA enabledrivers/net/ethernet/stmicro/stmmac/stmmac_main.c+18 -40 repliesApplied
4/4net: stmmac: increase TX coalesce timer to 5msdrivers/net/ethernet/stmicro/stmmac/common.h+1 -10 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [net-next PATCH v4 0/4] net: stmmac: improve tx timer logic

This series comes with the intention of restoring original performance of stmmac on some router/device that used the stmmac driver to handle gigabit traffic.

More info are present in patch 3. This cover letter is to show results and improvements of the following change.

The move to hr_timer for tx timer and commit 8fce33317023 ("net: stmmac:
Rework coalesce timer and fix multi-queue races") caused big performance regression on these kind of device.

This was observed on ipq806x that after kernel 4.19 couldn't handle gigabit speed anymore.

The following series is currently applied and tested in OpenWrt SNAPSHOT and have great performance increase. (the scenario is qca8k switch + stmmac dwmac1000) Some good comparison can be found here [1].

The difference is from a swconfig scenario (where dsa tagging is not used so very low CPU impact in handling traffic) and DSA scenario where tagging is used and there is a minimal impact in the CPU. As can be notice even with DSA in place we have better perf.

It was observed by other user that also SQM scenario with cake scheduler were improved in the order of 100mbps (this scenario is CPU limited and any increase of perf is caused by removing load on the CPU)

Been at least 15 days that this is in use without any complain or bug reported about queue timeout. (was the case with v1 before the additional patch was added, only appear on real world tests and not on iperf tests)

[1] https://forum.openwrt.org/t/netgear-r7800-exploration-ipq8065-qca9984/285/3427?u=ansuel

Changes v4:
- Fix W=1 warning for missing define of pending_packets Changes v3:
- Fix compilation error for missing comma Changes v2:
- Add patch to move tx timer arm outside tx clean.

Christian Marangi (4):
net: introduce napi_is_scheduled helper
net: stmmac: improve TX timer arm logic
net: stmmac: move TX timer arm after DMA enable
net: stmmac: increase TX coalesce timer to 5ms

 drivers/net/ethernet/chelsio/cxgb3/sge.c      |  8 ----
 drivers/net/ethernet/stmicro/stmmac/common.h  |  2 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 40 +++++++++++++++----
 drivers/net/wireless/realtek/rtw89/core.c     |  2 +-
 include/linux/netdevice.h                     | 23 +++++++++++
 net/core/dev.c                                |  2 +-
 6 files changed, 59 insertions(+), 18 deletions(-)
Signature · 1 line
2.40.1