diff mbox series

[SRU,F:linux-bluefield,1/2] net/sched: act_ct: add miss tcf_lastuse_update.

Message ID 1633734216-7613-2-git-send-email-bodong@nvidia.com
State New
Headers show
Series Fix byte count on fragmented packets in tc ct action | expand

Commit Message

Bodong Wang Oct. 8, 2021, 11:03 p.m. UTC
From: wenxu <wenxu@ucloud.cn>

BugLink: https://bugs.launchpad.net/bugs/1946393

When tcf_ct_act execute the tcf_lastuse_update should
be update or the used stats never update

filter protocol ip pref 3 flower chain 0
filter protocol ip pref 3 flower chain 0 handle 0x1
  eth_type ipv4
  dst_ip 1.1.1.1
  ip_flags frag/firstfrag
  skip_hw
  not_in_hw
 action order 1: ct zone 1 nat pipe
  index 1 ref 1 bind 1 installed 103 sec used 103 sec
 Action statistics:
 Sent 151500 bytes 101 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 cookie 4519c04dc64a1a295787aab13b6a50fb

Signed-off-by: wenxu <wenxu@ucloud.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Blakey <paulb@nvidia.com>
(cherry picked from 8367b3ab6e9a26dec5d5d07ea3eae17a21035322)
Signed-off-by: Bodong Wang <bodong@nvidia.com>
---
 net/sched/act_ct.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 2ad05a3..8c0b6727 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -952,6 +952,8 @@  static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
 	force = p->ct_action & TCA_CT_ACT_FORCE;
 	tmpl = p->tmpl;
 
+	tcf_lastuse_update(&c->tcf_tm);
+
 	if (clear) {
 		qdisc_skb_cb(skb)->post_ct = false;
 		ct = nf_ct_get(skb, &ctinfo);