From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0042.outbound.protection.outlook.com [104.47.1.42]) by dpdk.org (Postfix) with ESMTP id 581D31B3A7; Tue, 7 Nov 2017 14:48: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=XAMTYgnylEnCmSPGoKzguO7QTQGT7/GESXfE3WVJFDo=; b=silsZejsm7sIN5bdvofH93H8S4CWM0uKPguJ1m7hkYN89kquB095+INEofd/DnEX80XRJ1rruLtXQADde0a1EAJYz5+TvMk6KV/7ruwajnGNVXrpJ13EUmjW7LElajRlxAXQtn3YKsUgLyoi3iPDW+B1/3rzUL4zQc5/Tx8j9Uw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ophirmu@mellanox.com; Received: from mellanox.com (37.142.13.130) by DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) 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:48:11 +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:47:55 +0000 Message-Id: <1510062475-28883-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: HE1PR0102CA0026.eurprd01.prod.exchangelabs.com (2603:10a6:7:14::39) To DB5PR05MB1254.eurprd05.prod.outlook.com (2a01:111:e400:51cc::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a66e3274-5175-488c-2659-08d525e630d7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603249); SRVR:DB5PR05MB1254; X-Microsoft-Exchange-Diagnostics: 1; DB5PR05MB1254; 3:RVbZpEhgfikqDwA2t2hbkpUHZgfZbBDHZlpoodkZPxPOVGbUJjhs8kTta/Q6+sPRW6Ov9uF7AJD6IWGmutvyQFcO0OPO2k2xCQ5V41BS+b0BaXMON2gka8L4Ws9tjX/DEsvVVq105vXqiwhnxN3LPOhNd++uOivqolZ85khVdrMhVz+WdTrJwSERJa/SPYPrXfBF8B3qqNyI3Oc14kzLiaPVPB5Q7Q4WsD3jx1o1KYPRWt3vi7n243H2bxNIx4Tz; 25:ZuENetGV4Uzx/R2PPlaKcaPLB/9QsOOa4tAcQxzOgKmLJhDXnCnKIiPALLaGU+ufsp1huBTUSD1kj+aF6ep0quekVufZ688iL9SHySIQ0uzPue4pHR4jVWnZSsUMFCeCSGXbyGMhDzYr1SEv/10LJlRL8Xie/HZGvX2SEQH0x6szjp1bIrnSsAECnYdJUmaEHempw5ASmSRMBIegZOuoz/Q+z3DDgma+Wc1RjN022P56UtrvaMFzDbiXk836gqy51ql0C2NejTFhBQ0U+gGPokaLkT/8FXDHzzUd8KcFfBlJHbJ2RMrsFzplE5FN5z88Phxo/Q9wl+ET5owuSjpk8Q==; 31:B5EvTje/v++b87x/womxheN0QSq1rnlpM/Dpf/LIZJv03uBN3yDh4l1pvj9YVbAckVggRCxadDmC8RBgVqPZ69uq3quGHLkJAHYS6CMs/ex4U6lSLbXwWnpwuSVSp1bPIbx2IPiukTTlUgY/fhmN/7ynvR68Y1qF6oko0NYzdUtL0fgJczu0+yJam03hw7Bsf5zbFEaaHM6SMl7vVHO8muntgJlWwV+9j8WUDybW+bY= X-MS-TrafficTypeDiagnostic: DB5PR05MB1254: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; DB5PR05MB1254; 20:R1zRt7SlmxMaAg/LxKXJDktoyCeTt8MfItFjRVUr45HW8naoPQGr0yOKqMZ2NGg0/5tPXyLlQ/dhNaPbwhVgmbGijGWCyvjeBzOCeOV0ICu0Em/Xjg6vG8Ob0itS8FHW0Ghsmt5rhB30KSJY4yW2HkkH5sLD8F1dJxDIQOkOIjvC7WcJNiqkUyAen9xgEXfiuidsLwgRKq6UlDvSp+P/1ldnKBJHO5wnqUA3UhF/yGwKBp/X9Ck6rW2Tu0swZBMIs6C0CLypCeAanuoNrHl4NxMLGl41xmruoedPNYbat/4SSDLtq2pGiPKokV1a7Tq+kF66lXOPVirCPHC6iO7ugV5wliKd9jTI8ZdxFShI3Mm9ZApD/acWrR4WXN+2RCR3UQTGlFnnac2WUqmMQcn85eOXoVxkCr0EK9NqnKN7Kw+J6PfgtCvfTsmiYiez0PIj2UZxwR3pRrWF18SVOXWLT7n42qqsBJdbnk9vILF+1MGNA7rFpSYIgBMJTPZyQ4/0; 4:G2cGR8JadrHAA1hcAzUvBrmQjONmk+bFxEFJ+atkjL+ltGi3uG+jMcDCFdmeoESDIcVprMurz+40cT/lcYZbFdtWI3J9YVe+GhieWTXjAVVIEFNC0VCdxtNW1YZGvxWycqNUH0I+B5jtJZX/oFxx/bXyujSYBRA1YvWq/tmqXkVjHHcZ5OSASCLjG0e9KjCjGO+AASo1uHJLjONbTZgULC8441DYUAkre6TBS/iCVq8zqXwkFL07wp8jRiNoaUAg3FE3Qp2EwhguUG5G4m9hCQ== 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)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(3231021)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB5PR05MB1254; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB5PR05MB1254; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(199003)(189002)(4326008)(16586007)(189998001)(25786009)(66066001)(54906003)(47776003)(3846002)(478600001)(4720700003)(48376002)(107886003)(16526018)(50226002)(305945005)(36756003)(86362001)(316002)(97736004)(55016002)(105586002)(33646002)(8936002)(106356001)(68736007)(81166006)(5003940100001)(81156014)(101416001)(50986999)(50466002)(7736002)(33026002)(6116002)(6916009)(21086003)(53936002)(8676002)(76176999)(2906002)(6666003)(5660300001)(2950100002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR05MB1254; 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; DB5PR05MB1254; 23:P4AacAxamqNQmTKLCpkk9JnLjwqlucS1xn+knuNSp?= =?us-ascii?Q?R5mu65x4xmRjImL+6zx3bC7BC3IBH8d/UXJS3RpLpS2RSWUCTQjGhRj06GMw?= =?us-ascii?Q?Gt8kkwaXcnTbY4LVueW4IF8Rk8N3aXQM8p32SDwWEubJKk0/EjYGzG58tvmu?= =?us-ascii?Q?l/qWuAXZAEI/ZguPiYvxQmeQFOaCQktoVDjpADkY5fhPhSRiG3ReVVX88nLB?= =?us-ascii?Q?geNC1sKDnveJYgUd1OeC30+x28HRHBWBygBccT+ifVIDB7X0XyYDuzFe9Nlv?= =?us-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9TOEvxXlJzWJTkdsg/xzYoO?= =?us-ascii?Q?GCOUOJxhcox1eQ=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB5PR05MB1254; 6:lPHkR3uyATHvfhPF8zhR9K0NxTfkRatwUoi/MRxH0x/DM7cJsfSfeSb2pACSZ2tz+zcFlBDBHegnKrMBkTj+3BZS/vRJ2chCSfuXUtxO6BcFQNgoW1KYsZtLmQOAXAsA/WKgYiJz+n5kjlgg7egRZ7oNR2o0Qt9NWnf8k8MfroI2Y9BtcLdi0jF843t7THX3KNb++atV/6UAyEaFun6b80mnHAdlFkkY9IhySg9NjPdIs41aUbGZViW8pTk28F6oEYSj2O/eB61lCEpou/OqsV4MqF6s/+awQorPZqhPg5XQKJjFlE/p7ReBreHFfW90igjtcmoqn76fSG88sKRqg0P3lB+5HZI3U4zKEgoAF3M=; 5:a+Do+PjHIRsxxptiiJUHfjOFOUM1PnWJqLFBIcQRnzhwRUFg0RxuPY+QjL7+8Kr3yHqgK1gA6XqMkEz2yK5rkgaC6qchsr2OHpya/ctOwKjNA72RCeuwLoGyArh1+T+Yd62qoVVowz6nvvXxFOcclS3El0ZR8qMI6vLEm3JNkTI=; 24:URzhYBESA8QHa6EwWvqRbMM0LYqWAnEYk5Kqaxwp4Bx6tYyyG2LUzzMPEP8NCjApzXArq7+02n54dyke03UWY7p/qSpSd68LaY1pdfuYwug=; 7:mAc6l39DAV7WuTd6Q59kil3lmyweeKRawNkjP4axdDiHUHLIyHuL6/qVSV5j02vVXX4Goqg2Ty52JxAheTt41L8OEjIkHSLYaxUDw1WvCdnK5nLGeOwoYJe+V716qZOlllWk4NFUfyzmRgSOXsZ4AWfT32XakMaR6pIyqfcIvGfkTqU5Scf+TCmeh+p/xqHbL6LZDkDr9p/Tqkuo4n0JH2yvdtpBi4gKq6iQuQ/ZKzxgWVrKYIa+kDrTCrM4EioW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 13:48:11.6931 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a66e3274-5175-488c-2659-08d525e630d7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1254 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:48: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