net/mlx4: fix Rx packet type offloads
authorMoti Haimovsky <motih@mellanox.com>
Thu, 9 Nov 2017 08:59:33 +0000 (10:59 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 10 Nov 2017 02:29:56 +0000 (02:29 +0000)
commit78214fb8821fab0669c1c48f00fc4773e5a9eb98
tree8409faae298d1d7b6669bd6208dc28dd1d6dcdc6
parent79f47fc1b7b987b62b1a794f012d5a0253c8b17b
net/mlx4: fix Rx packet type offloads

This patch improves Rx packet type offload report in case the device is
a virtual function device.
In these devices we observed that the L2 tunnel flag is set also for
non-tunneled packets, this leads to a complete misinterpretation of the
packet type being received.
This issue occurs since the tunnel_mode is not set to 0x7 by the driver
for virtual devices and therefore the value in the L2 tunnel flag is
meaningless and should be ignored.

Fixes: aee4a03fee4f ("net/mlx4: enhance Rx packet type offloads")

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx4/mlx4_ethdev.c
drivers/net/mlx4/mlx4_rxq.c
drivers/net/mlx4/mlx4_rxtx.c
drivers/net/mlx4/mlx4_rxtx.h