From: Jakub Kicinski <kuba@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, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next] taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding
Date: Mon, 22 Jan 2024 17:24:38 -0800 [thread overview]
Message-ID: <20240122172438.16196239@kernel.org> (raw)
In-Reply-To: <20240122190738.32327-1-alessandromarcolini99@gmail.com>
On Mon, 22 Jan 2024 20:07:38 +0100 Alessandro Marcolini wrote:
> + __u32 taprio_flags;
nit: s/__u32/u32/ the __u32 version is only for include/uapi/ files
> - q->flags = err;
> + /* txtime-assist and full offload are mutually exclusive */
> + if ((taprio_flags & TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST) &&
> + (taprio_flags & TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD)) {
> + NL_SET_ERR_MSG_MOD(extack, "TXTIME_ASSIST and FULL_OFFLOAD are mutually exclusive");
Maybe use NL_SET_ERR_MSG_ATTR()? There seems to be no
NL_SET_ERR_MSG_ATTR_MOD() which is probably for the best.
The _MOD() prefix is a crutch, IMHO, pointing to the erroneous
attributes is much better, now that we have YNL and can actually
interpret the offsets.
--
pw-bot: cr
next prev parent reply other threads:[~2024-01-23 1:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 19:07 [PATCH net-next] taprio: validate TCA_TAPRIO_ATTR_FLAGS through policy instead of open-coding Alessandro Marcolini
2024-01-23 1:24 ` Jakub Kicinski [this message]
2024-01-23 11:51 ` Alessandro Marcolini
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=20240122172438.16196239@kernel.org \
--to=kuba@kernel.org \
--cc=alessandromarcolini99@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.