]> git.baikalelectronics.ru Git - kernel.git/commit
gso: Validate assumption of frag_list segementation
authorIlan Tayari <ilant@mellanox.com>
Sun, 16 Apr 2017 08:00:07 +0000 (11:00 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2017 19:31:29 +0000 (15:31 -0400)
commitb7b6aa080d9bd65a055ce8fa45357891a8e4f111
tree92bc398c76521edd68455b435930cd80ea57546c
parentfb1735f8f4d78f4d3ecf2f00612330a61a145874
gso: Validate assumption of frag_list segementation

Commit 32fc9df3b6ee ("gso: Support partial splitting at the frag_list
pointer") assumes that all SKBs in a frag_list (except maybe the last
one) contain the same amount of GSO payload.

This assumption is not always correct, resulting in the following
warning message in the log:
    skb_segment: too many frags

For example, mlx5 driver in Striding RQ mode creates some RX SKBs with
one frag, and some with 2 frags.
After GRO, the frag_list SKBs end up having different amounts of payload.
If this frag_list SKB is then forwarded, the aforementioned assumption
is violated.

Validate the assumption, and fall back to software GSO if it not true.

Fixes: 32fc9df3b6ee ("gso: Support partial splitting at the frag_list pointer")
Signed-off-by: Ilan Tayari <ilant@mellanox.com>
Signed-off-by: Ilya Lesokhin <ilyal@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c