netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Roman Mashak <mrv@mojatatu.com>
Cc: netdev@vger.kernel.org, kernel@mojatatu.com, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us
Subject: Re: [PATCH iproute2 1/1] tc: Fix binding of gact action by index.
Date: Thu, 6 Jun 2019 14:42:01 -0700	[thread overview]
Message-ID: <20190606144201.3ff30999@hermes.lan> (raw)
In-Reply-To: <1559856729-32376-1-git-send-email-mrv@mojatatu.com>

On Thu,  6 Jun 2019 17:32:09 -0400
Roman Mashak <mrv@mojatatu.com> wrote:

> The following operation fails:
> % sudo tc actions add action pipe index 1
> % sudo tc filter add dev lo parent ffff: \
>        protocol ip pref 10 u32 match ip src 127.0.0.2 \
>        flowid 1:10 action gact index 1
> 
> Bad action type index
> Usage: ... gact <ACTION> [RAND] [INDEX]
> Where:  ACTION := reclassify | drop | continue | pass | pipe |
>                   goto chain <CHAIN_INDEX> | jump <JUMP_COUNT>
>         RAND := random <RANDTYPE> <ACTION> <VAL>
>         RANDTYPE := netrand | determ
>         VAL : = value not exceeding 10000
>         JUMP_COUNT := Absolute jump from start of action list
>         INDEX := index value used
> 
> However, passing a control action of gact rule during filter binding works:
> 
> % sudo tc filter add dev lo parent ffff: \
>        protocol ip pref 10 u32 match ip src 127.0.0.2 \
>        flowid 1:10 action gact pipe index 1
> 
> Binding by reference, i.e. by index, has to consistently work with
> any tc action.
> 
> Since tc is sensitive to the order of keywords passed on the command line,
> we can teach gact to skip parsing arguments as soon as it sees 'gact'
> followed by 'index' keyword. 
> 
> Signed-off-by: Roman Mashak <mrv@mojatatu.com>
> ---

Applied

  reply	other threads:[~2019-06-06 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 21:32 [PATCH iproute2 1/1] tc: Fix binding of gact action by index Roman Mashak
2019-06-06 21:42 ` Stephen Hemminger [this message]
2019-06-06 21:44 ` Stephen Hemminger

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=20190606144201.3ff30999@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kernel@mojatatu.com \
    --cc=mrv@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --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).