From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10055.outbound.protection.outlook.com [40.107.1.55]) by dpdk.org (Postfix) with ESMTP id 09A7A1B60A; Tue, 7 Nov 2017 14:32:15 +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=KBvSYsB3xgAB3TRgR3cUosge6J6FCiAyGKe7Q57GujA=; b=cGyrd3JdjRje4BhIqKaESFecwiBh7wFuyUXJ5U/8YtFpxAGXjA6AntSiPcw6pob2hwWYjr1wePpG9OCNOErQYrQsW9tOQdpz5OxkJR6+lv3X7uRPInnRTGKyRELgfcnKGTI5V5CT0wOvdtGN1FDHVYdPoxBT8H1jU5ysd7DZt1Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB1260.eurprd05.prod.outlook.com (2a01:111:e400:588a::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:32:10 +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:31:48 +0000 Message-Id: <1510061508-28196-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: VI1PR08CA0175.eurprd08.prod.outlook.com (2603:10a6:800:d1::29) To HE1PR05MB1260.eurprd05.prod.outlook.com (2a01:111:e400:588a::14) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 453bc25f-eced-4d51-209a-08d525e3f3dd X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:HE1PR05MB1260; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1260; 3:7ChCTOeGpXP4uxVQ3RrsI/acQ9Cdb7hY6ZWWE94PVRY8VW+kp0AK5w1YfpZTBZgelKLaLQZxRHI1saMWjbMFCohetcMprHW1r7Z0ZYZc1GyCOYAGFbuMgGjkO27LYKZgE1vADAqgZUKi2ltpCI5XWBl1xbLA8Pw+BMwp2MXyWo1Pcw2rfRZ2aR9Fb7g2462j0lE/z8YQgqlvFsUPg5pQ59J/CylJtey0n9wiwaxjyQ1RKhjdmDEGIdyNZO63PGPu; 25:l8AhXsuC8uzQeW/WoI0WtyVk0CgnHLQ8FVxdS6PgcEXXZvxVIv/dr9DOHOSexmj4XGc5IaK3wXukx1OjlB1FShnf8bD3WZ+OYbu0g51dMsgx+CosVNerZGkX/IMkVS8IVMeDRPxLVXhV41WYa0muXqEnGOHUs8AhrtIRZlXAI3RLk9+JuvlhFkeDsh6G1yRhpao0CknHOFYxPyq16Xbce8B3tdMTDZNfOOqkDsR1PapO2a7+yzT/f6onJPXA2QLZV6gLiAtZrQP3gjX+Zvm3AHIG3asUNvle1SEP1wQAdfjIUI+zf36KeSiXQ5im69op1M5e7azc5HqJ8XtTKVsGJw==; 31:Pk6s3O7V6FCbiYC5WGGSUikELt+DuQyl2UVxTiyIbnepJDmjJl6v/DpsgU1YE3eTTOHJ2sjoo0FZTK8XXTvqpNq2PTBJsK2hAPNHOdN94EsEI8RDFgQnadLSCEgFn86OTVe9wJtvZbbQIFwk97hp7xftcIpqgeBLCZp8xSQppn0Z2ETh9Wu1rHbojUZvVMzUif3seqHWl1JKFbev96bIJ9wfq0Hvqs8BP9rFLNsNdos= X-MS-TrafficTypeDiagnostic: HE1PR05MB1260: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB1260; 20:2a5/3RTgnuc79QgQyQfAhBoTTB9X8GCXYmab3HUjGJIj3r+oLPy0KAbNHAFvx1r8+G6ZDiZozKlMx8SyoJAYnwUeVIB6a7bl0VJmhyi3o6duwhS/QHAWPYOJSzzm+glv9AMiOCvFdGYf4wRDR3aymDliheAJFDLMDzPKmUPR2KBRSNgjAobi9vJrYqm3TjQ9sF6+En7ru426x3Upd3I1kwbs1hcY/GE/4YcpU14S5QDn9QyAR6wI43rYOoWZ51T0Vnie66+4wW0AbDx/7wZq7Bf4K5ovvXyicUGN2eEhoPX3o5M4UL/3N2jeZ0ZgmycYNt6lMxHIe35HRWzKx1NmwyK8rTU3+/xz3uzEJpFyX6yhzyTbEmTIPIo6LQCszqEjtxqqpQWHKV5SWtQ4/wlo3b4JJvWM6HYddK/piQKc4X91ghSdAlenimbmzpKdUAOisB5z/yOUT5dCCYgb8ulmSF1z2x7qtCUBrjhrtMuAPhuVHCyo7kDVryYgpbHBWDc6; 4:71RV51X6j5uFOFWdfVj/KGvaEHz4DTaGIG/H2wkwTKMn5vg5/ouo2VnAuA56cI097JMxs/mfeG2f3Uo9E3F7S/KizAiW+/ock4tBsHIz410jAFPeULmjlPOXiMlHuTo4ThkfVEZltFPa6l1yW7uNR018L+3tHjLYEnJjKEdPQh3fNyZl3nu8MDqxr/KAfNa9RykHIX/3DMFOqsqm4e7Oqdb5HgkNXu7v47GPVoa3ry4l8c6w5kFVM10cUztaPpvd9JmiCflV1EVUTKRKyLGvqw== 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)(100000703101)(100105400095)(3231021)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123558100)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:HE1PR05MB1260; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:HE1PR05MB1260; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(189002)(199003)(68736007)(76176999)(106356001)(478600001)(5003940100001)(53936002)(33646002)(50986999)(50466002)(6666003)(5660300001)(36756003)(4720700003)(6916009)(2950100002)(69596002)(8936002)(48376002)(3846002)(81156014)(2906002)(8676002)(66066001)(6116002)(4326008)(81166006)(105586002)(101416001)(25786009)(316002)(305945005)(16586007)(7736002)(50226002)(47776003)(54906003)(189998001)(33026002)(55016002)(107886003)(97736004)(86362001)(21086003)(16526018); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB1260; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; HE1PR05MB1260; 23:RjhqCs92XCELGqs3cpDICdtlId3duCN7j1rbasmua?= =?us-ascii?Q?x4Xi6CYNTF+lBpvw3adgj9QfPw4WQp9kpcsWIym6WV1XhGLghMGIiLjKl5oT?= =?us-ascii?Q?7jAhKxTdKSI03hHKPApbajGs7Z6mNH3T9NuZEfEe1xa1sw8A4tKMs3Q5EjQ5?= =?us-ascii?Q?jxhqMUBO0o/ALU1ZoVb+NxqlJ/ToxiK7qLUbEM1XacOoCGbkOdnbZXKmRk2N?= =?us-ascii?Q?97gk158Jq0xe6/avlV+yuXzL+ETrw/FaTxqF1vOVN0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NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 13:32:10.6951 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 453bc25f-eced-4d51-209a-08d525e3f3dd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB1260 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:32:15 -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 --- v1: ========= original patch v2: ======== Update commit message. Update title to indicate the fix is for any non consecutive ports and not just for failsafe devices. --- 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