Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: Davide Caratti <dcaratti@redhat.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net/sched: store the last executed chain also for clsact egress
Date: Mon, 2 Aug 2021 21:26:26 -0700	[thread overview]
Message-ID: <CAM_iQpVDyPdpm--L6iEzg4AxBsL6F0cF2EHzBPSCO-H5_Yqu8A@mail.gmail.com> (raw)
In-Reply-To: <YQRSlETLgowgik2x@dcaratti.users.ipa.redhat.com>

On Fri, Jul 30, 2021 at 12:28 PM Davide Caratti <dcaratti@redhat.com> wrote:
>
> hello Cong, thanks for looking at this!
>
> On Wed, Jul 28, 2021 at 03:16:02PM -0700, Cong Wang wrote:
> > On Wed, Jul 28, 2021 at 11:40 AM Davide Caratti <dcaratti@redhat.com> wrote:
> > >
> > > currently, only 'ingress' and 'clsact ingress' qdiscs store the tc 'chain
> > > id' in the skb extension. However, userspace programs (like ovs) are able
> > > to setup egress rules, and datapath gets confused in case it doesn't find
> > > the 'chain id' for a packet that's "recirculated" by tc.
> > > Change tcf_classify() to have the same semantic as tcf_classify_ingress()
> > > so that a single function can be called in ingress / egress, using the tc
> > > ingress / egress block respectively.
> >
> > I wonder if there is any performance impact with this change? As
> > tcf_classify() now may allocate skb ext (tc_skb_ext_alloc()) too,
> > right after __tcf_classify().
> >
> > Thanks.
>
> I think there is some performance drop for users that activate
> TC_SKB_EXT, in case packet doesn't match the filter *and* last
> executed_chain is non-zero. But in this case, I also think it's a good
> choice to spend some cycles to save the chain id in the extension: I
> might be wrong, but AFAIK openvswitch is the only "user" that configures
> TC in this way.
>
> Do you have in mind a specific case where performance can be degraded
> because of this commit? if so, I can try to investigate more.

I do not have any case, just want a double check here in case of any
performance regression.

Thanks for checking it.

  reply	other threads:[~2021-08-03  4:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 18:08 Davide Caratti
2021-07-28 21:41 ` mleitner
2021-07-28 22:16 ` Cong Wang
2021-07-30 19:27   ` Davide Caratti
2021-08-03  4:26     ` Cong Wang [this message]
2021-07-29 21:20 ` patchwork-bot+netdevbpf

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=CAM_iQpVDyPdpm--L6iEzg4AxBsL6F0cF2EHzBPSCO-H5_Yqu8A@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=dcaratti@redhat.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [PATCH net-next] net/sched: store the last executed chain also for clsact egress' \
    /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

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox