From: Yan Markman Date: Thu, 12 Jul 2018 11:54:14 +0000 (+0200) Subject: net: mvpp2: use RSS only when using multi-queue mode X-Git-Tag: v4.19~410^2~377^2~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c4a5686c4e7475ab16fdaa4da375e43810da978;p=platform%2Fkernel%2Flinux-rpi.git net: mvpp2: use RSS only when using multi-queue mode Since RSS only applies when we have per-cpu rx queues, it should only be enabled when the driver is configured to make use of multi-queue mode. Signed-off-by: Yan Markman [Maxime: Commit message] Signed-off-by: Maxime Chevallier Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c index b1d812b..75aa0de 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c @@ -3276,6 +3276,11 @@ static void mvpp2_irqs_deinit(struct mvpp2_port *port) } } +static bool mvpp22_rss_is_supported(void) +{ + return queue_mode == MVPP2_QDIST_MULTI_MODE; +} + static int mvpp2_open(struct net_device *dev) { struct mvpp2_port *port = netdev_priv(dev); @@ -3368,7 +3373,7 @@ static int mvpp2_open(struct net_device *dev) mvpp2_start_dev(port); - if (priv->hw_version == MVPP22) + if (mvpp22_rss_is_supported()) mvpp22_init_rss(port); /* Start hardware statistics gathering */