From: Xin Long Date: Fri, 15 Jan 2021 09:36:39 +0000 (+0800) Subject: sctp: remove the NETIF_F_SG flag before calling skb_segment X-Git-Tag: v5.12-rc1~200^2~315^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fef8544bf41fb77d6603feb9a31cd76b4578489;p=thirdparty%2Flinux.git sctp: remove the NETIF_F_SG flag before calling skb_segment It makes more sense to clear NETIF_F_SG instead of set it when calling skb_segment() in sctp_gso_segment(), since SCTP GSO is using head_skb's fraglist, of which all frags are linear skbs. This will make SCTP GSO code more understandable. Suggested-by: Alexander Duyck Signed-off-by: Xin Long Signed-off-by: Jakub Kicinski --- diff --git a/net/sctp/offload.c b/net/sctp/offload.c index ce281a9a28752..eb874e3c399a5 100644 --- a/net/sctp/offload.c +++ b/net/sctp/offload.c @@ -68,7 +68,7 @@ static struct sk_buff *sctp_gso_segment(struct sk_buff *skb, goto out; } - segs = skb_segment(skb, features | NETIF_F_HW_CSUM | NETIF_F_SG); + segs = skb_segment(skb, (features | NETIF_F_HW_CSUM) & ~NETIF_F_SG); if (IS_ERR(segs)) goto out;