* [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
@ 2020-03-20 12:57 wenxu
2020-03-20 13:04 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: wenxu @ 2020-03-20 12:57 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
From: wenxu <wenxu@ucloud.cn>
Set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY to
follow the driver behavior.
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
net/netfilter/nf_flow_table_offload.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/nf_flow_table_offload.c b/net/netfilter/nf_flow_table_offload.c
index a68136a..88d2ac5 100644
--- a/net/netfilter/nf_flow_table_offload.c
+++ b/net/netfilter/nf_flow_table_offload.c
@@ -165,8 +165,12 @@ 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;
+
+ entry = &flow_rule->rule->action.entries[i];
+ entry->hw_stats_type = FLOW_ACTION_HW_STATS_ANY;
- return &flow_rule->rule->action.entries[i];
+ return entry;
}
static int flow_offload_eth_src(struct net *net,
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
2020-03-20 12:57 [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY wenxu
@ 2020-03-20 13:04 ` Pablo Neira Ayuso
2020-03-20 13:55 ` wenxu
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2020-03-20 13:04 UTC (permalink / raw)
To: wenxu; +Cc: netfilter-devel
On Fri, Mar 20, 2020 at 08:57:09PM +0800, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> Set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY to
> follow the driver behavior.
Now you have to explain me how you are going to use this.
There is no support for packet/bytes stats right now.
Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
2020-03-20 13:04 ` Pablo Neira Ayuso
@ 2020-03-20 13:55 ` wenxu
2020-03-20 19:05 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: wenxu @ 2020-03-20 13:55 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
在 2020/3/20 21:04, Pablo Neira Ayuso 写道:
> On Fri, Mar 20, 2020 at 08:57:09PM +0800, wenxu@ucloud.cn wrote:
>> From: wenxu <wenxu@ucloud.cn>
>>
>> Set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY to
>> follow the driver behavior.
> Now you have to explain me how you are going to use this.
>
> There is no support for packet/bytes stats right now.
>
> Thank you.
The FLOW_ACTION_HW_STATS_ANY flags is the default behavior and
can avoid the failure of flow inserting. We don't nedd to use this.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
2020-03-20 13:55 ` wenxu
@ 2020-03-20 19:05 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2020-03-20 19:05 UTC (permalink / raw)
To: wenxu; +Cc: netfilter-devel
On Fri, Mar 20, 2020 at 09:55:35PM +0800, wenxu wrote:
>
> 在 2020/3/20 21:04, Pablo Neira Ayuso 写道:
> > On Fri, Mar 20, 2020 at 08:57:09PM +0800, wenxu@ucloud.cn wrote:
> > > From: wenxu <wenxu@ucloud.cn>
> > >
> > > Set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY to
> > > follow the driver behavior.
> > Now you have to explain me how you are going to use this.
> >
> > There is no support for packet/bytes stats right now.
> >
> > Thank you.
>
> The FLOW_ACTION_HW_STATS_ANY flags is the default behavior and
> can avoid the failure of flow inserting. We don't nedd to use this.
OK, no worries, I'll keep back this patch. Thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-03-20 19:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 12:57 [PATCH nf-next v2] netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY wenxu
2020-03-20 13:04 ` Pablo Neira Ayuso
2020-03-20 13:55 ` wenxu
2020-03-20 19:05 ` Pablo Neira Ayuso
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).