All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@nvidia.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: <netdev@vger.kernel.org>, Cong Wang <cong.wang@bytedance.com>,
	"Jamal Hadi Salim" <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>
Subject: Re: [Patch net-next] net_sched: refactor TC action init API
Date: Wed, 21 Jul 2021 13:48:15 +0300	[thread overview]
Message-ID: <ygnho8awq6xc.fsf@nvidia.com> (raw)
In-Reply-To: <20210720233454.8311-1-xiyou.wangcong@gmail.com>

On Wed 21 Jul 2021 at 02:34, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> From: Cong Wang <cong.wang@bytedance.com>
>
> TC action ->init() API has 10 parameters, it becomes harder
> to read. Some of them are just boolean and can be replaced
> by flags. Similarly for the internal API tcf_action_init()
> and tcf_exts_validate().
>
> This patch converts them to flags and fold them into
> the upper 16 bits of "flags", whose lower 16 bits are still
> reserved for user-space. More specifically, the following
> kernel flags are introduced:
>
> TCA_ACT_FLAGS_POLICE replace 'name' in a few contexts, to
> distinguish whether it is compatible with policer.
>
> TCA_ACT_FLAGS_BIND replaces 'bind', to indicate whether
> this action is bound to a filter.
>
> TCA_ACT_FLAGS_REPLACE  replaces 'ovr' in most contexts,
> means we are replacing an existing action.
>
> TCA_ACT_FLAGS_NO_RTNL replaces 'rtnl_held' but has the
> opposite meaning, because we still hold RTNL in most
> cases.
>
> The only user-space flag TCA_ACT_FLAGS_NO_PERCPU_STATS is
> untouched and still stored as before.
>
> I have tested this patch with tdc and I do not see any
> failure related to this patch.
>
> Cc: Vlad Buslov <vladbu@nvidia.com>
> Cc: Jamal Hadi Salim <jhs@mojatatu.com>
> Cc: Jiri Pirko <jiri@resnulli.us>
> Signed-off-by: Cong Wang <cong.wang@bytedance.com>
> ---

I ran some of our tests with the patch applied and didn't encounter any
issues.

Tested-by: Vlad Buslov <vladbu@nvidia.com> 

[...]



  reply	other threads:[~2021-07-21 11:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 23:34 [Patch net-next] net_sched: refactor TC action init API Cong Wang
2021-07-21 10:48 ` Vlad Buslov [this message]
2021-07-21 16:04 ` Jamal Hadi Salim

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=ygnho8awq6xc.fsf@nvidia.com \
    --to=vladbu@nvidia.com \
    --cc=cong.wang@bytedance.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.