Skip to contentSkip to conversation

ethtool: Fix incorrect success return value on RX network flow hashing error

PATCH Applied Gal Pressman 3 participants 3 messages Jan 7, 2025 – Jan 20, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 ethtool.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ethtool.c +3 -1
index 1cb5b9ecf094..a1393bc14b7b 100644
@@ -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;
Signature · 1 line
2.40.1
#2 lore raw
In reply to Gal Pressman
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Quoted 8 lines · On Tue, 7 Jan 2025 19:17:55 +0200 you wrote:

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

[...]

Here is the summary with links:
- [ethtool] ethtool: Fix incorrect success return value on RX network flow hashing error

    https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=9103197d24aa

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html