net/mlx4_en: Advertize encapsulation offloads features only when VXLAN tunnel is set
authorOr Gerlitz <ogerlitz@mellanox.com>
Sun, 9 Nov 2014 12:25:39 +0000 (14:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Nov 2014 18:24:45 +0000 (13:24 -0500)
commitf4a1edd56120249198073aa4a373b77e3700ac8f
treef8928981e1473346588d3624e0f1b787705f1a85
parenta815286b94875c0428444e036df7e4e1a070bec0
net/mlx4_en: Advertize encapsulation offloads features only when VXLAN tunnel is set

Currenly we only support Large-Send and TX checksum offloads for
encapsulated traffic of type VXLAN. We must make sure to advertize
these offloads up to the stack only when VXLAN tunnel is set.

Failing to do so, would mislead the the networking stack to assume
that the driver can offload the internal TX checksum for GRE packets
and other buggy schemes.

Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c