net/mlx5e: Fix features check of IPv6 traffic
authorGal Pressman <galp@mellanox.com>
Tue, 21 Nov 2017 15:49:36 +0000 (17:49 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 19 Dec 2017 21:24:00 +0000 (23:24 +0200)
commit2989ad1ec03021ee6d2193c35414f1d970a243de
tree16008845aa101822e7b294d52211bcfc47f9f973
parentff0891915cd7b24ab27eee9b360c0452853bf9f6
net/mlx5e: Fix features check of IPv6 traffic

The assumption that the next header field contains the transport
protocol is wrong for IPv6 packets with extension headers.
Instead, we should look the inner-most next header field in the buffer.
This will fix TSO offload for tunnels over IPv6 with extension headers.

Performance testing: 19.25x improvement, cool!
Measuring bandwidth of 16 threads TCP traffic over IPv6 GRE tap.
CPU: Intel(R) Xeon(R) CPU E5-2660 v2 @ 2.20GHz
NIC: Mellanox Technologies MT28800 Family [ConnectX-5 Ex]
TSO: Enabled
Before: 4,926.24  Mbps
Now   : 94,827.91 Mbps

Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c