2
0

771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 039550960a2235cfe2dfaa773df9f98f8da31a0c Mon Sep 17 00:00:00 2001
  2. From: Christian Marangi <[email protected]>
  3. Date: Wed, 18 Oct 2023 14:35:50 +0200
  4. Subject: [PATCH 3/3] net: stmmac: increase TX coalesce timer to 5ms
  5. Commit 8fce33317023 ("net: stmmac: Rework coalesce timer and fix
  6. multi-queue races") decreased the TX coalesce timer from 40ms to 1ms.
  7. This caused some performance regression on some target (regression was
  8. reported at least on ipq806x) in the order of 600mbps dropping from
  9. gigabit handling to only 200mbps.
  10. The problem was identified in the TX timer getting armed too much time.
  11. While this was fixed and improved in another commit, performance can be
  12. improved even further by increasing the timer delay a bit moving from
  13. 1ms to 5ms.
  14. The value is a good balance between battery saving by prevending too
  15. much interrupt to be generated and permitting good performance for
  16. internet oriented devices.
  17. Signed-off-by: Christian Marangi <[email protected]>
  18. Signed-off-by: Paolo Abeni <[email protected]>
  19. ---
  20. drivers/net/ethernet/stmicro/stmmac/common.h | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. --- a/drivers/net/ethernet/stmicro/stmmac/common.h
  23. +++ b/drivers/net/ethernet/stmicro/stmmac/common.h
  24. @@ -318,7 +318,7 @@ struct stmmac_safety_stats {
  25. #define MIN_DMA_RIWT 0x10
  26. #define DEF_DMA_RIWT 0xa0
  27. /* Tx coalesce parameters */
  28. -#define STMMAC_COAL_TX_TIMER 1000
  29. +#define STMMAC_COAL_TX_TIMER 5000
  30. #define STMMAC_MAX_COAL_TX_TICK 100000
  31. #define STMMAC_TX_MAX_FRAMES 256
  32. #define STMMAC_TX_FRAMES 25