public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH ethtool] ethtool: don't fall back to grxfhindir when context was specified
@ 2018-03-19 16:52 Edward Cree
  2018-03-29 18:40 ` John W. Linville
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Cree @ 2018-03-19 16:52 UTC (permalink / raw)
  To: John W. Linville; +Cc: netdev

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(-)

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");

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH ethtool] ethtool: don't fall back to grxfhindir when context was specified
  2018-03-19 16:52 [PATCH ethtool] ethtool: don't fall back to grxfhindir when context was specified Edward Cree
@ 2018-03-29 18:40 ` John W. Linville
  0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2018-03-29 18:40 UTC (permalink / raw)
  To: Edward Cree; +Cc: netdev

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
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver•com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-29 18:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-19 16:52 [PATCH ethtool] ethtool: don't fall back to grxfhindir when context was specified Edward Cree
2018-03-29 18:40 ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox