From patchwork Sat May 26 15:15:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xueming Li X-Patchwork-Id: 40442 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F8B82BF7; Sat, 26 May 2018 17:25:52 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id F04EC23A for ; Sat, 26 May 2018 17:25:50 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 26 May 2018 18:17:28 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w4QFFQYp011235; Sat, 26 May 2018 18:15:26 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id w4QFFQNS008624; Sat, 26 May 2018 23:15:26 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w4QFFL8m008623; Sat, 26 May 2018 23:15:21 +0800 From: Xueming Li To: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Cc: Xueming Li , dev@dpdk.org, Shahaf Shuler Date: Sat, 26 May 2018 23:15:20 +0800 Message-Id: <20180526151520.8579-1-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] app/testpmd: distribute queues to cores X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Current topology distribute forwarding streams to lcores by port, this make unbalanced loading when port number larger than 2: lcore 0: P0Q0->P1Q0, P0Q1->P1Q1 locre 1: P1Q0->P0Q0, P1Q1->P0Q1 If only one port has traffic, only one locre get fully loaded and the other one get no forwarding. Performance is bad as only one core doing forwarding in such case. This patch distributes forwarding streams by queue, try to get streams of each port handled by different lcore: lcore 0: P0Q0->P1Q0, P1Q0->P1Q0 locre 1: P0Q1->P0Q1, P1Q1->P0Q1 Signed-off-by: Xueming Li Acked-by: Bruce Richardson --- app/test-pmd/config.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 97020fb3d..45b4d4f45 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -2177,15 +2177,11 @@ rss_fwd_config_setup(void) fs->tx_queue = rxq; fs->peer_addr = fs->tx_port; fs->retry_enabled = retry_enabled; - rxq = (queueid_t) (rxq + 1); - if (rxq < nb_q) - continue; - /* - * rxq == nb_q - * Restart from RX queue 0 on next RX port - */ - rxq = 0; rxp++; + if (rxp < nb_fwd_ports) + continue; + rxp = 0; + rxq++; } }