netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
Subsystems (2)
PATCH v2 1/1 netfilter: nf_flow_table_offload: set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY
From: wenxu <[email protected]>
Set hw_stats_type of flow_action_entry to FLOW_ACTION_HW_STATS_ANY to follow the driver behavior.
--- net/netfilter/nf_flow_table_offload.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
net/netfilter/nf_flow_table_offload.c +5 -1
@@ -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,
Signature · 1 line
1.8.3.1
Pablo Neira Ayuso
maintainerQuoted 4 lines · On Fri, Mar 20, 2020 at 08:57:09PM +0800, [email protected] wrote:
From: wenxu <[email protected]>
Set
hw_stats_typeofflow_action_entrytoFLOW_ACTION_HW_STATS_ANYto 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.
Quoted 10 lines · Pablo Neira Ayuso
Quoted 4 lines · On Fri, Mar 20, 2020 at 08:57:09PM +0800, [email protected] wrote:
From: wenxu <[email protected]>
Set
hw_stats_typeofflow_action_entrytoFLOW_ACTION_HW_STATS_ANYto 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.
Quoted 1 line
Pablo Neira Ayuso
maintainerQuoted 7 lines · wenxu
Quoted 5 lines · Pablo Neira Ayuso
Quoted 4 lines · On Fri, Mar 20, 2020 at 08:57:09PM +0800, [email protected] wrote:
From: wenxu <[email protected]>
Set
hw_stats_typeofflow_action_entrytoFLOW_ACTION_HW_STATS_ANYto follow the driver behavior.
Quoted 8 lines
Quoted 5 lines
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_ANYflags 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.