[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190514230753.mb7iu4pbswrb4be7@salvia>
Date: Wed, 15 May 2019 01:07:53 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netfilter-devel@...r.kernel.org, davem@...emloft.net,
netdev@...r.kernel.org, thomas.lendacky@....com,
f.fainelli@...il.com, ariel.elior@...ium.com,
michael.chan@...adcom.com, santosh@...lsio.com,
madalin.bucur@....com, yisen.zhuang@...wei.com,
salil.mehta@...wei.com, jeffrey.t.kirsher@...el.com,
tariqt@...lanox.com, saeedm@...lanox.com, jiri@...lanox.com,
idosch@...lanox.com, jakub.kicinski@...ronome.com,
peppe.cavallaro@...com, grygorii.strashko@...com, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, alexandre.torgue@...com,
joabreu@...opsys.com, linux-net-drivers@...arflare.com,
ganeshgr@...lsio.com, ogerlitz@...lanox.com,
Manish.Chopra@...ium.com, marcelo.leitner@...il.com,
mkubecek@...e.cz, venkatkumar.duvvuru@...adcom.com,
julia.lawall@...6.fr, john.fastabend@...il.com
Subject: Re: [PATCH net-next,RFC 1/2] net: flow_offload: add flow_block_cb API
On Tue, May 14, 2019 at 04:57:19PM +0200, Jiri Pirko wrote:
> Thu, May 09, 2019 at 06:39:50PM CEST, pablo@...filter.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@...filter.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);
>
> [...]
Powered by blists - more mailing lists