From: Ido Schimmel <idosch@nvidia.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
razor@blackwall.org, roopa@nvidia.com, petrm@nvidia.com,
mlxsw@nvidia.com
Subject: Re: [PATCH net-next 3/4] bridge: mcast: Move validation to a policy
Date: Sat, 11 Feb 2023 17:45:57 +0200 [thread overview]
Message-ID: <Y+e4NTGi7VASbm5K@shredder> (raw)
In-Reply-To: <20230210192057.4927b002@kernel.org>
On Fri, Feb 10, 2023 at 07:20:57PM -0800, Jakub Kicinski wrote:
> On Thu, 9 Feb 2023 09:18:51 +0200 Ido Schimmel wrote:
> > + if (nla_len(attr) != sizeof(struct br_mdb_entry)) {
> > + NL_SET_ERR_MSG_MOD(extack, "Invalid MDBA_SET_ENTRY attribute length");
> > + return -EINVAL;
>
> Well, you're just moving it, but NL_SET_ERR_MSG_ATTR() would be better.
> We shouldn't be adding _MOD() in the core implementation of the family.
Assuming you are referring to this code when it's moved to
net/core/rtnetlink.c, then I already removed the _MOD() suffix from it
(as visible in the RFC). I can squash this as well:
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index c9f878a28d32..491e4231b3dd 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -6138,7 +6138,7 @@ static int rtnl_validate_mdb_entry(const struct nlattr *attr,
struct br_mdb_entry *entry = nla_data(attr);
if (nla_len(attr) != sizeof(struct br_mdb_entry)) {
- NL_SET_ERR_MSG(extack, "Invalid MDBA_SET_ENTRY attribute length");
+ NL_SET_ERR_MSG_ATTR(extack, attr, "Invalid attribute length");
return -EINVAL;
}
next prev parent reply other threads:[~2023-02-11 15:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-09 7:18 [PATCH net-next 0/4] bridge: mcast: Preparations for VXLAN MDB Ido Schimmel
2023-02-09 7:18 ` [PATCH net-next 1/4] bridge: mcast: Use correct define in MDB dump Ido Schimmel
2023-02-09 8:18 ` Nikolay Aleksandrov
2023-02-09 7:18 ` [PATCH net-next 2/4] bridge: mcast: Remove pointless sequence generation counter assignment Ido Schimmel
2023-02-09 8:19 ` Nikolay Aleksandrov
2023-02-09 7:18 ` [PATCH net-next 3/4] bridge: mcast: Move validation to a policy Ido Schimmel
2023-02-09 8:23 ` Nikolay Aleksandrov
2023-02-11 3:20 ` Jakub Kicinski
2023-02-11 15:45 ` Ido Schimmel [this message]
2023-02-09 7:18 ` [PATCH net-next 4/4] selftests: forwarding: Add MDB dump test cases Ido Schimmel
2023-02-09 8:24 ` Nikolay Aleksandrov
2023-02-11 3:40 ` [PATCH net-next 0/4] bridge: mcast: Preparations for VXLAN MDB 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=Y+e4NTGi7VASbm5K@shredder \
--to=idosch@nvidia.com \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=petrm@nvidia.com \
--cc=razor@blackwall.org \
--cc=roopa@nvidia.com \
/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).