]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: check ethtool sets the Tx ring size is to a valid min value
authorAntoine Tenart <antoine.tenart@free-electrons.com>
Tue, 28 Nov 2017 13:19:51 +0000 (14:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 15:09:51 +0000 (10:09 -0500)
commit9ae57e08f873ba4501203bbfb236a781d403b6ce
treefeeb2fcd6ff42b87077df648ae6f82f09c48a386
parent68d2a9ba317d80e940665f87d5c3eacaf34b5685
net: mvpp2: check ethtool sets the Tx ring size is to a valid min value

This patch fixes the Tx ring size checks when using ethtool, by adding
an extra check in the PPv2 check_ringparam_valid helper. The Tx ring
size cannot be set to a value smaller than the minimum number of
descriptors needed for TSO.

Fixes: f1dd950579cf ("net: mvpp2: limit TSO segments and use stop/wake thresholds")
Suggested-by: Yan Markman <ymarkman@marvell.com>
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c