[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <vbfk1c5nhql.fsf@mellanox.com>
Date: Fri, 26 Jul 2019 11:43:49 +0000
From: Vlad Buslov <vladbu@...lanox.com>
To: "wenxu@...oud.cn" <wenxu@...oud.cn>
CC: "pablo@...filter.org" <pablo@...filter.org>,
"fw@...len.de" <fw@...len.de>,
"netfilter-devel@...r.kernel.org" <netfilter-devel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 1/3] flow_offload: move tc indirect block to
flow offload
On Fri 26 Jul 2019 at 09:17, wenxu@...oud.cn wrote:
> From: wenxu <wenxu@...oud.cn>
>
> move tc indirect block to flow_offload and rename
> it to flow indirect block.The nf_tables can use the
> indr block architecture.
>
> Signed-off-by: wenxu <wenxu@...oud.cn>
> ---
> v2: make use of flow_block from Pablo
> flow_indr_rhashtable_init advice by jakub.kicinski
>
> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 10 +-
> .../net/ethernet/netronome/nfp/flower/offload.c | 10 +-
> include/net/flow_offload.h | 41 ++++
> include/net/pkt_cls.h | 35 ----
> include/net/sch_generic.h | 3 -
> net/core/flow_offload.c | 190 +++++++++++++++++
> net/sched/cls_api.c | 231 ++-------------------
> 7 files changed, 261 insertions(+), 259 deletions(-)
>
[...]
> +
> +int flow_indr_rhashtable_init(void)
> +{
> + static bool rhash_table_init;
> + int err = 0;
> +
> + if (rhash_table_init)
> + return 0;
> +
> + err = rhashtable_init(&indr_setup_block_ht,
> + &flow_indr_setup_block_ht_params);
> + if (err)
> + return err;
> +
> + rhash_table_init = true;
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(flow_indr_rhashtable_init);
Shouldn't this be dedicated *_initcall function? That would remove the
necessity for rhash_table_init flag.
Powered by blists - more mailing lists