[SRU][F:linux-bluefield][PATCH 1/2] net/sched: act_ct: update nf_conn_acct for act_ct SW offload in flowtable
Bodong Wang
bodong at nvidia.com
Tue Dec 6 15:06:24 UTC 2022
From: wenxu <wenxu at ucloud.cn>
BugLink: https://bugs.launchpad.net/bugs/1998938
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 at ucloud.cn>
Reviewed-by: Roi Dayan <roid at mellanox.com>
Signed-off-by: David S. Miller <davem at davemloft.net>
(cherry picked from commit beb97d3a3192c00575580af9073921c6283cf93d)
Signed-off-by: Bodong Wang <bodong at nvidia.com>
---
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 32a720edc6a6..74f34b67126d 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 <net/netfilter/nf_conntrack_act_ct.h>
#include <uapi/linux/netfilter/nf_nat.h>
@@ -565,6 +566,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;
}
--
2.27.0
More information about the kernel-team
mailing list