mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
net/mlx4_en: fix mlx4 ethtool -N insertion
[ Upstream commit 34e5983656 ]
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>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
baa888ca02
commit
5408138df1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user