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