All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Buslov <vladbu@mellanox.com>
To: "wenxu@ucloud.cn" <wenxu@ucloud.cn>
Cc: "pablo@netfilter.org" <pablo@netfilter.org>,
	"fw@strlen.de" <fw@strlen.de>,
	"netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 1/3] flow_offload: move tc indirect block to flow offload
Date: Fri, 26 Jul 2019 11:43:49 +0000	[thread overview]
Message-ID: <vbfk1c5nhql.fsf@mellanox.com> (raw)
In-Reply-To: <1564121869-3398-2-git-send-email-wenxu@ucloud.cn>


On Fri 26 Jul 2019 at 09:17, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.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@ucloud.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.

  reply	other threads:[~2019-07-26 11:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-26  6:17 [PATCH net-next v2 0/3] flow_offload: add indr-block in nf_table_offload wenxu
2019-07-26  6:17 ` [PATCH net-next v2 1/3] flow_offload: move tc indirect block to flow offload wenxu
2019-07-26 11:43   ` Vlad Buslov [this message]
2019-07-26  6:17 ` [PATCH net-next v2 2/3] flow_offload: Support get tcf block immediately wenxu
2019-07-26  6:17 ` [PATCH net-next v2 3/3] netfilter: nf_tables_offload: support indr block call wenxu

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=vbfk1c5nhql.fsf@mellanox.com \
    --to=vladbu@mellanox.com \
    --cc=fw@strlen.de \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=wenxu@ucloud.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.