From: Stephen Hemminger <stephen@networkplumber.org>
To: Jakub Kicinski <jakub.kicinski@netronome.com>
Cc: dsahern@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com
Subject: Re: [PATCH iproute2] tc: f_u32: allow skip_hw and skip_sw flags to be last
Date: Fri, 9 Nov 2018 08:13:04 -0800 [thread overview]
Message-ID: <20181109081304.09e0d040@xeon-e3> (raw)
In-Reply-To: <20181106032327.9470-1-jakub.kicinski@netronome.com>
On Mon, 5 Nov 2018 19:23:27 -0800
Jakub Kicinski <jakub.kicinski@netronome.com> wrote:
> u32 uses NEXT_ARG() incorrectly when parsing skip_hw and skip_sw
> flags. NEXT_ARG() ensures there is another argument on the command
> line, and is used in handling <keyword> <value> syntax to move past
> <keyword> and ensure there is a <value> to read.
>
> Commit 5e5b3008d1fb ("tc: f_u32: Add support for skip_hw and skip_sw
> flags") seems to have copy pasted the handling from the previous
> command - "police", which needs an extra parameter and is kind of
> special due to the use of parse_police() helper.
>
> The combination of NEXT_ARG() and continue worked fine as long as
> skip_sw/skip_hw wasn't last, e.g.:
>
> $ tc filter add dev dummy0 ingress prio 101 protocol ipv6 \
> u32 match ip6 priority 0xa0 0xe0 skip_hw action pass
>
> But would fail if it was last:
>
> $ tc filter add dev dummy0 ingress prio 101 protocol ipv6 \
> u32 match ip6 priority 0xa0 0xe0 flowid :1 skip_hw
> Command line is not complete. Try option "help"
>
> Remove the NEXT_ARG()s and the continues, and let the argc--; argv++;
> at the end of the loop do its job.
>
> Fixes: 5e5b3008d1fb ("tc: f_u32: Add support for skip_hw and skip_sw flags")
> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Applied
prev parent reply other threads:[~2018-11-10 1:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-06 3:23 [PATCH iproute2] tc: f_u32: allow skip_hw and skip_sw flags to be last Jakub Kicinski
2018-11-09 16:13 ` Stephen Hemminger [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=20181109081304.09e0d040@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.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