|
|
b96ca7 |
From 6ff8142033aed6f9eafe7c4f8a67a55c5a98ab2f Mon Sep 17 00:00:00 2001
|
|
|
b96ca7 |
From: Edward Cree <ecree@solarflare.com>
|
|
|
b96ca7 |
Date: Mon, 19 Mar 2018 16:52:06 +0000
|
|
|
b96ca7 |
Subject: [PATCH 18/18] ethtool: don't fall back to grxfhindir when context was
|
|
|
b96ca7 |
specified
|
|
|
b96ca7 |
|
|
|
b96ca7 |
In do_grfxh(), if rss_context is non-zero, we must not fall back to
|
|
|
b96ca7 |
do_grxfhindir() if ETHTOOL_GRSSH fails, for that reads the default RSS
|
|
|
b96ca7 |
context and not the one specified.
|
|
|
b96ca7 |
|
|
|
b96ca7 |
Fixes: f5d55b967e0c ("ethtool: add support for extra RSS contexts and RSS steering filters")
|
|
|
b96ca7 |
Signed-off-by: Edward Cree <ecree@solarflare.com>
|
|
|
b96ca7 |
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
|
b96ca7 |
(cherry picked from commit 7984d34ea893a529330b6addb959cbf6e3ec026f)
|
|
|
b96ca7 |
---
|
|
|
b96ca7 |
ethtool.c | 2 +-
|
|
|
b96ca7 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b96ca7 |
|
|
|
b96ca7 |
diff --git a/ethtool.c b/ethtool.c
|
|
|
b96ca7 |
index a276fdb..2ecc13f 100644
|
|
|
b96ca7 |
--- a/ethtool.c
|
|
|
b96ca7 |
+++ b/ethtool.c
|
|
|
b96ca7 |
@@ -3748,7 +3748,7 @@ static int do_grxfh(struct cmd_context *ctx)
|
|
|
b96ca7 |
rss_head.cmd = ETHTOOL_GRSSH;
|
|
|
b96ca7 |
rss_head.rss_context = rss_context;
|
|
|
b96ca7 |
err = send_ioctl(ctx, &rss_head);
|
|
|
b96ca7 |
- if (err < 0 && errno == EOPNOTSUPP) {
|
|
|
b96ca7 |
+ if (err < 0 && errno == EOPNOTSUPP && !rss_context) {
|
|
|
b96ca7 |
return do_grxfhindir(ctx, &ring_count);
|
|
|
b96ca7 |
} else if (err < 0) {
|
|
|
b96ca7 |
perror("Cannot get RX flow hash indir size and/or key size");
|
|
|
b96ca7 |
--
|
|
|
b96ca7 |
1.8.3.1
|
|
|
b96ca7 |
|