From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net,
netdev@vger.kernel.org, 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,
julia.lawall@lip6.fr, john.fastabend@gmail.com
Subject: Re: [PATCH net-next,RFC 1/2] net: flow_offload: add flow_block_cb API
Date: Wed, 15 May 2019 01:07:53 +0200 [thread overview]
Message-ID: <20190514230753.mb7iu4pbswrb4be7@salvia> (raw)
In-Reply-To: <20190514145719.GE2238@nanopsycho>
On Tue, May 14, 2019 at 04:57:19PM +0200, Jiri Pirko wrote:
> Thu, May 09, 2019 at 06:39:50PM CEST, pablo@netfilter.org wrote:
> >This patch renames:
> >
> >* struct tcf_block_cb to flow_block_cb.
> >* struct tc_block_offload to flow_block_offload.
> >
> >And it exposes the flow_block_cb API through net/flow_offload.h. This
> >renames the existing codebase to adapt it to this name.
> >
> >Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
>
> [...]
>
>
> >+
> >+void *flow_block_cb_priv(struct flow_block_cb *block_cb)
> >+{
> >+ return block_cb->cb_priv;
> >+}
> >+EXPORT_SYMBOL(flow_block_cb_priv);
> >+
> >+LIST_HEAD(flow_block_cb_list);
> >+EXPORT_SYMBOL(flow_block_cb_list);
>
> I don't understand, why is this exported?
Will stop exposing this in the next patchset version.
> >+
> >+struct flow_block_cb *flow_block_cb_lookup(u32 block_index, tc_setup_cb_t *cb,
> >+ void *cb_ident)
>
> 2 namespaces may have the same block_index, yet it is completely
> unrelated block. The cb_ident
Yes, a struct netns parameter here for flow_block_cb_lookup() is
needed. I will also add a possible_net_t field to store this in the
flow_block_cb object so we can just stay with one single list for all
net namespaces by now.
Thanks.
> >+{ struct flow_block_cb *block_cb;
> >+
> >+ list_for_each_entry(block_cb, &flow_block_cb_list, list)
> >+ if (block_cb->block_index == block_index &&
> >+ block_cb->cb == cb &&
> >+ block_cb->cb_ident == cb_ident)
> >+ return block_cb;
> >+ return NULL;
> >+}
> >+EXPORT_SYMBOL(flow_block_cb_lookup);
>
> [...]
next prev parent reply other threads:[~2019-05-14 23:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 16:39 [PATCH net-next,RFC 0/2] netfilter: add hardware offload infrastructure Pablo Neira Ayuso
2019-05-09 16:39 ` [PATCH net-next,RFC 1/2] net: flow_offload: add flow_block_cb API Pablo Neira Ayuso
2019-05-14 14:57 ` Jiri Pirko
2019-05-14 23:07 ` Pablo Neira Ayuso [this message]
2019-05-09 16:39 ` [PATCH net-next,RFC 2/2] netfilter: nf_tables: add hardware offload support Pablo Neira Ayuso
2019-05-14 17:01 ` Jiri Pirko
2019-05-14 23:03 ` Pablo Neira Ayuso
2019-05-15 9:13 ` Pablo Neira Ayuso
2019-05-15 19:45 ` Jiri Pirko
2019-05-09 18:29 ` [PATCH net-next,RFC 0/2] netfilter: add hardware offload infrastructure Jakub Kicinski
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=20190514230753.mb7iu4pbswrb4be7@salvia \
--to=pablo@netfilter.org \
--cc=Manish.Chopra@cavium.com \
--cc=alexandre.torgue@st.com \
--cc=andrew@lunn.ch \
--cc=ariel.elior@cavium.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=jiri@resnulli.us \
--cc=joabreu@synopsys.com \
--cc=john.fastabend@gmail.com \
--cc=julia.lawall@lip6.fr \
--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=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