From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50040.outbound.protection.outlook.com [40.107.5.40]) by dpdk.org (Postfix) with ESMTP id 282521B398; Tue, 7 Nov 2017 14:52:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mDBxXYpc95i4l4qM3vfg57Unw9iQJgMLN+rMFmhA8Uo=; b=GoI4khfyknVqc1t2FYnYa1SQtOGcnv4gTz/xQVvvdISEWUZ+hkK9kXUN5RmdKaxGkaA3BKq9YFAtJ3OYnMUVb/dpqbg5SgvvYz/wDcDzupx23ri0RHfzuLoNlgNZYcTFBEy2k+rifG+3/Knu6n/slBcNuk2GCcCiW0X2b4U6UbI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by AM3PR05MB1252.eurprd05.prod.outlook.com (2a01:111:e400:586f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 7 Nov 2017 13:52:40 +0000 From: Ophir Munk To: Jingjing Wu Cc: Gaetan Rivet , , dev@dpdk.org, Thomas Monjalon , Olga Shern , stable@dpdk.org, Raslan Darawsheh Date: Tue, 7 Nov 2017 13:52:30 +0000 Message-Id: <1510062750-29091-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1509977954-4333-1-git-send-email-ophirmu@mellanox.com> References: <1509977954-4333-1-git-send-email-ophirmu@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR0801CA0075.eurprd08.prod.outlook.com (2603:10a6:800:7d::19) To AM3PR05MB1252.eurprd05.prod.outlook.com (2a01:111:e400:586f::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1b11de0-299b-415a-ee43-08d525e6d0fa X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:AM3PR05MB1252; X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1252; 3:zc2+fG88YmyqoaZMw73ZEg5BbrIrPzgESqW2GmbhvnWRXPC6vn8H7mEUnSRwmOEJCMq9vCN1ReS7I5Grca1BhciLGX3DAKeDxmWVpjEFi4CH8KUiXBB9lmuwDrvPLkJAd/HJpkKt9nIzpTB9P0qJIJ/D/Zs4lskPkYbVZqxUlQ7pQi0MbpnYTg45LOxc3yzVV9mPwhUWZzDbaRbKdtjrArWuEJyoCz+4LSdT0d5tR5latFE10C6oZMfqWBbRsrWb; 25:U1i/EBEaS5K0vA9ihNg3AGyNAmyEe7AjgV6Yuxwr1GI3TGYqFuhyBe1UpV6SO7qz09kE9hhpqE+3Rl0maA69FvqE6246ywh8MUoe+pwdAl0Tdb2u7it4X5AkhmVHYdec00CeDPOZKfLYoKSZvPTjs/tqj7/OU+VjKWtIDnGIEgrk7G6MTtHyuI/GDaTTVfGAnEXKoHPlED/zYpNf+CYJ6v34IwZhDWJZ+xdQlqNHIgF/gZu8ZBr71rs57IJrMUoYgUrI9oosjh24FTeQMtwJe2EP7dsnp3vfwyFuOzJM9Vu4Dx7dbAmcBqNJXpycLeZ4v7oo4oki/JI1eZiEauZ8PQ==; 31:1xt2gLw7yxL2MirRsL/HCCB1/U94UrpsZmKB7QX/RHH/Q14FyXbTEEyNRMGcmL7hfFLHSHVElhkx+vBFzaVzZ/YywU7h1lAmBUhHFPYYo9MpUQjQP/DFJZOFDfaKh7qRxhHBsAuzAet6csTaJIkA65mRkP/UPFKD2W6ExGjvsPfIWKDxk5NqoK1s1zFuc7EwZGG3byuUqGFAqzFftIpitQl4HubXE5kgGiSBddBhGYw= X-MS-TrafficTypeDiagnostic: AM3PR05MB1252: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM3PR05MB1252; 20:8f3fMwqq3WXOpsviTO21LHytNmTdfEnzKZcnwwkJNYZ4uBZ7veqZzkOWK4Uu0v7kl2ABXlv9Lrb4WTwksWHb4spvG3mQiV50VO4MSs+kzylSQ0Su15tz2ikfygy81fMgIetFp5Qhigf5GgAivblDAblyGQQTe38qx9T8C9lzVMjJWqwi/+vkuWqH+8TGlaSQ0ELjYMxQBgu7S0sBuBpjEC1knB9dtWosnEeCtDsWVT00PbvApldh4cjAW9d3KsJfmfy8G5m4Lr0tGwxHmw3UJlMtZHQprRiQGU6nLNjB81MX30VwzQvbH0RxwgQLwIT8iGOgQ65iyoHxkeSXPUmov7Dupbu7nr0aX3aS3T8D9BYUcHvkcLVtmUCkzuZJAnMcLE7GNzfdrT8nQd50qgk2Qa4Id4DzuUjls8OPMGmSN8bZK2YF4RfhURvklA1tWPNcKdeIVeQ+R9dgvIZpOht+uaJ6MI/7m2f0AgzA0NK+a8DWh1QoqvL7aGkWJ2nDuTVY; 4:ErGWDJoczf294zbx3Y6S+x/tA2b/2fRMLhI3Mzorsdit4LVcdI+ujRGUu+bOQbx11kHk7QWcmLcToFJTnJyhtqHLaauEh4MQJWof+9S8NuwfW4ZOpYV1r2oBvaNqt382ewmBq8mKPSml688wD43mQJXedVJHnyL/q1j1Z2bb6vuf3nSU5P67vZXNIgX2kfLadHVU56TInH52HSuHwB3u/LqqLFX0wOTGpzrfzQuQ5T2/4n1fDShex/HtZeL0OCDWT0vz2W4fMOvXzGh7w7ByQw== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(3231021)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM3PR05MB1252; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM3PR05MB1252; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(199003)(189002)(3846002)(189998001)(81156014)(305945005)(50466002)(478600001)(48376002)(5003940100001)(33026002)(66066001)(7736002)(47776003)(8936002)(97736004)(33646002)(86362001)(81166006)(8676002)(68736007)(16526018)(25786009)(6116002)(5660300001)(101416001)(107886003)(54906003)(21086003)(50986999)(55016002)(50226002)(6916009)(53936002)(6666003)(316002)(106356001)(16586007)(69596002)(4720700003)(105586002)(2906002)(76176999)(4326008)(2950100002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM3PR05MB1252; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM3PR05MB1252; 23:J17LtaVMqDaqloRAQx6QD+MOfb8fOMAORRCGmAGi+?= =?us-ascii?Q?9E/dB/4y/9AxNZ30e+Ksbq6zuXc2VwuH1ATVxz0M4Q1kTAnjVnqy+LZQM1ck?= =?us-ascii?Q?eJqUHPANvel083z9Z74ZcErqvSYoJ0hzqE5IX57B+hSo1R/pmAwZ2IishsRK?= =?us-ascii?Q?t2d0vsUv/orHQoawQQlM5j9sxXqQ4h7j2XDheF6iwH2xSLmZf1jQv4JyAxM+?= =?us-ascii?Q?/KjWJLjHDHH3X99Q7O0Rk2GyaMpulDPceWKTP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NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 13:52:40.8010 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1b11de0-299b-415a-ee43-08d525e6d0fa X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM3PR05MB1252 Subject: [dpdk-dev] [PATCH v2] app/testpmd: fix forwarding between non consecutive ports 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: , X-List-Received-Date: Tue, 07 Nov 2017 13:52:44 -0000 When defining two failsafe devices in testpmd the port numbers of the failsafe devices may not be consecutive. For example: if failsafe device includes a PCI device and a TAP device then failsafe port numbers would be 0 and 3. Port 0 - failsafe #1 device Port 1 - PCI #1 device Port 2 - TAP #1 device Port 3 - failsafe #2 device Port 4 - PCI #2 device Port 5 - TAP #2 device If forwarding is defined between the failsafe devices including a peer address the forwarding should be between peer addresses of ports 0 and 3. Instead testpmd establishes forwarding between peer addresses of consecutive ports 0 and 1. This commit fixes this bug. Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Signed-off-by: Ophir Munk Signed-off-by: Raslan Darawsheh --- app/test-pmd/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 7bc721f..cd2ac11 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1905,7 +1905,7 @@ simple_fwd_config_setup(void) fwd_streams[i]->rx_queue = 0; fwd_streams[i]->tx_port = fwd_ports_ids[j]; fwd_streams[i]->tx_queue = 0; - fwd_streams[i]->peer_addr = j; + fwd_streams[i]->peer_addr = fwd_streams[i]->tx_port; fwd_streams[i]->retry_enabled = retry_enabled; if (port_topology == PORT_TOPOLOGY_PAIRED) { @@ -1913,7 +1913,7 @@ simple_fwd_config_setup(void) fwd_streams[j]->rx_queue = 0; fwd_streams[j]->tx_port = fwd_ports_ids[i]; fwd_streams[j]->tx_queue = 0; - fwd_streams[j]->peer_addr = i; + fwd_streams[j]->peer_addr = fwd_streams[j]->tx_port; fwd_streams[j]->retry_enabled = retry_enabled; } } -- 2.7.4