netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: wenxu@ucloud.cn
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next] netfilter:nf_flow_table: add HW stats type support in flowtable
Date: Fri, 20 Mar 2020 13:10:48 +0100	[thread overview]
Message-ID: <20200320121048.siaonqjufl4btb72@salvia> (raw)
In-Reply-To: <1584689657-17280-1-git-send-email-wenxu@ucloud.cn>

On Fri, Mar 20, 2020 at 03:34:17PM +0800, wenxu@ucloud.cn wrote:
[...]
> diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
> index ad54931..60289a6 100644
> --- a/net/netfilter/nf_flow_table_offload.c
> +++ b/net/netfilter/nf_flow_table_offload.c
> @@ -165,8 +165,16 @@ static void flow_offload_mangle(struct flow_action_entry *entry,
>  flow_action_entry_next(struct nf_flow_rule *flow_rule)
>  {
>  	int i = flow_rule->rule->action.num_entries++;
> +	struct flow_action_entry *entry;
> +
> +	BUILD_BUG_ON(NFTA_HW_STATS_TYPE_ANY != FLOW_ACTION_HW_STATS_ANY);
> +	BUILD_BUG_ON(NFTA_HW_STATS_TYPE_IMMEDIATE != FLOW_ACTION_HW_STATS_IMMEDIATE);
> +	BUILD_BUG_ON(NFTA_HW_STATS_TYPE_DELAYED != FLOW_ACTION_HW_STATS_DELAYED);
> +
> +	entry = &flow_rule->rule->action.entries[i];
> +	entry->hw_stats_type = flow_rule->hw_stats_type;

Please, use FLOW_ACTION_HW_STATS_ANY by now. Remove the uapi code,
from this patch.

I'm not sure how users will be using this new knob.

At this stage, I think the drivers knows much better what type to pick
than the user.

You also have to explain me how you are testing things.

Thank you.

  reply	other threads:[~2020-03-20 12:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20  7:34 [PATCH nf-next] netfilter:nf_flow_table: add HW stats type support in flowtable wenxu
2020-03-20 12:10 ` Pablo Neira Ayuso [this message]
2020-03-20 12:36   ` wenxu
2020-03-20 13:03     ` 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=20200320121048.siaonqjufl4btb72@salvia \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).