]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Verify coalescing parameters in range
authorMoshe Shemesh <moshe@mellanox.com>
Thu, 15 Feb 2018 10:41:48 +0000 (12:41 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 26 Mar 2018 20:58:15 +0000 (13:58 -0700)
commit5919a2729758990ee1f3287faf4318b407803b74
tree65942abe7e55a0bc77fdff8f523b678d1efd3c4d
parentee7090fad033e836855589b9f8ad9ef57c1a0747
net/mlx5e: Verify coalescing parameters in range

Add check of coalescing parameters received through ethtool are within
range of values supported by the HW.
Driver gets the coalescing rx/tx-usecs and rx/tx-frames as set by the
users through ethtool. The ethtool support up to 32 bit value for each.
However, mlx5 modify cq limits the coalescing time parameter to 12 bit
and coalescing frames parameters to 16 bits.
Return out of range error if user tries to set these parameters to
higher values.

Fixes: 9df41abb3a64 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c