From: Stephen Hemminger <stephen@networkplumber.org>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: dsahern@gmail.com, netdev@vger.kernel.org, kiran.patil@intel.com
Subject: Re: [PATCH iproute2-next] tc: mqprio: reject queues count/offset pair count higher than num_tc
Date: Wed, 13 May 2020 17:47:50 -0700 [thread overview]
Message-ID: <20200513174750.5ec971f0@hermes.lan> (raw)
In-Reply-To: <20200513194717.15363-1-maciej.fijalkowski@intel.com>
On Wed, 13 May 2020 21:47:17 +0200
Maciej Fijalkowski <maciej.fijalkowski@intel.com> wrote:
> Provide a sanity check that will make sure whether queues count/offset
> pair count will not exceed the actual number of TCs being created.
>
> Example command that is invalid because there are 4 count/offset pairs
> whereas num_tc is only 2.
>
> # tc qdisc add dev enp96s0f0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1
> queues 4@0 4@4 4@8 4@12 hw 1 mode channel
>
> Store the parsed count/offset pair count onto a dedicated variable that
> will be compared against opt.num_tc after all of the command line
> arguments were parsed. Bail out if this count is higher than opt.num_tc
> and let user know about it.
>
> Drivers were swallowing such commands as they were iterating over
> count/offset pairs where num_tc was used as a delimiter, so this is not
> a big deal, but better catch such misconfiguration at the command line
> argument parsing level.
>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
This doesn't have to wait for iproute2-next.
Can pick it up on the master side (after review).
next prev parent reply other threads:[~2020-05-14 0:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 19:47 [PATCH iproute2-next] tc: mqprio: reject queues count/offset pair count higher than num_tc Maciej Fijalkowski
2020-05-14 0:47 ` Stephen Hemminger [this message]
2020-05-18 14:59 ` David Ahern
2020-05-18 15:08 ` Stephen Hemminger
2020-05-18 15:12 ` David Ahern
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=20200513174750.5ec971f0@hermes.lan \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=kiran.patil@intel.com \
--cc=maciej.fijalkowski@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).