]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment
authorXin Long <lucien.xin@gmail.com>
Tue, 24 Jan 2017 06:05:16 +0000 (14:05 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Jan 2017 17:28:33 +0000 (12:28 -0500)
commit073024bc49ede330d087793e2065360dfe42ce09
tree7b7c11cc19faa188f7cf4b0c9c8e00e668f73fce
parentf03dd3f9d1f5ca5673c20f7b4f0737ce8a7bb785
sctp: sctp gso should set feature with NETIF_F_SG when calling skb_segment

Now sctp gso puts segments into skb's frag_list, then processes these
segments in skb_segment. But skb_segment handles them only when gs is
enabled, as it's in the same branch with skb's frags.

Although almost all the NICs support sg other than some old ones, but
since commit 45f325bb0a0e ("net: gso: use feature flag argument in all
protocol gso handlers"), features &= skb->dev->hw_enc_features, and
xfrm_output_gso call skb_segment with features = 0, which means sctp
gso would call skb_segment with sg = 0, and skb_segment would not work
as expected.

This patch is to fix it by setting features param with NETIF_F_SG when
calling skb_segment so that it can go the right branch to process the
skb's frag_list.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/offload.c