All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion
@ 2019-11-15 20:12 Luigi Rizzo
  2019-11-16 21:10 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: Luigi Rizzo @ 2019-11-15 20:12 UTC (permalink / raw)
  To: netdev; +Cc: linux-rdma, linux-kernel, Luigi Rizzo

ethtool expects ETHTOOL_GRXCLSRLALL to set ethtool_rxnfc->data with the
total number of entries in the rx classifier table.  Surprisingly, mlx4
is missing this part (in principle ethtool could still move forward and
try the insert).

Tested: compiled and run command:
	phh13:~# ethtool -N eth1 flow-type udp4  queue 4
	Added rule with ID 255

Signed-off-by: Luigi Rizzo <lrizzo@google.com>
Change-Id: I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index d8313e2ee6002..c12da02c2d1bd 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -1745,6 +1745,7 @@ static int mlx4_en_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
 		err = mlx4_en_get_flow(dev, cmd, cmd->fs.location);
 		break;
 	case ETHTOOL_GRXCLSRLALL:
+		cmd->data = MAX_NUM_OF_FS_RULES;
 		while ((!err || err == -ENOENT) && priority < cmd->rule_cnt) {
 			err = mlx4_en_get_flow(dev, cmd, i);
 			if (!err)
-- 
2.24.0.432.g9d3f5f5b63-goog


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

end of thread, other threads:[~2019-11-18 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 20:12 [PATCH] net/mlx4_en: fix mlx4 ethtool -N insertion Luigi Rizzo
2019-11-16 21:10 ` David Miller
2019-11-17 14:46   ` Tariq Toukan
2019-11-17 18:29     ` David Miller
2019-11-18 17:38       ` Luigi Rizzo
2019-11-17 15:28   ` Gal Pressman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.