netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
	davem@davemloft.net, thomas.lendacky@amd.com,
	f.fainelli@gmail.com, ariel.elior@cavium.com,
	michael.chan@broadcom.com, santosh@chelsio.com,
	madalin.bucur@nxp.com, yisen.zhuang@huawei.com,
	salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com,
	tariqt@mellanox.com, saeedm@mellanox.com, jiri@mellanox.com,
	idosch@mellanox.com, jakub.kicinski@netronome.com,
	peppe.cavallaro@st.com, grygorii.strashko@ti.com, andrew@lunn.ch,
	vivien.didelot@savoirfairelinux.com, alexandre.torgue@st.com,
	joabreu@synopsys.com, linux-net-drivers@solarflare.com,
	ganeshgr@chelsio.com, ogerlitz@mellanox.com,
	Manish.Chopra@cavium.com, marcelo.leitner@gmail.com,
	mkubecek@suse.cz, venkatkumar.duvvuru@broadcom.com,
	cphealy@gmail.com
Subject: Re: [PATCH net-next 04/12] net: sched: add tcf_block_setup()
Date: Wed, 3 Jul 2019 12:43:38 +0200	[thread overview]
Message-ID: <20190703104338.GV2250@nanopsycho> (raw)
In-Reply-To: <20190626131626.ihkjqvs2iciski2o@salvia>

Wed, Jun 26, 2019 at 03:16:26PM CEST, pablo@netfilter.org wrote:
>On Wed, Jun 26, 2019 at 02:12:56PM +0200, Jiri Pirko wrote:
>> Tue, Jun 25, 2019 at 10:31:54AM CEST, pablo@netfilter.org wrote:
>> >On Fri, Jun 21, 2019 at 07:16:03PM +0200, Jiri Pirko wrote:
>> >> Thu, Jun 20, 2019 at 09:49:09PM CEST, pablo@netfilter.org wrote:
>> >> 
>> >> [...]
>> >> 
>> >> > 
>> >> >+static LIST_HEAD(tcf_block_cb_list);
>> >> 
>> >> I still don't like the global list. Have to go throught the code more
>> >> carefully, but why you can't pass the priv/ctx from tc/netfilter. From
>> >> tc it would be tcf_block as it is now, from netfilter something else.
>> >
>> >This tcf_block_cb_list should go away at some point, once drivers know
>> >how to deal with multiple subsystems using the setup block
>> >infrastructure. As I said in my previous email, only one can set up
>> >the block at this stage, the ones coming later will hit busy.
>> 
>> The driver should know if it can bind or is busy. Also, the bind cmd
>> should contain type of binder (tc/nft/whatever) or perhaps rather binder
>> priority (according to the hook order in rx/tx).
>
>OK, so I see two possible paths then:
>
>#1 Add global list and allow one single subsystem to bind by now. Then
>   later, in a follow up patchset. Add binder type and priority once
>   there is a driver that can handle the three subsystems, remove
>   this global list and each driver deals/knows what to do from the
>   binder path.
>
>#2 Remove the global list now, each driver maintains a list of flow blocks
>   internally, allow one single flow block by now. This will need a bit more
>   code, since there will be code in the driver to maintain the list of
>   existing flow blocks, per driver, instead of global. So it will be
>   a per-driver global local to check if there is a flow block with
>   this [ cb, cb_ident ] already in place.
>
>#1 is almost ready - it's this batch :-) -  then #2 may need more code -
>this batch is slightly large.
>
>I understand though that path #2 may make it easier for the first
>driver client allowing for the three subsystems to bind.
>
>Let me know what path your prefer.

I definitelly prefer #2. Thanks!


>
>Thanks for reviewing.

  reply	other threads:[~2019-07-03 10:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 19:49 [PATCH net-next 00/12] netfilter: add hardware offload infrastructure Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 01/12] net: sched: move tcf_block_cb before indr_block Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 02/12] net: sched: add tcf_block_cb_alloc() Pablo Neira Ayuso
2019-07-02 19:14   ` Marcelo Ricardo Leitner
2019-06-20 19:49 ` [PATCH net-next 03/12] net: sched: add tcf_block_cb_free() Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 04/12] net: sched: add tcf_block_setup() Pablo Neira Ayuso
2019-06-21 17:16   ` Jiri Pirko
2019-06-25  8:31     ` Pablo Neira Ayuso
2019-06-26 12:12       ` Jiri Pirko
2019-06-26 13:16         ` Pablo Neira Ayuso
2019-07-03 10:43           ` Jiri Pirko [this message]
2019-06-20 19:49 ` [PATCH net-next 05/12] net: sched: add release callback to struct tcf_block_cb Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 06/12] net: sched: add tcf_setup_block_offload() Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 07/12] net: use tcf_block_setup() infrastructure Pablo Neira Ayuso
2019-07-02 19:16   ` Marcelo Ricardo Leitner
2019-06-20 19:49 ` [PATCH net-next 08/12] net: cls_api: do not expose tcf_block to drivers Pablo Neira Ayuso
2019-06-21 16:17   ` Jiri Pirko
2019-06-20 19:49 ` [PATCH net-next 09/12] net: sched: remove tcf_block_cb_{register,unregister}() Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 10/12] net: flow_offload: add flow_block_cb API Pablo Neira Ayuso
2019-06-21 15:19   ` Jiri Pirko
2019-06-20 19:49 ` [PATCH net-next 11/12] net: flow_offload: don't allow block sharing until drivers support this Pablo Neira Ayuso
2019-06-25  8:16   ` Jiri Pirko
2019-06-25  8:22     ` Pablo Neira Ayuso
2019-06-20 19:49 ` [PATCH net-next 12/12] netfilter: nf_tables: add hardware offload support Pablo Neira Ayuso
2019-06-21 15:16 ` [PATCH net-next 00/12] netfilter: add hardware offload infrastructure Jiri Pirko

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=20190703104338.GV2250@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=Manish.Chopra@cavium.com \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=ariel.elior@cavium.com \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=ganeshgr@chelsio.com \
    --cc=grygorii.strashko@ti.com \
    --cc=idosch@mellanox.com \
    --cc=jakub.kicinski@netronome.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jiri@mellanox.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-net-drivers@solarflare.com \
    --cc=madalin.bucur@nxp.com \
    --cc=marcelo.leitner@gmail.com \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=pablo@netfilter.org \
    --cc=peppe.cavallaro@st.com \
    --cc=saeedm@mellanox.com \
    --cc=salil.mehta@huawei.com \
    --cc=santosh@chelsio.com \
    --cc=tariqt@mellanox.com \
    --cc=thomas.lendacky@amd.com \
    --cc=venkatkumar.duvvuru@broadcom.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    --cc=yisen.zhuang@huawei.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).