mvebu: fill additional info for mvneta tx queue workaround patch
[openwrt/openwrt.git] / target / linux / mvebu / patches-6.1 / 700-mvneta-tx-queue-workaround.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Subject: mvneta: tx queue workaround
3
4 The hardware queue scheduling is apparently configured with fixed
5 priorities, which creates a nasty fairness issue where traffic from one
6 CPU can starve traffic from all other CPUs.
7
8 Work around this issue by forcing all tx packets to go through one CPU,
9 until this issue is fixed properly.
10
11 Ref: https://github.com/openwrt/openwrt/issues/5411
12
13 Signed-off-by: Felix Fietkau <nbd@nbd.name>
14 ---
15 --- a/drivers/net/ethernet/marvell/mvneta.c
16 +++ b/drivers/net/ethernet/marvell/mvneta.c
17 @@ -5233,6 +5233,16 @@ static int mvneta_setup_tc(struct net_de
18 }
19 }
20
21 +#ifndef CONFIG_ARM64
22 +static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb,
23 + struct net_device *sb_dev)
24 +{
25 + /* XXX: hardware queue scheduling is broken,
26 + * use only one queue until it is fixed */
27 + return 0;
28 +}
29 +#endif
30 +
31 static const struct net_device_ops mvneta_netdev_ops = {
32 .ndo_open = mvneta_open,
33 .ndo_stop = mvneta_stop,
34 @@ -5243,6 +5253,9 @@ static const struct net_device_ops mvnet
35 .ndo_fix_features = mvneta_fix_features,
36 .ndo_get_stats64 = mvneta_get_stats64,
37 .ndo_eth_ioctl = mvneta_ioctl,
38 +#ifndef CONFIG_ARM64
39 + .ndo_select_queue = mvneta_select_queue,
40 +#endif
41 .ndo_bpf = mvneta_xdp,
42 .ndo_xdp_xmit = mvneta_xdp_xmit,
43 .ndo_setup_tc = mvneta_setup_tc,