Re: [PATCH nf-next] netfilter:nf_flow_table: add HW stats type support in flowtable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 20, 2020 at 03:34:17PM +0800, wenxu@xxxxxxxxx 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.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux