* [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable
@ 2020-04-20 23:55 wenxu
2020-04-21 9:06 ` Roi Dayan
2020-04-22 19:48 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: wenxu @ 2020-04-20 23:55 UTC (permalink / raw)
To: paulb; +Cc: netfilter-devel, netdev
From: wenxu <wenxu@ucloud.cn>
When the act_ct SW offload in flowtable, The counter of the conntrack
entry will never update. So update the nf_conn_acct conuter in act_ct
flowtable software offload.
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
net/sched/act_ct.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 1a76639..9adff83 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -30,6 +30,7 @@
#include <net/netfilter/nf_conntrack_core.h>
#include <net/netfilter/nf_conntrack_zones.h>
#include <net/netfilter/nf_conntrack_helper.h>
+#include <net/netfilter/nf_conntrack_acct.h>
#include <net/netfilter/ipv6/nf_defrag_ipv6.h>
#include <uapi/linux/netfilter/nf_nat.h>
@@ -536,6 +537,7 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,
flow_offload_refresh(nf_ft, flow);
nf_conntrack_get(&ct->ct_general);
nf_ct_set(skb, ct, ctinfo);
+ nf_ct_acct_update(ct, dir, skb->len);
return true;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable
2020-04-20 23:55 [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable wenxu
@ 2020-04-21 9:06 ` Roi Dayan
2020-04-22 19:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Roi Dayan @ 2020-04-21 9:06 UTC (permalink / raw)
To: wenxu, paulb; +Cc: netfilter-devel, netdev
On 2020-04-21 2:55 AM, wenxu@ucloud.cn wrote:
> From: wenxu <wenxu@ucloud.cn>
>
> When the act_ct SW offload in flowtable, The counter of the conntrack
> entry will never update. So update the nf_conn_acct conuter in act_ct
> flowtable software offload.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
> ---
> net/sched/act_ct.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
> index 1a76639..9adff83 100644
> --- a/net/sched/act_ct.c
> +++ b/net/sched/act_ct.c
> @@ -30,6 +30,7 @@
> #include <net/netfilter/nf_conntrack_core.h>
> #include <net/netfilter/nf_conntrack_zones.h>
> #include <net/netfilter/nf_conntrack_helper.h>
> +#include <net/netfilter/nf_conntrack_acct.h>
> #include <net/netfilter/ipv6/nf_defrag_ipv6.h>
> #include <uapi/linux/netfilter/nf_nat.h>
>
> @@ -536,6 +537,7 @@ static bool tcf_ct_flow_table_lookup(struct tcf_ct_params *p,
> flow_offload_refresh(nf_ft, flow);
> nf_conntrack_get(&ct->ct_general);
> nf_ct_set(skb, ct, ctinfo);
> + nf_ct_acct_update(ct, dir, skb->len);
>
> return true;
> }
>
Hi wenxu,
Looks good. I also tested this and verified.
Thanks,
Roi
Reviewed-by: Roi Dayan <roid@mellanox.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable
2020-04-20 23:55 [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable wenxu
2020-04-21 9:06 ` Roi Dayan
@ 2020-04-22 19:48 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-04-22 19:48 UTC (permalink / raw)
To: wenxu; +Cc: paulb, netfilter-devel, netdev
From: wenxu@ucloud.cn
Date: Tue, 21 Apr 2020 07:55:43 +0800
> From: wenxu <wenxu@ucloud.cn>
>
> When the act_ct SW offload in flowtable, The counter of the conntrack
> entry will never update. So update the nf_conn_acct conuter in act_ct
> flowtable software offload.
>
> Signed-off-by: wenxu <wenxu@ucloud.cn>
Applied to net-next, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-22 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 23:55 [PATCH net-next] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable wenxu
2020-04-21 9:06 ` Roi Dayan
2020-04-22 19:48 ` David Miller
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).