Skip to contentSkip to conversation

net/mlx4_en: fix mlx4 ethtool -N insertion

PATCH In review Luigi Rizzo 4 participants 6 messages Nov 15, 2019 – Nov 18, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx4_en: fix mlx4 ethtool -N insertion

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
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +1 -0
index d8313e2ee6002..c12da02c2d1bd 100644
@@ -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)
Signature · 1 line
2.24.0.432.g9d3f5f5b63-goog
maintainer
#1 lore raw

From: Luigi Rizzo <[email protected]>
Date: Fri, 15 Nov 2019 12:12:25 -0800

Quoted 11 lines

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
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76

Luigi, _always_ CC: the appropriate maintainer when making changes to the kernel, as per the top-level MAINTAINERS file.

Tariq et al., please review.

Reviewed-by
#2 lore raw
Quoted 12 lines · David Miller

From: Luigi Rizzo <[email protected]>
Date: Fri, 15 Nov 2019 12:12:25 -0800

Quoted 9 lines

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
Quoted 8 lines
Quoted 2 lines
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76

Luigi, _always_ CC: the appropriate maintainer when making changes to the kernel, as per the top-level MAINTAINERS file.

Tariq et al., please review.

Thanks for your patch.

Tariq

maintainer
#3 lore raw

From: Tariq Toukan <[email protected]>
Date: Sun, 17 Nov 2019 14:46:50 +0000

Quoted 18 lines · David Miller
Quoted 15 lines

From: Luigi Rizzo <[email protected]>
Date: Fri, 15 Nov 2019 12:12:25 -0800

Quoted 11 lines

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
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76
Quoted 7 lines
Quoted 5 lines

Luigi, _always_ CC: the appropriate maintainer when making changes to the kernel, as per the top-level MAINTAINERS file.

Tariq et al., please review.

Applied and queued up for -stable, with Change-Id: removed.

#4 lore raw
Quoted 25 lines · David Miller

From: Tariq Toukan <[email protected]>
Date: Sun, 17 Nov 2019 14:46:50 +0000

Quoted 21 lines · David Miller
Quoted 18 lines

From: Luigi Rizzo <[email protected]>
Date: Fri, 15 Nov 2019 12:12:25 -0800

Quoted 11 lines

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
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76

Luigi, _always_ CC: the appropriate maintainer when making changes to the kernel, as per the top-level MAINTAINERS file.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Tariq et al., please review.

Applied and queued up for -stable, with Change-Id: removed.

Thank you all, apologies for mistakes.

cheers
luigi

#5 lore raw
In reply to David Miller
Quoted 12 lines · David Miller

From: Luigi Rizzo <[email protected]>
Date: Fri, 15 Nov 2019 12:12:25 -0800

Quoted 9 lines

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
Quoted 5 lines
Quoted 2 lines
Change-Id I18a72f08dfcfb6b9f6aa80fbc12d58553e1fda76

Luigi, _always_ CC: the appropriate maintainer when making changes to the kernel, as per the top-level MAINTAINERS file.

You should also remove the Change-Id tag before submission.