From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0066.outbound.protection.outlook.com [104.47.2.66]) by dpdk.org (Postfix) with ESMTP id 6B6FD2BAC; Wed, 25 Jul 2018 16:40:43 +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=6/F3vhW7Vd0dIc867fseTQqhf1ynAWifLDcPlHWEa/M=; b=yRaSsDIqff2M+TvfiOx6KCFrU5Tvc8X/BqUFAn1YXUVi0Ofo+Tmat/1X91aD7oIk6hUKLyGCZ9r8yNk/0gIxFOJpKYWY/8ABGAoCdaaA5B79YMClNkKw8faujC2dh0BKd1i7JkRS+k8ADDLpWCFxVhhm79f+cqTCqv7PFYquOlw= 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 14:40:41 +0000 From: Moti Haimovsky To: thomas@monjalon.net Cc: dev@dpdk.org, stable@dpdk.org, Moti Haimovsky Date: Wed, 25 Jul 2018 17:40:21 +0300 Message-Id: <1532529621-5171-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: DB6PR07CA0023.eurprd07.prod.outlook.com (2603:10a6:6:2d::33) To AM6PR05MB4439.eurprd05.prod.outlook.com (2603:10a6:209:43::20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 14eef48a-fe8f-4c02-a6d9-08d5f23c98e4 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:H0Z9lSKZiVeKixbvrVe1LJMu0MPCL+Tyzu17yP1D+76FG1F2GIbZRT+ZEqIFB3SNqgoLEHaTS7YJg64QinO17ey/0M8Xz8jvsyixqqzOH8nQqAVJrrmnPUNag6uj80QBNrtsxKPN17XPN0bOcWi4n1n21pRWNI9/TNsHBCHrn9TjgSCxqk/IU2J+yTjIkkLZYXfc5IVibJw7+V7WJktmQTqxBrsEaK6bzAAaHm6R4FAwWaaF3mLgb2ZkHN+9RjDp; 25:caKwFKFijGURYGr6ODOFl4J6al4iszsjg9+nqi0iBQSWVGbMrCOv4xqG0yu+EJkGPG3mqAbvC9cCMT9A1uaIsT+WnZ9P+fT6bklU/03cbnwcLnghxCO84eCU54+3tT5hJrAek+PMivZc/cjeIcps+Wbj0/5q04q2fDAeHuWGMNdFzk1evY29dfGoNG0YHdUgRHSQkqn/PSFNecvD0Rle3BpTSM21Ihf+mDCFJoN0fAUL86JlQcpJkx5Zeezy6yN5LkDkfKJYMWPiGNw19rUa9jnMD3kjGUF+fx1rLdEiS/l3p8lfl4U8TK3Oo4qMid2Nipca+TBcHLOpCRvTf+UrFA==; 31:AnbyWbC+nfqTYraaHZkSwhIXRZoS0addi/fFOAoOwbBCHAmFj+21LP7iwm4qDpr45nx41xz2VbYGLJw+hk6nSLutHlcbKuc8cRfLmK07x2OpiecdWG8Jr2r9Jfn+jqg54r63jUwpiFrfjLoxQHwrpcy9EKgdu0aE0YRYW2N1oZysCr4R5Wp8JjtqRXm8XHoI9t+eU4kw1N4I68VhbTL5ztoAFVgfRhk8rBJVVQZvtiU= 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:ATrEx4NiR/xbKfQ1q/VtT20yWlVgIiwRv5P7WxhhZBP2ZTQqhB98vTtRWDuGUrFpK5AmcsJbWHbcojNiRIYpfyjZJ8N14saltbIuQKp14xPccug3aGd7DDfwsuMl8meg17tdbfhZgdND66NyyK7w1Fvxf8/1SU80NzyvRHjE1kq+vei3VfSOZaFaclNoxjjGt96V8QkCEhcNnqU+/zCiiTz5I2glDYwquvYrsdce5xWuxpZYocRnj9QF6rbpMVtjBf+K05uFaUsBfIUJFB2IJpbjbPS8pqW60wlxRr/iCD12h2JuWmEe3TxdSK85gG1w32pGbdFOn+vzNqYvvJGqdJB/fpb2HD0Svqn2t3DSwqc+Or9Y2FI0gclcIBgSRifutS+RB2GI1EpJWX1MKRZiTCfV1wim5TJOAEAjcmpwkjoccmxTAjUXWplaVcOVADql7CJ11gOoQRiK3N64svZjgCW7ZB7os6jkMXr4zizk2h4eeIcG7pCh8aKWUBDVsR/l; 4:o4CpfU41M+Fbgt2n5I4InQJzbC7GREts+S9nEO9jgKd5bCujwVR9+sic6sW6h2C/FveDjJs/LOnx6QXM6Xsaq22cwTG0Wak8+hIcWYHpiFVTv5dYZ3zzS4qjSfwrKIpmPOTkLy8jFz4K5C4JSD3LND70n5ypoC7B7FPCfVBT+pa99kGARyxo9xqdZrLm1hzMl+FBuqLWN4c1O0JV9hVTMlhZEwG5D2jvwd8B2G8F39+7OceuMNAG+2HEivkTxQq5Zm2RZbXD7ymmvAEaNSQGvQ== 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)(8121501046)(5005006)(3002001)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(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)(346002)(396003)(376002)(136003)(366004)(39860400002)(199004)(189003)(50466002)(6512007)(6116002)(97736004)(6486002)(2351001)(6916009)(6666003)(16586007)(36756003)(386003)(16526019)(186003)(51416003)(52116002)(5660300001)(2906002)(14444005)(26005)(316002)(3846002)(956004)(107886003)(50226002)(486006)(478600001)(8676002)(4326008)(53936002)(305945005)(6506007)(575784001)(8936002)(68736007)(7736002)(81166006)(86362001)(81156014)(25786009)(48376002)(2361001)(47776003)(66066001)(105586002)(2616005)(106356001)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB4439; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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:WjEjoEI9gB/mqRgw0CS2MQayn5HbATmgYAdz6fxEK?= =?us-ascii?Q?Cx+7rtopTvMf2aQ/ZGJarRYQcW9IiE80d+t1CdUyjMLQG8BeyT046ubJd7IY?= =?us-ascii?Q?+qfh3wmjFMHu1I9YWniB7/YZgZxwoRtclWefXVfINKQCL6t3cHvSrJFNJrCg?= =?us-ascii?Q?OhWYJFtJxILqsnCIXBwR61IxEEzNXQVVAiEnID0gJ8jhfPMiFSFpRzg+dwsD?= =?us-ascii?Q?OsZ11/G7iCNER0Q4FlTyhVYtZysznjwAc8koEIM/EaG2y4p+YYwaIMi5OQ47?= =?us-ascii?Q?lCpPj1duG8qs6+zJ1WUN0+OrfBy24heaNTaUsaFafxDEzCUok1EpanmlPApl?= =?us-ascii?Q?KIsIYh6RvWXTvYABjMFAU8OXC2NFQOuwJztYo4OwvgPqqj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FNcRwqjUUpVws7J5EYnC0Op7nhN0Bwd7E9zRoKe62+IvJd5R1Gd3zkXzM5HlfEOVj7gM7ODrtQKa+sNHi76piLhtvhDFUIEtvaRjWIjUJ7s4kJWYHRomeRT9WZgVpxaHVpdrGPzNnOwrGcqgazrEOvspD+t07uFCofUCsJ5SJXfwud8wuzuvlY21ItX5FtzXabVdZqYZyhEpLFG38qFhPHufbWDqs34EFPvjfFmTaT2cz2FjO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2018 14:40:41.2530 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 14eef48a-fe8f-4c02-a6d9-08d5f23c98e4 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 v2] 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 14:40:43 -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 --- v2: * Removed softnic modifications altogether. v1: * Wrapped softnic modifications with compilation switch. --- app/test-pmd/cmdline.c | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2c32029..d058860 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -17896,50 +17896,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