From: David Ahern <dsahern@kernel.org>
To: mkubecek@suse.cz
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
Alexander Duyck <alexanderduyck@fb.com>
Subject: [PATCH ethtool] rxclass: Fix return code in rxclass_rule_ins
Date: Wed, 3 May 2023 10:51:06 -0600 [thread overview]
Message-ID: <20230503165106.9584-1-dsahern@kernel.org> (raw)
ethtool is not exiting non-0 when -N fails. e.g.,
$ sudo ethtool -N eth0 flow-type tcp4 src-ip 1.2.3.4 action 3 loc 1023
rmgr: Cannot insert RX class rule: No such device
$ echo $?
0
Update rxclass_rule_ins to return err.
Fixes: 8d63f72ccdcb ("Add RX packet classification interface")
Cc: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
---
rxclass.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rxclass.c b/rxclass.c
index 6cf81fdafc85..66cf00ba7728 100644
--- a/rxclass.c
+++ b/rxclass.c
@@ -598,7 +598,7 @@ int rxclass_rule_ins(struct cmd_context *ctx,
else if (loc & RX_CLS_LOC_SPECIAL)
printf("Added rule with ID %d\n", nfccmd.fs.location);
- return 0;
+ return err;
}
int rxclass_rule_del(struct cmd_context *ctx, __u32 loc)
--
2.25.1
next reply other threads:[~2023-05-03 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 16:51 David Ahern [this message]
2023-05-03 18:27 ` [PATCH ethtool] rxclass: Fix return code in rxclass_rule_ins Alexander Duyck
2023-05-07 22:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503165106.9584-1-dsahern@kernel.org \
--to=dsahern@kernel.org \
--cc=alexanderduyck@fb.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).