Patchwork [2/6] mlx4_en: Separating default QP in RSS context

login
register
mail settings
Submitter Yevgeny Petrilin
Date March 26, 2009, 1:49 p.m.
Message ID <49CB87EB.8060404@mellanox.co.il>
Download mbox | patch
Permalink /patch/25151/
State Rejected
Delegated to: David Miller
Headers show

Comments

Yevgeny Petrilin - March 26, 2009, 1:49 p.m.
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.

Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
---
 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(-)
David Miller - March 27, 2009, 7:35 a.m.
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Thu, 26 Mar 2009 15:49:31 +0200

> 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.
> 
> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>

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.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Yevgeny Petrilin - March 29, 2009, 10:10 a.m.
David Miller wrote:

> 
> 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 understand, but patches 1,5,6 have nothing to do with this change
and touch completely other parts of the driver.

Thanks,
Yevgeny

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - March 29, 2009, 10:12 a.m.
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Sun, 29 Mar 2009 13:10:57 +0300

> 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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c
index eda72dd..ca6f7dc 100644
--- a/drivers/net/mlx4/en_main.c
+++ b/drivers/net/mlx4/en_main.c
@@ -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);
 	}
diff --git a/drivers/net/mlx4/en_params.c b/drivers/net/mlx4/en_params.c
index c1bd040..7f44fcb 100644
--- a/drivers/net/mlx4/en_params.c
+++ b/drivers/net/mlx4/en_params.c
@@ -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,
diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c
index a4130e7..b8c7182 100644
--- a/drivers/net/mlx4/en_rx.c
+++ b/drivers/net/mlx4/en_rx.c
@@ -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;
diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h
index e9af32d..8fe1d39 100644
--- a/drivers/net/mlx4/mlx4_en.h
+++ b/drivers/net/mlx4/mlx4_en.h
@@ -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