Skip to contentSkip to conversation

be2net: remove unused local rsstable array

PATCH Applied Ivan Vecera 3 participants 5 messages Nov 13, 2015 – Nov 16, 2015

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

PATCH 1/2 be2net: remove unused local rsstable array

Remove rsstable array and its initialization from be_set_rss_hash_opts(). The array became unused after "e255787 be2net: Support for configurable RSS hash key". The initial RSS table is now filled and stored for later usage during Rx queue creation.

---
 drivers/net/ethernet/emulex/benet/be_ethtool.c | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
drivers/net/ethernet/emulex/benet/be_ethtool.c +2 -14
index 26b6192..3d8c6c1 100644
@@ -1064,9 +1064,7 @@ static int be_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
 static int be_set_rss_hash_opts(struct be_adapter *adapter,
 				struct ethtool_rxnfc *cmd)
 {
-	struct be_rx_obj *rxo;
-	int status = 0, i, j;
-	u8 rsstable[128];
+	int status;
 	u32 rss_flags = adapter->rss_info.rss_flags;
 
 	if (cmd->data != L3_RSS_FLAGS &&
@@ -1115,17 +1113,7 @@ static int be_set_rss_hash_opts(struct be_adapter *adapter,
 	}
 
 	if (rss_flags == adapter->rss_info.rss_flags)
-		return status;
-
-	if (be_multi_rxq(adapter)) {
-		for (j = 0; j < 128; j += adapter->num_rss_qs) {
-			for_all_rss_queues(adapter, rxo, i) {
-				if ((j + i) >= 128)
-					break;
-				rsstable[j + i] = rxo->rss_id;
-			}
-		}
-	}
+		return 0;
 
 	status = be_cmd_rss_config(adapter, adapter->rss_info.rsstable,
 				   rss_flags, 128, adapter->rss_info.rss_hkey);
Signature · 1 line
2.4.10
#1 lore raw

PATCH 2/2 be2net: replace hardcoded values with existing define

---
 drivers/net/ethernet/emulex/benet/be_ethtool.c | 3 ++-
 drivers/net/ethernet/emulex/benet/be_main.c    | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/emulex/benet/be_ethtool.c +2 -1
index 3d8c6c1..2362304 100644
@@ -1116,7 +1116,8 @@ static int be_set_rss_hash_opts(struct be_adapter *adapter,
 		return 0;
 
 	status = be_cmd_rss_config(adapter, adapter->rss_info.rsstable,
-				   rss_flags, 128, adapter->rss_info.rss_hkey);
+				   rss_flags, RSS_INDIR_TABLE_LEN,
+				   adapter->rss_info.rss_hkey);
 	if (!status)
 		adapter->rss_info.rss_flags = rss_flags;
 
drivers/net/ethernet/emulex/benet/be_main.c +1 -1
index eb48a97..b6ad029 100644
@@ -3518,7 +3518,7 @@ static int be_rx_qs_create(struct be_adapter *adapter)
 
 	netdev_rss_key_fill(rss_key, RSS_HASH_KEY_LEN);
 	rc = be_cmd_rss_config(adapter, rss->rsstable, rss->rss_flags,
-			       128, rss_key);
+			       RSS_INDIR_TABLE_LEN, rss_key);
 	if (rc) {
 		rss->rss_flags = RSS_ENABLE_NONE;
 		return rc;
Signature · 1 line
2.4.10
maintainer Applied
#4 lore raw
In reply to Ivan Vecera

From: Ivan Vecera <[email protected]>
Date: Fri, 13 Nov 2015 11:36:57 +0100

Quoted 6 lines

Remove rsstable array and its initialization from be_set_rss_hash_opts(). The array became unused after "e255787 be2net: Support for configurable RSS hash key". The initial RSS table is now filled and stored for later usage during Rx queue creation.

Applied.