]> git.baikalelectronics.ru Git - kernel.git/commit
gso: Support frag_list splitting with head_frag
authorIlan Tayari <ilant@mellanox.com>
Fri, 7 Apr 2017 23:07:08 +0000 (02:07 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Apr 2017 17:53:35 +0000 (13:53 -0400)
commit37824758ff7838f77bc821a0440d63644b22b0c5
tree62d74910d1cb8b124c36ceb05f1502163ac6b82f
parentc0434868c798114c8b7738d1594edfec9e28090c
gso: Support frag_list splitting with head_frag

A driver may use build_skb() for received packets.
These SKBs then have a head_frag.

Since commit 6ea616cbc94c ("net: make GRO aware of
skb->head_frag"), GRO may build frag_list SKBs out of
head_frag received SKBs.
In such a case, the chained SKBs end up with a head_frag.

Commit 32fc9df3b6ee ("gso: Support partial splitting at
the frag_list pointer") adds partial segmentation of frag_list
SKB chains into individual SKBs.
However, this is not done if the chained SKBs have any
linear part, because the device may not be able to DMA
the private linear buffer.

A chained frag_list SKB with head_frag is wrongfully
detected in this case as having a private linear part
and thus falls back to software GSO, while in fact the
linear part is backed by a DMA page just like any other frag.

This causes low performance when forwarding those packets
that were built with build_skb()

Allow partial segmentation at the frag_list pointer for
chained SKBs with head_frag.

Note that such SKBs can only be created by GRO, when applied
to received packets with head_frag.
Also note that this change only affects the data path that
performs the partial segmentation at frag_list pointer, and
not any of the other more common data paths.

Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c