* [PATCH 2/6] mlx4_en: Separating default QP in RSS context
@ 2009-03-26 13:49 Yevgeny Petrilin
2009-03-27 7:35 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Yevgeny Petrilin @ 2009-03-26 13:49 UTC (permalink / raw)
To: davem; +Cc: netdev, tziporet
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(-)
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
--
1.6.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/6] mlx4_en: Separating default QP in RSS context
2009-03-26 13:49 [PATCH 2/6] mlx4_en: Separating default QP in RSS context Yevgeny Petrilin
@ 2009-03-27 7:35 ` David Miller
2009-03-29 10:10 ` Yevgeny Petrilin
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2009-03-27 7:35 UTC (permalink / raw)
To: yevgenyp; +Cc: netdev, tziporet
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/6] mlx4_en: Separating default QP in RSS context
2009-03-27 7:35 ` David Miller
@ 2009-03-29 10:10 ` Yevgeny Petrilin
2009-03-29 10:12 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Yevgeny Petrilin @ 2009-03-29 10:10 UTC (permalink / raw)
To: David Miller; +Cc: netdev, tziporet
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/6] mlx4_en: Separating default QP in RSS context
2009-03-29 10:10 ` Yevgeny Petrilin
@ 2009-03-29 10:12 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-03-29 10:12 UTC (permalink / raw)
To: yevgenyp; +Cc: netdev, tziporet
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-29 10:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 13:49 [PATCH 2/6] mlx4_en: Separating default QP in RSS context Yevgeny Petrilin
2009-03-27 7:35 ` David Miller
2009-03-29 10:10 ` Yevgeny Petrilin
2009-03-29 10:12 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).