All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Edward Cree <ecree@solarflare.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"Pablo Neira Ayuso" <pablo@netfilter.org>,
	David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	"Andy Gospodarek" <andy@greyhouse.net>,
	Michael Chan <michael.chan@broadcom.com>,
	Vishal Kulkarni <vishal@chelsio.com>
Subject: Re: [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics
Date: Fri, 24 May 2019 10:44:36 -0700	[thread overview]
Message-ID: <20190524104436.35bf913b@cakuba.netronome.com> (raw)
In-Reply-To: <355202da-6c69-1034-eb29-e03edfe0fe2c@solarflare.com>

On Fri, 24 May 2019 18:27:39 +0100, Edward Cree wrote:
> On 24/05/2019 18:03, Jakub Kicinski wrote:
> > On Fri, 24 May 2019 14:57:24 +0100, Edward Cree wrote:  
> >> Argh, there's a problem: an action doesn't have a (directly) associated
> >>  block, and all the TC offload machinery nowadays is built around blocks.
> >> Since this action might have been used in _any_ block (and afaik there's
> >>  no way, from the action, to find which) we'd have to make callbacks on
> >>  _every_ block in the system, which sounds like it'd perform even worse
> >>  than the rule-dumping approach.
> >> Any ideas?  
> > Simplest would be to keep a list of offloaders per action, but maybe
> > something more clever would appear as one rummages through the code.  
> Problem with that is where to put the list heads; you'd need something that
>  was allocated per action x block, for those blocks on which at least one
>  offloader handled the rule (in_hw_count > 0).

I was thinking of having the list per action, but I haven't looked at
the code TBH.  Driver would then request to be added to each action's
list..

> Then you'd also have to update that when a driver bound/unbound from a
>  block (fl_reoffload() time).
> Best I can think of is keeping the cls_flower.rule allocated in
>  fl_hw_replace_filter() around instead of immediately freeing it, and
>  having a list_head in each flow_action_entry.  But that really looks like
>  an overcomplicated mess.
> TBH I'm starting to wonder if just calling all tc blocks in existence is
>  really all that bad.  Is there a plausible use case with huge numbers of
>  bound blocks?

Once per RTM_GETACTION?  The simplicity of that has it's allure..
It doesn't give you an upstream user for a cookie, though :S

  reply	other threads:[~2019-05-24 17:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 21:37 [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics Edward Cree
2019-05-22 21:38 ` [PATCH v3 net-next 1/3] flow_offload: add a cookie to flow_action_entry Edward Cree
2019-05-22 21:38 ` [PATCH v3 net-next 2/3] flow_offload: restore ability to collect separate stats per action Edward Cree
2019-05-22 21:38 ` [PATCH v3 net-next 3/3] flow_offload: include linux/kernel.h from flow_offload.h Edward Cree
2019-05-22 22:20 ` [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics Jakub Kicinski
2019-05-23 13:19   ` Jamal Hadi Salim
2019-05-23 16:11     ` Jakub Kicinski
2019-05-23 16:40       ` Edward Cree
2019-05-23 17:25         ` Jakub Kicinski
2019-05-24 13:09           ` Edward Cree
2019-05-24 13:57             ` Edward Cree
2019-05-24 14:44               ` Jamal Hadi Salim
2019-05-24 15:09                 ` Edward Cree
2019-05-24 17:59                   ` Jamal Hadi Salim
2019-05-24 17:03               ` Jakub Kicinski
2019-05-24 17:27                 ` Edward Cree
2019-05-24 17:44                   ` Jakub Kicinski [this message]
2019-05-28 16:27                     ` Edward Cree
2019-05-29 20:07             ` [RFC PATCH net-next 0/2] RTM_GETACTION stats offload Edward Cree
2019-05-29 20:10               ` [RFC PATCH net-next 1/2] net/sched: add callback to get stats on an action from clsflower offload Edward Cree
2019-05-29 20:11               ` [RFC PATCH net-next 2/2] net/sched: add action block binding to other classifiers Edward Cree
2019-05-23 16:21   ` [PATCH v3 net-next 0/3] flow_offload: Re-add per-action statistics Edward Cree
2019-05-23 16:33     ` Jakub Kicinski
2019-05-23 17:09       ` Edward Cree

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=20190524104436.35bf913b@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=vishal@chelsio.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.