Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7fb5a80 authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

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: default avatarAlexander Duyck <aduyck@mirantis.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f132ae7c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3101,7 +3101,10 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
	 */
	if (features & NETIF_F_GSO_PARTIAL) {
		partial_segs = len / mss;
		if (partial_segs > 1)
			mss *= partial_segs;
		else
			partial_segs = 0;
	}

	headroom = skb_headroom(head_skb);