From 2e1f6f1682d3974d8ea52310e460f1bbe470390f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 11 Jan 2017 14:55:45 +0100 Subject: [PATCH] mvebu: work around an ethernet tx scheduling fairness issue The hardware queue scheduling is apparently configured with fixed priorities, which creates a nasty fairness issue where traffic from one CPU can starve traffic from all other CPUs. Work around this issue by forcing all tx packets to go through one CPU, until this issue is fixed properly. Signed-off-by: Felix Fietkau --- .../400-mvneta-tx-queue-workaround.patch | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 target/linux/mvebu/patches-4.4/400-mvneta-tx-queue-workaround.patch diff --git a/target/linux/mvebu/patches-4.4/400-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-4.4/400-mvneta-tx-queue-workaround.patch new file mode 100644 index 0000000000..5dba311d93 --- /dev/null +++ b/target/linux/mvebu/patches-4.4/400-mvneta-tx-queue-workaround.patch @@ -0,0 +1,36 @@ +The hardware queue scheduling is apparently configured with fixed +priorities, which creates a nasty fairness issue where traffic from one +CPU can starve traffic from all other CPUs. + +Work around this issue by forcing all tx packets to go through one CPU, +until this issue is fixed properly. + +Signed-off-by: Felix Fietkau +--- +--- a/drivers/net/ethernet/marvell/mvneta.c ++++ b/drivers/net/ethernet/marvell/mvneta.c +@@ -3984,6 +3984,16 @@ static int mvneta_ethtool_set_eee(struct + return phylink_ethtool_set_eee(pp->phylink, eee); + } + ++static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb, ++ void *accel_priv, ++ select_queue_fallback_t fallback) ++{ ++ /* XXX: hardware queue scheduling is broken, ++ * use only one queue until it is fixed */ ++ return 0; ++} ++ ++ + static const struct net_device_ops mvneta_netdev_ops = { + .ndo_open = mvneta_open, + .ndo_stop = mvneta_stop, +@@ -3994,6 +4004,7 @@ static const struct net_device_ops mvnet + .ndo_fix_features = mvneta_fix_features, + .ndo_get_stats64 = mvneta_get_stats64, + .ndo_do_ioctl = mvneta_ioctl, ++ .ndo_select_queue = mvneta_select_queue, + }; + + const struct ethtool_ops mvneta_eth_tool_ops = { -- 2.30.2