netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: wenxu@ucloud.cn
To: kuba@kernel.org, marcelo.leitner@gmail.com, vladbu@nvidia.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com
Cc: netdev@vger.kernel.org
Subject: [PATCH v3 net-next 1/3] net/sched: fix miss init the mru in qdisc_skb_cb
Date: Fri, 20 Nov 2020 07:38:34 +0800	[thread overview]
Message-ID: <1605829116-10056-2-git-send-email-wenxu@ucloud.cn> (raw)
In-Reply-To: <1605829116-10056-1-git-send-email-wenxu@ucloud.cn>

From: wenxu <wenxu@ucloud.cn>

The mru in the qdisc_skb_cb should be init as 0. Only defrag packets in the
act_ct will set the value.

Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct")
Signed-off-by: wenxu <wenxu@ucloud.cn>
---
v3: no change

 net/core/dev.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 60d325b..d0efa98 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3867,6 +3867,7 @@ int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *skb)
 		return skb;
 
 	/* qdisc_skb_cb(skb)->pkt_len was already set by the caller. */
+	qdisc_skb_cb(skb)->mru = 0;
 	mini_qdisc_bstats_cpu_update(miniq, skb);
 
 	switch (tcf_classify(skb, miniq->filter_list, &cl_res, false)) {
@@ -4954,6 +4955,7 @@ static __latent_entropy void net_tx_action(struct softirq_action *h)
 	}
 
 	qdisc_skb_cb(skb)->pkt_len = skb->len;
+	qdisc_skb_cb(skb)->mru = 0;
 	skb->tc_at_ingress = 1;
 	mini_qdisc_bstats_cpu_update(miniq, skb);
 
-- 
1.8.3.1


  reply	other threads:[~2020-11-20  0:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 23:38 [PATCH v3 net-next 0/3] net/sched: fix over mtu packet of defrag in wenxu
2020-11-19 23:38 ` wenxu [this message]
2020-11-19 23:38 ` [PATCH v3 net-next 2/3] net/sched: act_mirred: refactor the handle of xmit wenxu
2020-11-19 23:38 ` [PATCH v3 net-next 3/3] net/sched: sch_frag: add generic packet fragment support wenxu
2020-11-24 19:24   ` Jakub Kicinski
2020-11-24 23:10     ` wenxu
2020-11-25  0:02       ` Jakub Kicinski
2020-11-20 19:28 ` [PATCH v3 net-next 0/3] net/sched: fix over mtu packet of defrag in Cong Wang
2020-11-21 14:39   ` Jamal Hadi Salim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1605829116-10056-2-git-send-email-wenxu@ucloud.cn \
    --to=wenxu@ucloud.cn \
    --cc=jhs@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=marcelo.leitner@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vladbu@nvidia.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).