netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alessandro Marcolini <alessandromarcolini99@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>
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: Tue, 23 Jan 2024 12:51:50 +0100	[thread overview]
Message-ID: <b90a8935-ab4b-48e2-a21d-1efc528b2788@gmail.com> (raw)
In-Reply-To: <20240122172438.16196239@kernel.org>

On 1/23/24 02:24, Jakub Kicinski wrote:

> 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
Oh ok, didn't know that, thanks.
>
>> -	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.

Yes, I think that this is better, I'll change it to NL_SET_ERR_MSG_ATTR and resend the patch.


      reply	other threads:[~2024-01-23 11:51 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
2024-01-23 11:51   ` Alessandro Marcolini [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=b90a8935-ab4b-48e2-a21d-1efc528b2788@gmail.com \
    --to=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).