From: Jakub Kicinski <jakub.kicinski@netronome.com>
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, 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,
peppe.cavallaro@st.com, grygorii.strashko@ti.com, andrew@lunn.ch,
vivien.didelot@gmail.com, alexandre.torgue@st.com,
joabreu@synopsys.com, linux-net-drivers@solarflare.com,
ogerlitz@mellanox.com, Manish.Chopra@cavium.com,
marcelo.leitner@gmail.com, mkubecek@suse.cz,
venkatkumar.duvvuru@broadcom.com, maxime.chevallier@bootlin.com,
cphealy@gmail.com
Subject: Re: [PATCH 06/15 net-next,v2] net: sched: add tcf_setup_block_offload()
Date: Fri, 5 Jul 2019 16:27:29 -0700 [thread overview]
Message-ID: <20190705162729.67ee3d66@cakuba.netronome.com> (raw)
In-Reply-To: <20190704234843.6601-7-pablo@netfilter.org>
On Fri, 5 Jul 2019 01:48:34 +0200, Pablo Neira Ayuso wrote:
> Most drivers do the same thing to set up the block, add a helper
> function to do this.
>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 534a545ea51e..003f24a1323f 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -922,6 +922,26 @@ static int tcf_block_setup(struct tcf_block *block, struct tc_block_offload *bo)
> return err;
> }
>
> +int tcf_setup_block_offload(struct tc_block_offload *f, tc_setup_cb_t *cb,
> + void *cb_ident, void *cb_priv, bool ingress_only)
> +{
> + if (ingress_only &&
> + f->binder_type != TCF_BLOCK_BINDER_TYPE_CLSACT_INGRESS)
> + return -EOPNOTSUPP;
> +
> + switch (f->command) {
> + case TC_BLOCK_BIND:
> + return tcf_block_cb_register(f->block, cb, cb_ident, cb_priv,
> + f->extack);
> + case TC_BLOCK_UNBIND:
> + tcf_block_cb_unregister(f->block, cb, cb_ident);
> + return 0;
> + default:
> + return -EOPNOTSUPP;
> + }
> +}
> +EXPORT_SYMBOL(tcf_setup_block_offload);
> +
> static struct rhashtable indr_setup_block_ht;
>
> struct tc_indr_block_dev {
This change is pretty much unrelated to the rest of the series, isn't
it? Can you please post it separately and make the series smaller
this way?
Perhaps tcf_setup_block_offload_simple() would be a good name for this
helper?
next prev parent reply other threads:[~2019-07-05 23:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 23:48 [PATCH 00/15 net-next,v2] netfilter: add hardware offload infrastructure Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 01/15 net-next,v2] net: sched: move tcf_block_cb before indr_block Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 02/15 net-next,v2] net: sched: add tcf_block_cb_alloc() Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 03/15 net-next,v2] net: sched: add tcf_block_cb_free() Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 04/15 net-next,v2] net: sched: add tcf_block_setup() Pablo Neira Ayuso
2019-07-05 22:31 ` Jakub Kicinski
2019-07-05 22:58 ` Jakub Kicinski
2019-07-04 23:48 ` [PATCH 05/15 net-next,v2] net: sched: add release callback to struct tcf_block_cb Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 06/15 net-next,v2] net: sched: add tcf_setup_block_offload() Pablo Neira Ayuso
2019-07-05 23:27 ` Jakub Kicinski [this message]
2019-07-04 23:48 ` [PATCH 07/15 net-next,v2] net: use tcf_block_setup() infrastructure Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 08/15 net-next,v2] net: cls_api: do not expose tcf_block to drivers Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 09/15 net-next,v2] net: sched: remove tcf_block_cb_{register,unregister}() Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 10/15 net-next,v2] net: flow_offload: add flow_block_cb API Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 11/15 net-next,v2] net: flow_offload: don't allow subsystem to reuse blocks Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 12/15 net-next,v2] net: flow_offload: make flow block callback list per-driver Pablo Neira Ayuso
2019-07-05 22:42 ` Jakub Kicinski
2019-07-05 23:25 ` Jakub Kicinski
2019-07-04 23:48 ` [PATCH 13/15 net-next,v2] net: flow_offload: rename TC_BLOCK_{UN}BIND to FLOW_BLOCK_{UN}BIND Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 14/15 net-next,v2] net: flow_offload: rename TCF_BLOCK_BINDER_TYPE_* to FLOW_BLOCK_BINDER_TYPE_* Pablo Neira Ayuso
2019-07-04 23:48 ` [PATCH 15/15 net-next,v2] netfilter: nf_tables: add hardware offload support Pablo Neira Ayuso
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=20190705162729.67ee3d66@cakuba.netronome.com \
--to=jakub.kicinski@netronome.com \
--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=grygorii.strashko@ti.com \
--cc=idosch@mellanox.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=maxime.chevallier@bootlin.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=tariqt@mellanox.com \
--cc=thomas.lendacky@amd.com \
--cc=venkatkumar.duvvuru@broadcom.com \
--cc=vivien.didelot@gmail.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