[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107171755.3059447-1-gal@nvidia.com>
Date: Tue, 7 Jan 2025 19:17:55 +0200
From: Gal Pressman <gal@...dia.com>
To: <netdev@...r.kernel.org>
CC: <mkubecek@...e.cz>, Gal Pressman <gal@...dia.com>, Dragos Tatulea
<dtatulea@...dia.com>
Subject: [PATCH ethtool] ethtool: Fix incorrect success return value on RX network flow hashing error
In case of an error on RX network flow hashing configuration, return an
error in addition to the error message.
Fixes: 1bd87128467b ("Add support for rx flow hash configuration in a network device")
Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
Signed-off-by: Gal Pressman <gal@...dia.com>
---
ethtool.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ethtool.c b/ethtool.c
index 1cb5b9ecf094..a1393bc14b7b 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -3883,8 +3883,10 @@ static int do_srxclass(struct cmd_context *ctx)
nfccmd.flow_type |= FLOW_RSS;
err = send_ioctl(ctx, &nfccmd);
- if (err < 0)
+ if (err < 0) {
perror("Cannot change RX network flow hashing options");
+ return 1;
+ }
} else if (!strcmp(ctx->argp[0], "flow-type")) {
struct ethtool_rx_flow_spec rx_rule_fs;
__u32 rss_context = 0;
--
2.40.1
Powered by blists - more mailing lists