OSDN Git Service

net/mlx4_en: Fix wrong csum complete report when rxvlan offload is disabled
authorIdo Shamay <idos@mellanox.com>
Thu, 25 Jun 2015 08:29:43 +0000 (11:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2015 16:45:35 +0000 (09:45 -0700)
commitf8975e1fd5aef2b07b8b016ce2b1c19b078ac7d8
tree6e281068caf7991c2926dd41a254d5e5c83cd1e5
parent9c6dc1096617880c9ef6f3b45e3d9d3309f4cd37
net/mlx4_en: Fix wrong csum complete report when rxvlan offload is disabled

[ Upstream commit 79a258526ce1051cb9684018c25a89d51ac21be8 ]

The check_csum() function relied on hwtstamp_rx_filter to know if rxvlan
offload is disabled. This is wrong since rxvlan offload can be switched
on/off regardless of hwtstamp_rx_filter.

Also moved check_csum to query CQE information to identify VLAN packets
and removed the check of IP packets, since it has been validated before.

Fixes: f8c6455bb04b ('net/mlx4_en: Extend checksum offloading by CHECKSUM COMPLETE')
Signed-off-by: Ido Shamay <idos@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx4/en_rx.c