From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80048.outbound.protection.outlook.com [40.107.8.48]) by dpdk.org (Postfix) with ESMTP id 95A8598; Wed, 25 Jul 2018 17:30:30 +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=F3sBVXE4Xcw+MV+KaFq30/atVqbRHVFKQoPnEWscrhQ=; b=gghX81qn2tYUhiUMDhufvpUUJjwSVSJjthmCuwRkvfUGKc3lWnDXa9xdW6ifgWRuuJQlDQkRUIoC/OjkVrqulmsXpnbpaKA7LSCTV+wdGAg9YbUy6sTksLr0fZUm6CGLxy2OOn6QzJlEu8tYLDIjXz6QY17BidD1NPJwgvkUOsk= Received: from localhost.localdomain (37.142.13.130) by AM6PR05MB4439.eurprd05.prod.outlook.com (2603:10a6:209:43::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.16; Wed, 25 Jul 2018 15:30:28 +0000 From: Moti Haimovsky To: thomas@monjalon.net Cc: jasvinder.singh@intel.com, dev@dpdk.org, stable@dpdk.org, Moti Haimovsky Date: Wed, 25 Jul 2018 18:30:09 +0300 Message-Id: <1532532609-16216-1-git-send-email-motih@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1532529621-5171-1-git-send-email-motih@mellanox.com> References: <1532529621-5171-1-git-send-email-motih@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: VI1P189CA0004.EURP189.PROD.OUTLOOK.COM (2603:10a6:802:2a::17) To AM6PR05MB4439.eurprd05.prod.outlook.com (2603:10a6:209:43::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f9e27f0d-4dc9-4972-2196-08d5f2438d64 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060)(7193020); SRVR:AM6PR05MB4439; X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4439; 3:3aVHMiUXwfOnp/w0aIyNOEKC/mslIgJh6dLCy876I+pY3viLLYJBHUQ5I5DS1KgPvarMdpZaikGDlX4Xn0zIgLYGNfWcJBbAYR9j3MDDMYrDxEhx/xG+tVpJcnKC8optUxkXwa5iN+oW+YyNPEt0I1hYilgcNd31L/I7QmKI91kh4TkIm95GTKAtKd12SmIf+mYKsrZb6hs1z0Hfzdiy/rdX9b08VBhBeFY4HtMv2zRts5RLhXMrxKxqE8czyTFN; 25:DFn8qNSYXJq5/syqXiHIXH3poG1aHI3kYpcNgNZyKnCadwWPFQQweBnVLf3DwHZc+GW8k23PwFJk6M3Azsxj6bwaop+qaXEkpVnx3e+324cNqjIEu1oG7fuBAEN5vD/fm2McU/A/hod+F9qu7br1d9MiAAiUu6ZDNYitSfs1MnYoTkIO46tm4X6OH3OY4X8MJrGIrBeB/ZyWgE0z/7wF1mTR2CyNVNz3cTQPHoFS6tGDxRo8MvOC7Gy3r6v93zRWikqHgQnCXhwuzidG4W0ulY0Im3JQEftB0Gx863FdBFRTehX3RVaB0fBmBNEU5GSBwxOuCRz7R08pPM8uP3MjWQ==; 31:NiBVMUs0j5o0lmCOL9QLwDJ0RDyP8jBI+XvlBAc/2C1QwMqa2PdDZ1v8V5gumIGO0rNZcAoaUctsOE/IcojK5jqquU7tsp0GX3I2nN5RRjzYj2RegCS+np0FsOhLxqzqNbrt2kAtaqPgr20GDIfZyqcvzEhpEeF+NTgDTxM6zyDOUd47oRT+qMpuJ9m2m/jFV9EPnricdH0ahdPcf9iCDNHsTaG77wkDSgV7kJS2xMY= X-MS-TrafficTypeDiagnostic: AM6PR05MB4439: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=motih@mellanox.com; X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4439; 20:h2srvo95PPfOnZGwBR84sBv57E5H6zQV9eubwSF9J6zEFrxLHNJ8B5ojdrdx1mfEmaw1g/8msRktd7JTX9un9oxgjMMPLGtADillyjMM2IsFDHI+xXe3aLcKkVNwoN9KaR11K3PpGvtJY1S0T4vTKJ1+bbSndeHOsSyh/oTZtpv+/rmwhOk317hSQc79upfGy6QmYqiMZhaFj4ffwIhgU1Xxjo8BEbVU4/5dcXnAglYILpZNjDsEG6Bnr57PaFJbMTVxPXWbli7LBEnGfcqsGvuWF/ZCDlzuS2hmkmtKvXavnA3mq1vC0rRQXfdKVm9kY7KP+WtYFge/KtJpkOpCVzniJLT/5cWwKisTp5mlpHFeGVhFVD//G2W2YDpJRC7hE0abtIq8o+z4RmQKHSjhg0pVeK/4GGbgt1oPOeTiXQXPvhAlP3x3xt+BKMhbc8WaANK8/iLI7AceKzMe73faWqAxxGH+oIrBUtSAOFZxvIXstW3MANOJcLTI+MPwiKvP; 4:grMv0EFqMBqklfItzYqcFes/yyll3puSHrDs3Gl25j5RWviMMWGypeLRcbqIPbZUNDPWcdHCDc28JW7kVwyHGbr1JmiMLjI+c+wGkVkxekK5QyLKBYv8y5TIuOgHfa5aaQaB0dMbUZMIcRDxK3Jug4pC5408c5I7JUyNGovxga+G4G5/pSyG7YcifYpdqcw1y4F00/7rmFvcDxp13n+YmTfYS0yM9Ur7gwyA31pB61xS25oKC9xggPtYne5uwgBiag4HEu5OO1RJCkqbUfrbMQ== 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)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM6PR05MB4439; BCL:0; PCL:0; RULEID:; SRVR:AM6PR05MB4439; X-Forefront-PRVS: 0744CFB5E8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(39860400002)(136003)(396003)(376002)(346002)(189003)(199004)(68736007)(86362001)(81156014)(7736002)(81166006)(478600001)(53936002)(4326008)(8676002)(956004)(50226002)(486006)(107886003)(575784001)(8936002)(305945005)(6506007)(105586002)(66066001)(2616005)(476003)(106356001)(2361001)(48376002)(25786009)(47776003)(6486002)(2351001)(6666003)(6916009)(50466002)(6116002)(97736004)(6512007)(76176011)(2906002)(5660300001)(3846002)(316002)(26005)(446003)(14444005)(36756003)(386003)(16586007)(52116002)(51416003)(186003)(11346002)(16526019); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4439; 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; AM6PR05MB4439; 23:jXMR99+XMR721waR17EmcxbYjB8btTelXK3Zele33?= =?us-ascii?Q?oAtqJM3tSId3jcLAr8TMwepRR/CmsmVQNOsje5uxobsHghkP8pzibb3zLxao?= =?us-ascii?Q?yh5wK1JDrDKHyrrRimwXsWEyz6sMng8CaXMCaBh3VkhdLSuCIgxCBA6gGtc9?= =?us-ascii?Q?UoSp0g3CZnobLCRHPewNqKadxbHjCNKXgxlHazElduh3aOnob3ih1XvU4W4p?= =?us-ascii?Q?bEcVeLDiqRwE/bwXSPW1Y0kYr40YjkjWHKJ1sM86wwS3LWD2ZuU9mT8PW/ta?= =?us-ascii?Q?3ebkCeT/P3OjJA+FLX8mEfr9WLZnh8WZSgklcklsB9zIThz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XyKIfm3yp/iB6hWwfDJGhQ408aCI2nRFjySnVVaY81yWU8zoASFaul?= =?us-ascii?Q?PFHvC05T7YV090ESB+Ukl6q5qhjonidzMidcoGXws5qBIP+S93yegpalWL16?= =?us-ascii?B?UT09?= X-Microsoft-Antispam-Message-Info: ow0QNv4BAAUOxl8PcPQY5dq53WhIlCOnDrz1MQEhEWQKNpqx5AcAp4oGbzPJwyNBJpawO2z+hkC3qLwV4Y5wXILS/e0UNywOZ0tpf0YGb4Yj4z8bV0XopWDmjTUP5aYlEYI9ynGRlLKpJOWzUxAMUngkOu4g1cQgHsmQ6YSDHPGzMLRL4ifa/TY24Jco8cUTRDv5a1STlRv2cCIu6yPtKgcpNfe7VQsNKW9foxiGzERLQn5QoVHeaai43oDGWgs6HmjA9iXAiXhChfgR82sQDF2JlQSt43zeIbgKOr3HGudI/PW2LpsgJrob7Y/ln8tJEMYXzMcczctxp3a/QnYtlq1n/l+Igke7cetjARaxEMA= X-Microsoft-Exchange-Diagnostics: 1; AM6PR05MB4439; 6:a4JvxVPiRpeuYOu7YuEO5Z6b48yQD2N6z5M8d5uWzfh1E56cppcLCLpMC0eChevf1Y8B5mDedr3HDqZXe/KFaON84bDqEAp9O80iVGwLYPY3516Ex9IeBOvO+k2/WzFmjunwN+MZaKk00n/huS90zrMMjaFVOMvjQeSPfJGdRp6KRbXluyWOwHdc0qmCgJ/eX2germXMCW5Eks1WcqAWPWnz314gjx2gImJBcgdvPBceEibmC1PAqg4X/Z0cLXn7L1TIQnYDqDj/PlrH/GAtdUNCgFyKDInxwfh4DH6uxqJymql4qcBtf7ft1Ee+LXXealJaEsTIR+CIl1iN+92ZCaKCVZyp5XGVjGMHtrQrLFR75C5QcS3pXL9ttAkNQf92QfHaf0+NphV+VcqWvM25C/jAmrhD1nF5YLp9ae56JXun7+tEJN3oekxfGeVdtrQ2utwpGXxpijePQtti7kninQ==; 5:oNyRfGLhyPY4peZZkwfU+8lauHR9T/DUcW5TXjATz6x4sQp9LXNmUnFXfGJkNXloV3n5PD5w/d6654F6pXHsS/6IQ/cLr5JJvAV9KHzaqLUnNCuY0y/B5d2SGR8Em4jOsx4UeHV9rSubMY98eEUemfXhBMPlwjjMJ1JSxSRsZVU=; 7:UfRZy5NzMVdWJc3XycyVmSQfyDUo/0Uz76zqhe/+GzsOtZ7TqFHhQ/dwibwioaFUYyZ20WPPL7gkujuAYFJB95T0RGcZ48+Q8RXgio78ikb5aPoHA7cMWeUVKtueGhomnoBFo9F8JGH3psxcqLlE4+oXQcBvt2vuG1vA2BXPqnaaOUrDqPxvUdzVMY6i2QY6FYN8BbIqwE4n2ZOlyeOPEa/AxaWS3Y6415iKLT9y4bjJtdTHY2iKh6a8jJKGYG1t SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 15:30:28.2767 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9e27f0d-4dc9-4972-2196-08d5f2438d64 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4439 Subject: [dpdk-stable] [PATCH v3] app/testpmd: removed 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: Wed, 25 Jul 2018 15:30:30 -0000 This patch reverts the testpmd CLI prompt routine modifications done in order to support softnic. The reason of doing so is due to testpmd abnormal exit observed on several setups caused by the softnic modifications to this routine, for example: When running testpmd with tap interface (/app/testpmd -n 4 --vdev=net_tap0,iface=tap0,remote=eth1 -- --burst=64 --mbcache=512 -i --nb-cores=7 --rxq=2 --txq=2 --txd=512 --rxd=512 --port-topology=chained --forward-mode=rxonly) testpmd crashes seconds after presenting its prompt with the following error: testpmd> PANIC in prompt(): CLI poll error (-1) Thread 1 "testpmd" received signal SIGABRT, Aborted. 0x00007ffff668e0d0 in raise () from /lib64/libc.so.6 (gdb) bt #0 0x00007ffff668e0d0 in raise () from /lib64/libc.so.6 #1 0x00007ffff668f6b1 in abort () from /lib64/libc.so.6 #2 0x0000000000468027 in __rte_panic () #3 0x00000000004876ed in prompt () #4 0x000000000046dffc in main () When running testpmd with bare-metal device (app/testpmd -n 4 --socket-mem=1024,1024 -w 04:00.0 -- --burst=64 --mbcache=512 -i --nb-cores=7 --rxq=64 --txq=4 --txd=16 --rxd=16) and pressing CTRL+D right after testpmd prompt is presented then the program crashes while presenting the same messages as above. Needless to say that this behavior is not observed when using the previous CLI prompt routine. Fixes: 0ad778b398c6 ("app/testpmd: rework softnic forward mode") Cc: stable@dpdk.org Signed-off-by: Moti Haimovsky --- v3: * Removed unneeded include file. v2: * Removed softnic modifications altogether. v1: * Wrapped softnic modifications with compilation switch. --- app/test-pmd/cmdline.c | 42 ++---------------------------------------- 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2c32029..8708875 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -69,9 +69,6 @@ #ifdef RTE_LIBRTE_I40E_PMD #include #endif -#ifdef RTE_LIBRTE_PMD_SOFTNIC -#include -#endif #ifdef RTE_LIBRTE_BNXT_PMD #include #endif @@ -17896,50 +17893,15 @@ 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 - portid_t softnic_portid, pid; - uint8_t softnic_enable = 0; - - if (strcmp(cur_fwd_eng->fwd_mode_name, "softnic") == 0) { - RTE_ETH_FOREACH_DEV(pid) { - struct rte_port *port = &ports[pid]; - const char *driver = port->dev_info.driver_name; - - if (strcmp(driver, "net_softnic") == 0) { - softnic_portid = pid; - softnic_enable = 1; - break; - } - } - } -#endif - testpmd_cl = cmdline_stdin_new(main_ctx, "testpmd> "); if (testpmd_cl == NULL) return; - - for (;;) { - status = cmdline_poll(testpmd_cl); - if (status < 0) - rte_panic("CLI poll error (%" PRId32 ")\n", status); - else if (status == RDLINE_EXITED) { - 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 - } + cmdline_interact(testpmd_cl); + cmdline_stdin_exit(testpmd_cl); } void -- 1.8.3.1