From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0064.outbound.protection.outlook.com [104.47.2.64]) by dpdk.org (Postfix) with ESMTP id 8B0DA1B2D4; Mon, 6 Nov 2017 15:19:30 +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=+TaVRQAKkbvL2QG6Fjk0fDFaO/OGSH69Mfd2yJ6c8jw=; b=GdtO3o4v5iJaz2KhXwYX6q/ymU6ZexwxrSLW2NuOUW/+g7SXgDLL4UZL3RQHPjIrjivVePJQRjondf0KD+zX3SxvkRG3roqFYp2bCdj23kaTbGvg2rOX0hVzjaaUsqJXrboCqyY7XxfrZAE1+3jLf9PVT/ie7Lo8xoffygOfE/Q= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB1259.eurprd05.prod.outlook.com (2a01:111:e400:588a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Mon, 6 Nov 2017 14:19:24 +0000 From: Ophir Munk To: Jingjing Wu Cc: Gaetan Rivet , , dev@dpdk.org, Thomas Monjalon , Olga Shern , stable@dpdk.org, Raslan Darawsheh Date: Mon, 6 Nov 2017 14:19:14 +0000 Message-Id: <1509977954-4333-1-git-send-email-ophirmu@mellanox.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1PR08CA0207.eurprd08.prod.outlook.com (2603:10a6:802:15::16) To HE1PR05MB1259.eurprd05.prod.outlook.com (2a01:111:e400:588a::13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a326bf0-8ba2-42f1-80a1-08d52521628d X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:HE1PR05MB1259; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1259; 3:mLt21CI2dROtgFzQuDHll5j/cpMwgYVjT0hx2XVuVTTuma2/lxdlTok+8iPBhkkvKa+UiAD7Z3N+bfE5/gXWod9BI8y9CGjlCjhjrCHcYCWiEeuUExS2l1vq/VjO1JUuMl9iwDSbwfS5iMpirCYlF3JiaDKllcrbldtzYpRJPKRHd0bs60lv6CyXXQOu9iw0Ax7Mg4uTLTb+89lhta4S07vvZwpTj16AamNalWn60UyFDFSOi2LrBngnXni6ofxo; 25:gR9ggcSz8DXVx6kLWw6niUojMA5vW6MF2cDwxuVkL1Fw6K/G5IOZUV89eNzW/8nYVcnSnnAQ3fPVvh5zkkWsUH8dSp0wzMuMc63QFuDz/CyFL0vDFVkMc8DH94cXt8SAnSng6GmbXUbTDuA9ZEiwmhUY/lep6spMH1NRyiHqRz1oYQGCaO8rF2JCnz1j03qpjGhD07YC1HJFb0P5JDl8sAfjLR+0rCZyRrN/3TVbH+6DzUJ/5X8dXklGvzT9/c1t3lKOeGuh0xM1M1KVMzD30s6l6oeWDiWlIGeIG+Htw7/7hX0n/NyiFv84Crmdyo161rjYMkgiw6++D+3gFigpHg==; 31:mwYuz4fQLaYG+Rk04akcVmunD+hqZNackT5tRMDKDAf11UACtE/JrfADalWCrtXOotz/7i90QBWxol7QEUfOW4EK9L0SpjKVIDhZKfcoB4ibmwUBCzsO6hgQOUbXEiESGhfPWFGLcvbj1QA5qvnXwwqq6b50M21FEio25uI3WLvEa/sAwUw+NXgudwx9JzmCjzonCeNid3NBdfSXtQ2hqjBWSPZ6JltV8GgqN2a/7No= X-MS-TrafficTypeDiagnostic: HE1PR05MB1259: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1259; 20:sXKIfq5sQN/WJfWO6LqzvlFhzDB8i0Ri4Hh5f79/moE9dhMva5Wf1n2W85zV6zsvzDRqYNTVvt6UsH2pMl3tMIRluCJhCIeCMpBWRs+Hm4DKwSPRzYgMu6tEWmcJ7cXBmzOoYl2rwHr2psUmzpeQa0Fbr0fRNqyrXqrmp3MQRUaJr2ceJQBIGFOlxmC9ZWVdsgzYqaI25o+Yuw+4/iKx+i5Crm38IF6kONsJ8rqk5oVug+HQF9h21r2jNTiXm+R4GVWwfMMBoyLaNRaULEYCvJ/4lSFdPqgLpmOqBHw9NDn0PI9JtMzhRXssuImFT4xh/s2wJ16yb7PMDiZ2QKrVgLCfEhp39/hLT4g9zdZbjhmWKQfxG3p9tW3NrDhG2YMON2n1bp9cGsWOIXkG/l7iA1Dxr6/EPR+0r3jwjkfVZANDF2wutddQJD+Bm3d/llYyjaBp8iclKpLT4RaCVbQ1YE/5HUaz6jyQkPnUQtrd7mwJjovLkJyot7ZkLBiK6Z6G; 4:RY4648optp/S7s9JGDbb3W3WLBk8s2mGGOTHtTRMSwqPOeRClngMGnTP4rNhjMOdW3qMM+MSL+n5sQRoMeLcKNifvoLzvSCkIDHp0WHp2VJnew9sojYfVLQZQcMsh57UfBbmgZt7DLaATrTZyOB5NK3Hd+OS1aRQCPV0fZ9pPIoil4GeQmlfqL50ro46s57RDUT8ItZ7Z6CQNP4md0EYRzTMnvvvCZZewsYwExwogeOC0Iw052jB+oGqptG/+88L4AaKByFMKeLdh3CoDKH6Dg== 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)(10201501046)(3231021)(93006095)(93001095)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR05MB1259; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR05MB1259; X-Forefront-PRVS: 048396AFA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(199003)(189002)(6116002)(8936002)(81156014)(4326008)(106356001)(53936002)(105586002)(107886003)(36756003)(54906003)(55016002)(33646002)(2906002)(189998001)(66066001)(50986999)(69596002)(81166006)(5003940100001)(101416001)(47776003)(6916009)(3846002)(50226002)(68736007)(6666003)(4720700003)(21086003)(7736002)(48376002)(16586007)(5660300001)(8676002)(16526018)(316002)(33026002)(97736004)(305945005)(25786009)(50466002)(86362001)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1259; 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; HE1PR05MB1259; 23:b6Rd3NMAAqDpzWdwU16yPM1F2P5I771reoDrgrBBe?= =?us-ascii?Q?laiuMAHS90Hoqx5B36mB21Dw8Bwr37JTzwDD3yLMB2siMXWFLpHWyXfBToPH?= =?us-ascii?Q?rQu1WWDzibf95kZT2YIdRjEqnUtXHyUeHbe7H+srqYobEnw9bV41fMKKf+/V?= =?us-ascii?Q?+8w4ZjAES2//J4pcWJ5o/PxCYxx+NrmEIqR4DGpkm0dFWWU/eedYeFh9QAb2?= =?us-ascii?Q?7HuzFyVu8REjCmOuKWuWkJIXUKTDutZRPMvCz1VC2eq0N0btIHKWptVBogW0?= =?us-ascii?Q?WVxxQIq27cjpD2PeE6mUqeXqydEuH5HIwrXnSdzOd3IeTRTSs7SXAcr7dkgn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SJwfQExxEm6wgsuaHEv07UGCa8TmOVRiDolSRMJ7w2xjVxf+UVmcAazAeUmJpIEnvVH6uE7iO0j51MsAs0b12otrXoN6pRLys3kNxAfqFt+kZrsrNl6mLmPtbNzSuupl5tG7VnJcH0l+pnBNp8FQdmjoLMn44U4ebyzgxH7LjGv5lhLSC82OgkG8o5Ehthx6d3lXKjpxCsogWxJMjxRQmKGuSlmNujkSC7jz2oWjQvDhcEKWnPFW2zTX5YDidajyGHNEOhsslNRl8TEh4My9vjT6/dIbnrlIu8VlBz+WExBWMRW1fyAtL6zlqk1uQJNCANo2kbIiV3ABOE=; 5:lU0YegrTDHYwzqkIxJuNjlMGjVbbR/vSkAig1FlGsrLqqc8EPmTxD6sNcioJkW6enqz809BXPTn8sF17yJktVcvHDoHvq8koYfki3RlZQJitk3XGJSTOfyjd/IxtMCNljZJ+HZhgIgTPUtpQo2T4hXyCLpYiDhrI1LrcrEnxvzg=; 24:bXu5sBJ7Up2fXSliT4eWJmnCLOm/NGuMwLzja5V2AujvpG2NGRncjU9LCC/NRNNWRFT7dbrWSKSuTVbVF8mSivV6DC1QwlpONLj+7RadQuc=; 7:HrszDkA3qVfpwF2Bq46zaD5qKCwIOesNzVEsAYDXuHYZKCNMscHkr51E8QHWsjNpITvKnT7n9tbBy0S66pTZ4BeQjmFT9geBOGQqNlCLUHmEJZjPU8hG+p9WyBYWQZkFbtv5J5lmrJ1VBV300eR7Cjw4wttKFf5sovl1uRb7MR4KDG04q1xwCrF5GSU+IukTAlmbqXA3cMzcnRrhOFcxXMUd1hMJYlK1MkQ5qpgbc0tkTmaUuzW7Qgq49n66nwSB SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2017 14:19:24.5538 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a326bf0-8ba2-42f1-80a1-08d52521628d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1259 Subject: [dpdk-dev] [PATCH v1] app/testpmd: fix fwd between two failsafe devices 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: Mon, 06 Nov 2017 14:19:30 -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 adjacent 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