All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Sukholitko <boris.sukholitko@broadcom.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: netdev@vger.kernel.org, Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Ilya Lifshits <ilya.lifshits@broadcom.com>,
	Shmulik Ladkani <shmulik.ladkani@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v2 1/3] net/sched: act_vlan: Fix modify to allow 0
Date: Sun, 30 May 2021 14:47:16 +0300	[thread overview]
Message-ID: <20210530114716.GA16534@builder> (raw)
In-Reply-To: <YK/QRFAcMMcXBvw9@dcaratti.users.ipa.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

On Thu, May 27, 2021 at 07:00:52PM +0200, Davide Caratti wrote:
[...]
> 
> My suggestion was just to simplify the end-user dump experience, so
> that the value of 'p->tcfv_push_prio' is dumped always in case of
> TCA_VLAN_ACT_PUSH. In this way, rules with equal "behavior" in the
> traffic path are always dumped in the same way. IOW,
> 
> # tc action add action vlan push id 42 prio 0 index 1
> 
> and
> 
> # tc action add action vlan push id 42 index 1
> 
> do exactly the same thing in the traffic path, so there is no need to
> dump them differently. On the contrary, these 2 rules:
> 
> # tc action add action vlan modify id 42 prio 0 index 1
> 
> and
> 
> # tc action add action vlan modify id 42 index 1
> 
> don't do the same thing, because packet hitting the first rule will have
> their priority identically set to 0, while the second one will leave the
> VLAN priority unmodified. So, I think it makes sense to have different
> dumps here (that was my comment to your v1).

I am convinced. I've done this in v3.

> 
> Another small nit - forgive me, I didn't spot it in the first review:
> 
> not 100% sure, but I think that in tcf_vlan_get_fill_size() we need
> to avoid accounting for TCA_VLAN_PUSH_VLAN_PRIORITY in case the rule
> has 'push_prio_exists' equal to false. Otherwise we allocate an
> extra u8 netlink attribute in case of batch dump. Correct?

Also done in v3.

Thanks,
Boris.

> 
> thanks!
> -- 
> davide
> 
> 
> 

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

  reply	other threads:[~2021-05-30 11:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-25 15:35 [PATCH net-next v2 0/3] net/sched: act_vlan: Fix modify to allow 0 Boris Sukholitko
2021-05-25 15:35 ` [PATCH net-next v2 1/3] " Boris Sukholitko
2021-05-25 20:35   ` Davide Caratti
2021-05-26 11:45     ` Boris Sukholitko
2021-05-27 17:00       ` Davide Caratti
2021-05-30 11:47         ` Boris Sukholitko [this message]
2021-05-25 15:36 ` [PATCH net-next v2 2/3] net/sched: act_vlan: No dump for unset priority Boris Sukholitko
2021-05-25 15:36 ` [PATCH net-next v2 3/3] net/sched: act_vlan: Test priority 0 modification Boris Sukholitko

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=20210530114716.GA16534@builder \
    --to=boris.sukholitko@broadcom.com \
    --cc=dcaratti@redhat.com \
    --cc=ilya.lifshits@broadcom.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shmulik.ladkani@gmail.com \
    --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.