From: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
To: netdev@vger.kernel.org
Cc: Prabhakar Pujeri <prabhakar.pujeri@dell.com>,
Michal Kubecek <mkubecek@suse.cz>
Subject: [PATCH ethtool 2/2] rss: drop duplicate attribute parsing in rss_reply_cb()
Date: Mon, 31 Aug 2026 10:41:33 +0000 [thread overview]
Message-ID: <20260831104133.2216-3-prabhakar.pujeri@dell.com> (raw)
In-Reply-To: <20260831104133.2216-1-prabhakar.pujeri@dell.com>
The second mnl_attr_parse() call re-parses the very same message into
the same array as the call at the top of the function, and none of the
code in between touches the table or the values extracted from it:
all attribute reads happen before it and attr_cb() just rewrites the
table entries with identical pointers.
Remove the redundant call; its failure semantics were identical to the
first parse anyway (MNL_CB_OK when silent, MNL_CB_ERROR otherwise).
Signed-off-by: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
---
| 4 ----
1 file changed, 4 deletions(-)
--git a/netlink/rss.c b/netlink/rss.c
index 85c2bd9..8c70c29 100644
--- a/netlink/rss.c
+++ b/netlink/rss.c
@@ -149,10 +149,6 @@ int rss_reply_cb(const struct nlmsghdr *nlhdr, void *data)
hash_funcs = global_stringset(ETH_SS_RSS_HASH_FUNCS,
nlctx->ethnl2_socket);
- ret = mnl_attr_parse(nlhdr, GENL_HDRLEN, attr_cb, &tb_info);
- if (ret < 0)
- return silent ? MNL_CB_OK : MNL_CB_ERROR;
-
ret = get_num_rings(args);
if (ret < 0)
return MNL_CB_ERROR;
--
2.55.0
prev parent reply other threads:[~2026-08-31 10:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 10:41 [PATCH ethtool 0/2] fix RSS hash-function reply handling Prabhakar Pujeri
2026-08-31 10:41 ` [PATCH ethtool 1/2] rss: bound hash function masks in text and JSON output Prabhakar Pujeri
2026-08-31 10:41 ` Prabhakar Pujeri [this message]
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=20260831104133.2216-3-prabhakar.pujeri@dell.com \
--to=prabhakar.pujeri@dell.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