From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70059.outbound.protection.outlook.com [40.107.7.59]) by dpdk.org (Postfix) with ESMTP id C2045235; Tue, 24 Jul 2018 18:21:50 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=G93SgAysvCkrUbCpeIAVxWBlPJvsWyhDkpw/7ECT7YY=; b=porpeCdX7CK7mandhbAwFK3Dgo0F0f51+9kKFkRSPiFyqDLdb3RuynPzr6QPAGuG7XcPmfAK1jhbk6uZdXu/JzgGq8yGsuEZA360YLs1W3QxVou5GGNez7QYT8xEUIjWnIwcjMcnqSGEaRdRku8m52FtXTRXXgfCS10DOhaJgkY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; Received: from localhost.localdomain (37.142.13.130) by AM0PR05MB4435.eurprd05.prod.outlook.com (2603:10a6:208:5a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Tue, 24 Jul 2018 16:21:48 +0000 From: Moti Haimovsky To: thomas@monjalon.net Cc: dev@dpdk.org, stable@dpdk.org, Moti Haimovsky Date: Tue, 24 Jul 2018 19:21:22 +0300 Message-Id: <1532449282-9352-1-git-send-email-motih@mellanox.com> X-Mailer: git-send-email 1.7.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: HE1PR0301CA0013.eurprd03.prod.outlook.com (2603:10a6:3:76::23) To AM0PR05MB4435.eurprd05.prod.outlook.com (2603:10a6:208:5a::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 42d5a09d-068f-4e29-1b02-08d5f1818eb2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600073)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM0PR05MB4435; X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4435; 3:1vSfGtr8hz/xnrNXNkdz2XaIxpsohe2cW6mrB9arxbQADGGQ+CneYpFC5xTgmun6FYDnysiq4o+7jYO5GFbsC0Hy8rsOQStFMfddou8lurkYWOF7817Wka2lTjrjDBzVeXRAn3OLsnnc+9jI0v7kwgRhTgWUWVKWxOk7JcBpqqPx3mC345BZllLaaxv1v+E9yz8iIiubcZNtJAgGpVbqqz5E+iR2MURyrPwB+5PLJ78Ff4XCNm9Sd+YhVWhYXHsc; 25:KOeJl7ZDv4JwyjVgfXw5xsXuVucgQo9AkmOjCEXFejpjtmGGvJVUq3MWbUUxPKrV63gFwnt0FqlcG4Qes/crlDa7SiSOAi5bbNw9Ug3Q5FCLZToslncnqPyuIqbbTarFEI8wAaYsVUIarh8y6SRQ9cMbVGdAB77eOE4esIrU0jkAmWep9AZsEeZVpDxmCRilxXLzIND6By+BYXKYpTBlKjO1tSoWh5ihoho1WSAd9PiUU14ZT3nym8J3ZWDeAOAu4FORscv8ByaIJrQ2xFJ8whIJ6x2BHnyjrKmf8eVxrqN9CExdXuBWt0KCdzKBi8eL0dQ4FfHCOtftEGLY12Vzig==; 31:aie2l/3nUc8KEWZRhs77PO1iq6zgb+ibFP+kFYAdGfyMvP0z3BmJ5hnA2JznaN93WOL9fAoz9Z5pgvDAJaSq4Wug//N6Jseuo1AGL1iBezfw/s/K7jPVoJP5Y9+HOwgbpvPct/b/TOuYbo2vCOk+cDaVtwkHu8Ej6nc7zihFToafR1TQ11lHBrwciwNyf4vuskQ5pmtlurKtWACDnO3orayO3yjt1AX6Ec6TGPpMNnE= X-MS-TrafficTypeDiagnostic: AM0PR05MB4435: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM0PR05MB4435; 20:v7SVC9Yda+fsGdJ32LoRmN1bfa1JCBigV6Gik6WT9KwU0AKtp0mmOVWuzKdVHZEcnJq9JX6OxBywn3mtQiVjDB2frCXP/7rsHAb3qvx+fVQCCWYIcAnj/ju4FskKpM/lUiNKBvWp6+qACKyGAmR4AjKe6WRweu7Q7QFJwkpK6wUbav1V4+HBeWcCV8FG2qDOm2LdrDkHn7NwNl93XjIn40mRx53/op1ENLv/sOg17Hs/bZ8fMdwD+y+1dv4I3UcMmpnB+BVZNISYnRTc1MpARITn/4XBarCTUI0o+vujhscFTQc7A5ui1aNIU4/6MQGFha3RblbBVdIdAJWmTfUeVPbMSM4vJyEOQHT0SuqsQYy50BIgGBNibOki1kL3wVxBgGu6CgzCw/Tqxr3oOukLoP9r67AIN+TS7ylqCTqpyKtQ9OENtyEwhud/hMhU+OXn1F+hRhU/9hZhSUojTQh6eCAi1S2hNV1UHX8J/DmlkO7N9wEXrFEzTytjNhP5EmSc; 4:R+T1fdvfz/iHiVpkIS0bqpRY1ukMVALeA9ZHVy4Mauk6eEOr3foGuaTo62QAwgyPpSduvzA5yohIpDRU0TScw2TkUM4EuoEaNmYGuPKIBAhE5hhtFmhC4dHl5BMcRRrejb5iiEUo8BeSkB/W1+gT7krX2sC0VMPrWueTGZou6QTyBJUaFngReCYj7oWkIklHcMkP2nJelBPCg01EgyBM7WGhW8Zfx6MKvrQETof3YqnuWY0IokDJst1lJOV65f/wNvM7sGt2ITKhY7usYIzZvA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231311)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM0PR05MB4435; BCL:0; PCL:0; RULEID:; SRVR:AM0PR05MB4435; X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(39860400002)(346002)(136003)(396003)(366004)(376002)(189003)(199004)(478600001)(53936002)(2361001)(8676002)(6512007)(26005)(16526019)(2351001)(97736004)(305945005)(186003)(2906002)(8936002)(486006)(81166006)(316002)(52116002)(7736002)(2616005)(50466002)(81156014)(36756003)(105586002)(956004)(106356001)(86362001)(50226002)(25786009)(6916009)(68736007)(48376002)(6666003)(4326008)(1857600001)(16586007)(386003)(3846002)(6116002)(6506007)(14444005)(47776003)(66066001)(476003)(51416003)(6486002)(5660300001)(107886003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB4435; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM0PR05MB4435; 23:+tSomqTbbRNminsRI2QoPDerVi62jf0iEyOAIKqH9?= =?us-ascii?Q?BOxLRNgeIcmUrlh24pRp4x3UCSodfnZ1nqWbDLrWkuMndjE3L+1uKePfuKWI?= =?us-ascii?Q?6H5ylwS3O7ZBZ+csldYb1QdAdBsM61iHKMNlmrqv9tfTr5xsBaVMT7QcF0Lm?= =?us-ascii?Q?ejwWHTOc2rNvXwzyfFJz+MnvRx5tRb61ZtfB1XORg/B1NivJZ1hkENHpKl4G?= =?us-ascii?Q?WsJoQXAj0hA7ghyp8sFCDAXeBFncXfTfNA1FIQgBf/LFfzY10dN4K2EcPv7h?= =?us-ascii?Q?3t/xZNNLndyp1QeM1Mv7UJfVV7pM2zcKTvqcKHNWG+Rjd0PuNBIwmdBYTibY?= =?us-ascii?Q?FLzdN9Cm7CIjYGqor2oWWYyhxKtNFq1WM6FeG1HTrK9ZMfJHV1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BlF6PoIrEsruAPihySjPtQZWLq1fFi3tBk9L2dScaNbKlC5/gH2VMkVYBVkbJ40FYn+KWhnHyhdAO4Tnn2Nvo6IstzmnDcJ93drnDhMcmE6bd3APgLbpgtzSiuwpb2MLDNaCtbQy9885KU6Y4+07AixuPSWMz5AkFfib7nAfMoKjfVXiEfusM3gqzQ/NYYP6uSw8TXq6SkkJwoTtVchEZN+8lMkfgS6c0k+QKjbC4/Zk SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 16:21:48.0686 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 42d5a09d-068f-4e29-1b02-08d5f1818eb2 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4435 Subject: [dpdk-stable] [PATCH] app/testpmd: workaround softnic CLI modifications X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2018 16:21:51 -0000 This patch returns the previous testpmd command line handling routines (namely cmdline_interact and cmdline_stdin_exit) to the prompt routine in order to overcome testpmd abnormal exit observed on several setups. These routines will only by used when testpmd is compiled without support for RTE_LIBRTE_PMD_SOFTNIC Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") Cc: stable@dpdk.org Signed-off-by: Moti Haimovsky --- app/test-pmd/cmdline.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2c32029..2f350fc 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -17896,13 +17896,12 @@ struct cmd_config_per_queue_tx_offload_result { void prompt(void) { - int status; - /* initialize non-constant commands */ cmd_set_fwd_mode_init(); cmd_set_fwd_retry_mode_init(); #if defined RTE_LIBRTE_PMD_SOFTNIC + int status; portid_t softnic_portid, pid; uint8_t softnic_enable = 0; @@ -17924,6 +17923,10 @@ struct cmd_config_per_queue_tx_offload_result { if (testpmd_cl == NULL) return; +#if !defined RTE_LIBRTE_PMD_SOFTNIC + cmdline_interact(testpmd_cl); + cmdline_stdin_exit(testpmd_cl); +#else for (;;) { status = cmdline_poll(testpmd_cl); if (status < 0) @@ -17932,14 +17935,11 @@ struct cmd_config_per_queue_tx_offload_result { cmdline_stdin_exit(testpmd_cl); rte_exit(0, "\n"); } - -#if defined RTE_LIBRTE_PMD_SOFTNIC - - if ((softnic_enable == 1) && - (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0)) - rte_pmd_softnic_manage(softnic_portid); -#endif + if ((softnic_enable == 1) && + (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0)) + rte_pmd_softnic_manage(softnic_portid); } +#endif /* RTE_LIBRTE_PMD_SOFTNIC */ } void -- 1.8.3.1