From: Stephen Hemminger <stephen@networkplumber.org>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Andrea Claudi <aclaudi@redhat.com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 v2] tc: simple: don't hardcode the control action
Date: Thu, 6 Jun 2019 14:45:24 -0700 [thread overview]
Message-ID: <20190606144524.40e92046@hermes.lan> (raw)
In-Reply-To: <ea2fbb2d36828188d11090d73b648d97988cdcf6.1559687259.git.dcaratti@redhat.com>
On Wed, 5 Jun 2019 00:30:16 +0200
Davide Caratti <dcaratti@redhat.com> wrote:
> the following TDC test case:
>
> b776 - Replace simple action with invalid goto chain control
>
> checks if the kernel correctly validates the 'goto chain' control action,
> when it is specified in 'act_simple' rules. The test systematically fails
> because the control action is hardcoded in parse_simple(), i.e. it is not
> parsed by command line arguments, so its value is constantly TC_ACT_PIPE.
> Because of that, the following command:
>
> # tc action add action simple sdata "test" drop index 7
>
> installs an 'act_simple' rule that never drops packets, and whose 'index'
> is the first IDR available, plus an 'act_gact' rule with 'index' equal to
> 7, that drops packets.
>
> Use parse_action_control_dflt(), like we did on many other TC actions, to
> make the control action configurable also with 'act_simple'. The expected
> results of test b776 are summarized below:
>
> iproute2
> v kernel->| 5.1-rc2 (and previous) | 5.1-rc3 (and subsequent)
> ------------------+-------------------------+-------------------------
> 5.1.0 | FAIL (bad IDR) | FAIL (bad IDR)
> 5.1.0(patched) | FAIL (no rule/bad sdata)| PASS
>
> Changes since v1:
> - reword commit message, thanks Stephen Hemminger
>
> Fixes: 087f46ee4ebd ("tc: introduce simple action")
> CC: Andrea Claudi <aclaudi@redhat.com>
> CC: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Applied, thanks
prev parent reply other threads:[~2019-06-06 21:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 22:30 [PATCH iproute2 v2] tc: simple: don't hardcode the control action Davide Caratti
2019-06-06 21:45 ` 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=20190606144524.40e92046@hermes.lan \
--to=stephen@networkplumber.org \
--cc=aclaudi@redhat.com \
--cc=dcaratti@redhat.com \
--cc=marcelo.leitner@gmail.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).