mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
76cabb95da
Backport Russell King's series [1]
net: mvneta: reduce size of TSO header allocation
to pending-5.15 to fix random crashes on Turris Omnia.
This also backports two patches that are dependencies to this series:
net: mvneta: Delete unused variable
net: mvneta: fix potential double-frees in mvneta_txq_sw_deinit()
[1] https://lore.kernel.org/netdev/ZCsbJ4nG+So%2Fn9qY@shell.armlinux.org.uk/
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (squashed)
(cherry picked from commit 7b31c2e9ed
)
31 lines
1021 B
Diff
31 lines
1021 B
Diff
From e7ca75fe6662f78bfeb0112671c812e4c7b8e214 Mon Sep 17 00:00:00 2001
|
|
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
|
|
Date: Fri, 26 Nov 2021 12:20:54 +0100
|
|
Subject: net: mvneta: Don't force-set the offloading flag
|
|
|
|
The qopt->hw flag is set by the TC code according to the offloading mode
|
|
asked by user. Don't force-set it in the driver, but instead read it to
|
|
make sure we do what's asked.
|
|
|
|
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/ethernet/marvell/mvneta.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
(limited to 'drivers/net/ethernet/marvell/mvneta.c')
|
|
|
|
--- a/drivers/net/ethernet/marvell/mvneta.c
|
|
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
|
@@ -4973,7 +4973,9 @@ static int mvneta_setup_mqprio(struct ne
|
|
u8 num_tc;
|
|
int i;
|
|
|
|
- mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS;
|
|
+ if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS)
|
|
+ return 0;
|
|
+
|
|
num_tc = mqprio->qopt.num_tc;
|
|
|
|
if (num_tc > rxq_number)
|