From: Simon Horman <horms@kernel.org>
To: Alessandro Marcolini <alessandromarcolini99@gmail.com>
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH v3 net-next] taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding
Date: Fri, 26 Jan 2024 21:14:41 +0000 [thread overview]
Message-ID: <20240126211441.GF401354@kernel.org> (raw)
In-Reply-To: <20240125165942.37920-1-alessandromarcolini99@gmail.com>
On Thu, Jan 25, 2024 at 05:59:42PM +0100, Alessandro Marcolini wrote:
> As of now, the field TCA_TAPRIO_ATTR_FLAGS is being validated by manually
> checking its value, using the function taprio_flags_valid().
>
> With this patch, the field will be validated through the netlink policy
> NLA_POLICY_MASK, where the mask is defined by TAPRIO_SUPPORTED_FLAGS.
> The mutual exclusivity of the two flags TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD
> and TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST is still checked manually.
>
> Changes since RFC:
> - fixed reversed xmas tree
> - use NL_SET_ERR_MSG_MOD() for both invalid configuration
>
> Changes since v1:
> - Changed NL_SET_ERR_MSG_MOD to NL_SET_ERR_MSG_ATTR when wrong flags
> issued
> - Changed __u32 to u32
>
> Changes since v2:
> - Added the missing parameter for NL_SET_ERR_MSG_ATTR (sorry again for
> the noise)
>
> Signed-off-by: Alessandro Marcolini <alessandromarcolini99@gmail.com>
> ---
Thanks for the updates.
Reviewed-by: Simon Horman <horms@kernel.org>
For reference, and I don't think it's probably not
necessary to repost because of this, these days
it is normal to put the Changes below the scissors (---).
This means they don't end up in the git history.
But now we have lore that seems to be less of an issue.
next prev parent reply other threads:[~2024-01-26 21:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-25 16:59 [PATCH v3 net-next] taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding Alessandro Marcolini
2024-01-26 21:14 ` Simon Horman [this message]
2024-01-28 16:13 ` Alessandro Marcolini
2024-01-29 12:10 ` 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=20240126211441.GF401354@kernel.org \
--to=horms@kernel.org \
--cc=alessandromarcolini99@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@gmail.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).