Skip to contentSkip to conversation

Patch "net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling" has been added to the 4.10-stable tree

PATCH [email protected] 1 participant 1 message Apr 29, 2017

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling

to the 4.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-mlx5e-fix-ethtool_grxclsrlall-handling.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sat Apr 29 08:22:40 CEST 2017

From: Ilan Tayari <[email protected]>
Date: Thu, 2 Mar 2017 15:49:45 +0200
Subject: net/mlx5e: Fix ETHTOOL_GRXCLSRLALL handling

From: Ilan Tayari <[email protected]>

[ Upstream commit 5e82c9e4ed60beba83f46a1a5a8307b99a23e982 ]

Handler for ETHTOOL_GRXCLSRLALL must set info->data to the size of the table, regardless of the amount of entries in it. Existing code does not do that, and this breaks all usage of ethtool -N or -n without explicit location, with this error:
rmgr: Invalid RX class rules table size: Success

Set info->data to the table size.

Tested:
ethtool -n ens8
ethtool -N ens8 flow-type ip4 src-ip 1.1.1.1 dst-ip 2.2.2.2 action 1 ethtool -N ens8 flow-type ip4 src-ip 1.1.1.1 dst-ip 2.2.2.2 action 1 loc 55 ethtool -n ens8
ethtool -N ens8 delete 1023
ethtool -N ens8 delete 55

Fixes f913a72aa008 ("net/mlx5e: Add support to get ethtool flow rules")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c |    1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +1 -0
@@ -564,6 +564,7 @@ int mlx5e_ethtool_get_all_flows(struct m
 	int idx = 0;
 	int err = 0;
 
+	info->data = MAX_NUM_OF_ETHTOOL_RULES;
 	while ((!err || err == -ENOENT) && idx < info->rule_cnt) {
 		err = mlx5e_ethtool_get_flow(priv, info, location);
 		if (!err)

Patches currently in stable-queue which might be from [email protected] are

queue-4.10/gso-validate-assumption-of-frag_list-segementation.patch queue-4.10/net-mlx5e-fix-ethtool_grxclsrlall-handling.patch