Skip to contentSkip to conversation

mlx4_en: Separating default QP in RSS context

PATCH In review Yevgeny Petrilin 2 participants 4 messages Mar 26, 2009 – Mar 29, 2009

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

PATCH 2/6 mlx4_en: Separating default QP in RSS context

The default QP number in RSS is no longer part of the RSS table. We want to separate TCP streams from other streams because we want to handle them differently. Changed the RSS mask to perform the hashing on TCP packets only and to send all the others to the default ring.

---
 drivers/net/mlx4/en_main.c   |    2 +-
 drivers/net/mlx4/en_params.c |    2 +-
 drivers/net/mlx4/en_rx.c     |    4 ++--
 drivers/net/mlx4/mlx4_en.h   |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/mlx4/en_main.c +1 -1
index eda72dd..ca6f7dc 100644
@@ -170,7 +170,7 @@ static void *mlx4_en_add(struct mlx4_dev *dev)
 		mlx4_info(mdev, "Using %d tx rings for port:%d\n",
 			  mdev->profile.prof[i].tx_ring_num, i);
 		mdev->profile.prof[i].rx_ring_num =
-			min_t(int, dev->caps.num_comp_vectors, MAX_RX_RINGS);
+			min_t(int, dev->caps.num_comp_vectors + 1, MAX_RX_RINGS);
 		mlx4_info(mdev, "Defaulting to %d rx rings for port:%d\n",
 			  mdev->profile.prof[i].rx_ring_num, i);
 	}
drivers/net/mlx4/en_params.c +1 -1
index c1bd040..7f44fcb 100644
@@ -53,7 +53,7 @@
 MLX4_EN_PARM_INT(rss_xor, 0, "Use XOR hash function for RSS");
 
 /* RSS hash type mask - default to <saddr, daddr, sport, dport> */
-MLX4_EN_PARM_INT(rss_mask, 0xf, "RSS hash type bitmask");
+MLX4_EN_PARM_INT(rss_mask, 0x5, "RSS hash type bitmask");
 
 /* Number of LRO sessions per Rx ring (rounded up to a power of two) */
 MLX4_EN_PARM_INT(num_lro, MLX4_EN_MAX_LRO_DESCRIPTORS,
drivers/net/mlx4/en_rx.c +2 -2
index a4130e7..b8c7182 100644
@@ -1022,8 +1022,8 @@ int mlx4_en_config_rss_steer(struct mlx4_en_priv *priv)
 
 	ptr = ((void *) &context) + 0x3c;
 	rss_context = (struct mlx4_en_rss_context *) ptr;
-	rss_context->base_qpn = cpu_to_be32(ilog2(rss_map->size) << 24 |
-					    (rss_map->base_qpn));
+	rss_context->base_qpn = cpu_to_be32(ilog2(rss_map->size - 1) << 24 |
+					    (rss_map->base_qpn + 1));
 	rss_context->default_qpn = cpu_to_be32(rss_map->base_qpn);
 	rss_context->hash_fn = rss_xor & 0x3;
 	rss_context->flags = rss_mask << 2;
drivers/net/mlx4/mlx4_en.h +2 -2
index e9af32d..8fe1d39 100644
@@ -78,9 +78,9 @@
 #define MLX4_EN_PAGE_SHIFT	12
 #define MLX4_EN_PAGE_SIZE	(1 << MLX4_EN_PAGE_SHIFT)
 #define MAX_TX_RINGS		16
-#define MAX_RX_RINGS		16
+#define MAX_RX_RINGS		17
 #define MAX_RSS_MAP_SIZE	64
-#define RSS_FACTOR		2
+#define RSS_FACTOR		1
 #define TXBB_SIZE		64
 #define HEADROOM		(2048 / TXBB_SIZE + 1)
 #define MAX_LSO_HDR_SIZE	92
Signature · 1 line
1.6.1.3
maintainer
#1 lore raw

From: Yevgeny Petrilin <[email protected]>
Date: Thu, 26 Mar 2009 15:49:31 +0200

Quoted 7 lines

The default QP number in RSS is no longer part of the RSS table. We want to separate TCP streams from other streams because we want to handle them differently. Changed the RSS mask to perform the hashing on TCP packets only and to send all the others to the default ring.

I disagree with this change. I understand why you are doing it, to implement your frag'd vs. non-frag'd skb patch coming up.

But that doesn't make it any more right.

UDP and IPSEC traffic should be multiqueue balanced just like any other traffic.

I'm not applying this patch set, sorry.

I'd also like to ask you to convert your driver over to GRO instead of LRO which we are trying to deprecate.

#2 lore raw
Quoted 5 lines · David Miller

I disagree with this change. I understand why you are doing it, to implement your frag'd vs. non-frag'd skb patch coming up.

Quoted 7 lines

But that doesn't make it any more right.

UDP and IPSEC traffic should be multiqueue balanced just like any other traffic.

I'm not applying this patch set, sorry.

I understand, but patches 1,5,6 have nothing to do with this change and touch completely other parts of the driver.

Thanks,
Yevgeny

maintainer
#3 lore raw

From: Yevgeny Petrilin <[email protected]>
Date: Sun, 29 Mar 2009 13:10:57 +0300

Quoted 2 lines

I understand, but patches 1,5,6 have nothing to do with this change and touch completely other parts of the driver.

Then resubmit them as an independent submission.

GIT wouldn't accept them as the line numbers would be different etc.