提交 d7fb5a80 编写于 作者: A Alexander Duyck 提交者: David S. Miller

gso: Do not perform partial GSO if number of partial segments is 1 or less

In the event that the number of partial segments is equal to 1 we don't
really need to perform partial segmentation offload.  As such we should
skip multiplying the MSS and instead just clear the partial_segs value
since it will not provide any gain to advertise the frame as being GSO when
it is a single frame.
Signed-off-by: NAlexander Duyck <aduyck@mirantis.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f132ae7c
......@@ -3101,7 +3101,10 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
*/
if (features & NETIF_F_GSO_PARTIAL) {
partial_segs = len / mss;
mss *= partial_segs;
if (partial_segs > 1)
mss *= partial_segs;
else
partial_segs = 0;
}
headroom = skb_headroom(head_skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册