net/mlx5e: Fix inline header size for small packets
authorMoshe Shemesh <moshe@mellanox.com>
Tue, 8 Aug 2017 12:56:37 +0000 (15:56 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Sep 2017 06:22:09 +0000 (08:22 +0200)
commit8049c41db78d2d9cf299a4300732f9776a2affe7
treef457eb8f9303c441a8f3bc58bf94901a409b4abb
parent8db40bcf439f3939d16de824adc7a0d781390761
net/mlx5e: Fix inline header size for small packets

[ Upstream commit 6aace17e64f4aa1c49802c46bd10688968b3787f ]

Fix inline header size, make sure it is not greater than skb len.
This bug effects small packets, for example L2 packets with size < 18.

Fixes: ae76715d153e ("net/mlx5e: Check the minimum inline header mode before xmit")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c