From: David Miller <davem@davemloft.net>
To: laoar.shao@gmail.com
Cc: edumazet@google.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v2] tcp: propagate gso_segs to the new skb built in tcp collapse
Date: Tue, 07 Aug 2018 12:32:25 -0700 (PDT) [thread overview]
Message-ID: <20180807.123225.174635984138364812.davem@davemloft.net> (raw)
In-Reply-To: <1533464707-11777-1-git-send-email-laoar.shao@gmail.com>
From: Yafang Shao <laoar.shao@gmail.com>
Date: Sun, 5 Aug 2018 18:25:07 +0800
> The gso_segs of the new built SKB in tcp collapse is inited to 0,
> that makes us hard to know the accurate segments number of this new SKB.
> We'd better propagate the gso_segs of the collapsed SKB to the new built
> one, so when this SKB is dropped (for example when doing tcp prune) the
> sk_drops will be added to the correct value.
>
> If the collapsed SKB is fully copied to the new built one, we just add its
> gso_segs to the new SKB.
> While if the collapsed SKB is partially copied to the new built SKB,
> we have to caculate how many segments are copied.
> Furthemore, we have to reset the gso_segs of this SKB if is is partially
> copied, so in the next round when the left segments are copied it could
> propagate the correct value.
>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Eric, please review.
If partial copies are common, I wonder how much sense it makes to try to
avoid the DIV_ROUND_UP() operations.
prev parent reply other threads:[~2018-08-07 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-05 10:25 [PATCH net-next v2] tcp: propagate gso_segs to the new skb built in tcp collapse Yafang Shao
2018-08-07 19:32 ` David Miller [this message]
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=20180807.123225.174635984138364812.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).