mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 11:44:01 +08:00
net/sched: act_ct: Fix byte count on fragmented packets
First fragmented packets (frag offset = 0) byte len is zeroed
when stolen by ip_defrag(). And since act_ct update the stats
only afterwards (at end of execute), bytes aren't correctly
accounted for such packets.
To fix this, move stats update to start of action execute.
Fixes: b57dc7c13e
("net/sched: Introduce action ct")
Signed-off-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
342afce10d
commit
2dc4e9e88c
@ -960,6 +960,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
|
|||||||
tmpl = p->tmpl;
|
tmpl = p->tmpl;
|
||||||
|
|
||||||
tcf_lastuse_update(&c->tcf_tm);
|
tcf_lastuse_update(&c->tcf_tm);
|
||||||
|
tcf_action_update_bstats(&c->common, skb);
|
||||||
|
|
||||||
if (clear) {
|
if (clear) {
|
||||||
qdisc_skb_cb(skb)->post_ct = false;
|
qdisc_skb_cb(skb)->post_ct = false;
|
||||||
@ -1049,7 +1050,6 @@ out_push:
|
|||||||
|
|
||||||
qdisc_skb_cb(skb)->post_ct = true;
|
qdisc_skb_cb(skb)->post_ct = true;
|
||||||
out_clear:
|
out_clear:
|
||||||
tcf_action_update_bstats(&c->common, skb);
|
|
||||||
if (defrag)
|
if (defrag)
|
||||||
qdisc_skb_cb(skb)->pkt_len = skb->len;
|
qdisc_skb_cb(skb)->pkt_len = skb->len;
|
||||||
return retval;
|
return retval;
|
||||||
|
Loading…
Reference in New Issue
Block a user