public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] ethtool ringparam upper bound
@ 2018-01-08 14:00 Tariq Toukan
  2018-01-08 14:00 ` [PATCH net-next 1/3] ethtool: Ensure new ring parameters are within bounds during SRINGPARAM Tariq Toukan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tariq Toukan @ 2018-01-08 14:00 UTC (permalink / raw)
  To: David S. Miller; +Cc: netdev, Eran Ben Elisha, Eugenia Emantayev, Tariq Toukan

Hi Dave,

This patchset by Jenny adds sanity checks in ethtool ringparam
operation for input upper bounds, similarly to what's done in
ethtool_set_channels.

The checks are added in patch 1, using a call to get_ringparam
prior to calling set_ringparam NDO.

Patch 2 changes the function's behavior in mlx4_en, so that
it returns an error for out-of-range input, instead of rounding
it to closest valid, similar to mlx5e.

Patch 3 removes the upper bound checks in mlx5e_ethtool_set_ringparam
as it becomes redundant.

Series generated against net-next commit:
f66faae2f80a Merge branch 'ipv6-ipv4-nexthop-align'

Thanks,
Tariq.


Eugenia Emantayev (3):
  ethtool: Ensure new ring parameters are within bounds during
    SRINGPARAM
  net/mlx4_en: Align behavior of set ring size flow via ethtool
  net/mlx5e: Remove redundant checks in set_ringparam

 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c      | 17 +++++++++++++----
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 15 ---------------
 net/core/ethtool.c                                   | 13 +++++++++++--
 3 files changed, 24 insertions(+), 21 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-01-09 16:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-08 14:00 [PATCH net-next 0/3] ethtool ringparam upper bound Tariq Toukan
2018-01-08 14:00 ` [PATCH net-next 1/3] ethtool: Ensure new ring parameters are within bounds during SRINGPARAM Tariq Toukan
2018-01-09  2:23   ` Jakub Kicinski
2018-01-09  7:30     ` Tariq Toukan
2018-01-09  7:35       ` Jakub Kicinski
2018-01-08 14:00 ` [PATCH net-next 2/3] net/mlx4_en: Align behavior of set ring size flow via ethtool Tariq Toukan
2018-01-08 14:00 ` [PATCH net-next 3/3] net/mlx5e: Remove redundant checks in set_ringparam Tariq Toukan
2018-01-09 16:55 ` [PATCH net-next 0/3] ethtool ringparam upper bound David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox