Skip to contentSkip to conversation

PATCH 4/6] mlx4_en: Shift completion vector index between ports

PATCH Yevgeny Petrilin 1 participant 1 message Mar 26, 2009

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

For both ports UDP traffic is steered to RX ring 0. If both the ports attached RX ring 0 to the same completion vector, all UDP traffic for both ports will be handled by the same core. Making the shift would prevent this situation. Dual port UDP Bandwidth was increased by ~70%.

---
 drivers/net/mlx4/en_cq.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/net/mlx4/en_cq.c +2 -1
index 91f50de..450cf44 100644
@@ -53,7 +53,8 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
 	cq->size = entries;
 	if (mode == RX) {
 		cq->buf_size = cq->size * sizeof(struct mlx4_cqe);
-		cq->vector   = ring % mdev->dev->caps.num_comp_vectors;
+		cq->vector   = (ring + priv->port) %
+				mdev->dev->caps.num_comp_vectors;
 	} else {
 		cq->buf_size = sizeof(struct mlx4_cqe);
 		cq->vector   = 0;
Signature · 1 line
1.6.1.3