From patchwork Thu Mar 26 13:57:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Petrilin X-Patchwork-Id: 25153 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 2397FDDE9E for ; Fri, 27 Mar 2009 00:58:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756538AbZCZN6a (ORCPT ); Thu, 26 Mar 2009 09:58:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755209AbZCZN63 (ORCPT ); Thu, 26 Mar 2009 09:58:29 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:53315 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753037AbZCZN63 (ORCPT ); Thu, 26 Mar 2009 09:58:29 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from yevgenyp@mellanox.co.il) with SMTP; 26 Mar 2009 15:58:25 +0200 Received: from [10.4.3.12] ([10.4.3.12]) by mtlexch01.mtl.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 26 Mar 2009 15:58:25 +0200 Message-ID: <49CB89C6.4060507@mellanox.co.il> Date: Thu, 26 Mar 2009 15:57:26 +0200 From: Yevgeny Petrilin User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: davem@davemloft.net CC: netdev@vger.kernel.org, tziporet@mellanox.co.il Subject: PATCH 4/6] mlx4_en: Shift completion vector index between ports X-OriginalArrivalTime: 26 Mar 2009 13:58:25.0391 (UTC) FILETIME=[EEB3BFF0:01C9AE1A] X-TM-AS-Product-Ver: SMEX-8.0.0.1181-5.600.1016-16542.007 X-TM-AS-Result: No--5.102200-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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%. Signed-off-by: Yevgeny Petrilin --- drivers/net/mlx4/en_cq.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c index 91f50de..450cf44 100644 --- a/drivers/net/mlx4/en_cq.c +++ b/drivers/net/mlx4/en_cq.c @@ -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;