diff mbox series

[ethtool] ethtool: don't fall back to grxfhindir when context was specified

Message ID cb6227a4-0ba8-d45d-b205-85611b4cebba@solarflare.com
State Accepted, archived
Delegated to: John Linville
Headers show
Series [ethtool] ethtool: don't fall back to grxfhindir when context was specified | expand

Commit Message

Edward Cree March 19, 2018, 4:52 p.m. UTC
In do_grfxh(), if rss_context is non-zero, we must not fall back to
 do_grxfhindir() if ETHTOOL_GRSSH fails, for that reads the default RSS
 context and not the one specified.

Fixes: f5d55b967e0c ("ethtool: add support for extra RSS contexts and RSS steering filters")
Signed-off-by: Edward Cree <ecree@solarflare.com>
---
 ethtool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John W. Linville March 29, 2018, 6:40 p.m. UTC | #1
On Mon, Mar 19, 2018 at 04:52:06PM +0000, Edward Cree wrote:
> In do_grfxh(), if rss_context is non-zero, we must not fall back to
>  do_grxfhindir() if ETHTOOL_GRSSH fails, for that reads the default RSS
>  context and not the one specified.
> 
> Fixes: f5d55b967e0c ("ethtool: add support for extra RSS contexts and RSS steering filters")
> Signed-off-by: Edward Cree <ecree@solarflare.com>

LGTM -- queued for next release...

Thanks,

John
diff mbox series

Patch

diff --git a/ethtool.c b/ethtool.c
index da7421c..fb6c26d 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3738,7 +3738,7 @@  static int do_grxfh(struct cmd_context *ctx)
 	rss_head.cmd = ETHTOOL_GRSSH;
 	rss_head.rss_context = rss_context;
 	err = send_ioctl(ctx, &rss_head);
-	if (err < 0 && errno == EOPNOTSUPP) {
+	if (err < 0 && errno == EOPNOTSUPP && !rss_context) {
 		return do_grxfhindir(ctx, &ring_count);
 	} else if (err < 0) {
 		perror("Cannot get RX flow hash indir size and/or key size");