gso: Support partial splitting at the frag_list pointer
Since commit 8a29111c7
("net: gro: allow to build full sized skb")
gro may build buffers with a frag_list. This can hurt forwarding
because most NICs can't offload such packets, they need to be
segmented in software. This patch splits buffers with a frag_list
at the frag_list pointer into buffers that can be TSO offloaded.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e867e87ae8
commit
07b26c9454
@@ -69,6 +69,7 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
|
||||
int offset = 0;
|
||||
bool encap, udpfrag;
|
||||
int nhoff;
|
||||
bool gso_partial;
|
||||
|
||||
skb_reset_network_header(skb);
|
||||
nhoff = skb_network_header(skb) - skb_mac_header(skb);
|
||||
@@ -101,9 +102,11 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb,
|
||||
if (IS_ERR(segs))
|
||||
goto out;
|
||||
|
||||
gso_partial = !!(skb_shinfo(segs)->gso_type & SKB_GSO_PARTIAL);
|
||||
|
||||
for (skb = segs; skb; skb = skb->next) {
|
||||
ipv6h = (struct ipv6hdr *)(skb_mac_header(skb) + nhoff);
|
||||
if (skb_is_gso(skb))
|
||||
if (gso_partial)
|
||||
payload_len = skb_shinfo(skb)->gso_size +
|
||||
SKB_GSO_CB(skb)->data_offset +
|
||||
skb->head - (unsigned char *)(ipv6h + 1);
|
||||
|
Reference in New Issue
Block a user