From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5E73A00C4 for ; Wed, 16 Nov 2022 05:23:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CC28A40E03; Wed, 16 Nov 2022 05:23:36 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id B12FF40DFB; Wed, 16 Nov 2022 05:23:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668572615; x=1700108615; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=Q42zPEKQ1Qxil4RSpi4JGT0gWwIxVR2cW+1PhwsUuNQ=; b=O+xut4/Svlr8yKGTHZX8JocDA5Hj5/aNbi9b2vkktr2qBuPYJILcHQGE TdeSwZwayeSAkvohWBm1NQOWNf7YKfFGJl8QUoJUdgq5M/wQ1FJZ0zi/G iQbNZOVQnUdGVqeI7Fn87Tso4gnON6wJbAd8Cn1LErwUA2ygjMdnAsTHY nBdmSCV2U1AaQ8qvNSePunKc8H4EOFJxlv3ksYUbWts+bU+cPFzdXK3hp b0DwaLnS3FW/gLfLzoNbNHoV+5qJ+v1O3GiPxDigHE6ddAPdQztSebdy9 DcWq8HRe2WsfJbY3qSPDJAEdUJV8M/GpzDT8Q3kGQnfl+s/2NEINUVPpi g==; X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="295811413" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="295811413" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2022 20:23:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10532"; a="744888158" X-IronPort-AV: E=Sophos;i="5.96,167,1665471600"; d="scan'208";a="744888158" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga002.fm.intel.com with ESMTP; 15 Nov 2022 20:23:33 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 15 Nov 2022 20:23:32 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 15 Nov 2022 20:23:32 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 15 Nov 2022 20:23:32 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.168) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 15 Nov 2022 20:23:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bs31k62NuhQxF4eSfWHIE3lWheeW/zNCzByCvwivE2nUCFp5BLW7BTuHaNA3T4q4Uxk0FArWNgh8ABV/AlTYxcSorgr4uBJfV9ntxB80LGmVIwJhoUY6e+1fMVLTh0Pz2p+6SVulvw+LLXe1+q+fegQn3ip+pnhSOhsAUyAXNcwq6oCnbuJ253hUEXAr5H3HrVK3X9EUoShVBFOGveBuhy+gEhDMWTp9xlLO7AobH1dmX08KWcLQ9SehfYbS3WpZSVFhOAF4C89mPJw7OTHvadZi+VuhmJ2PayvK0IaCrUqy/oMhIo2i0rg3MTpGAV9pOj0bgiO9sReaNMpuZWH/bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eVXrEWdDiP68KF9cyu6DKR7SL28MfHSHWVit92hoBrU=; b=F2RqoDlt8s7pnYHH8j6lIctJ5270hpHHZH8mZ2eJWVjDxJD5yN13vzrqFy+XyVQd4lCpDaqWXx8T99Jlap8P7g9ybl0tCrQyCTzr7v8w5DwQikLPvS5Z8CCbJpZUNl6fLBVysc/h9yPdXXwhI008nRJx7QNDlfuLqnBh9cHNYWwCvjXyhmGZL7X9sJUJHp2VBfFK3bRymI0nhm+PESsG4mvCkYTMHZn1+DXVCOPHa77300W51Bf/vhhMO4oOlV84urwHE8v1WeNBeWAq60D/m7gWPFIaglXeGc7PjDP1Yx6KXw+HASkqAfe8BHX3wgm5lNrfi65k+dreCvLgOzmHig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) by SJ0PR11MB6813.namprd11.prod.outlook.com (2603:10b6:a03:47f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.18; Wed, 16 Nov 2022 04:23:30 +0000 Received: from MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::edfe:aa7b:c5c6:fa7f]) by MWHPR11MB0062.namprd11.prod.outlook.com ([fe80::edfe:aa7b:c5c6:fa7f%6]) with mapi id 15.20.5813.018; Wed, 16 Nov 2022 04:23:30 +0000 Message-ID: <9bfc0585-beb4-e4ef-ae1e-2d5b241136f8@intel.com> Date: Wed, 16 Nov 2022 09:53:17 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2] app/testpmd: fix interactive mode with no ports To: Gregory Etelson , CC: , , , , Yuying Zhang , Ferruh Yigit References: <20221109165410.1326-1-getelson@nvidia.com> <20221109170918.2887-1-getelson@nvidia.com> Content-Language: en-US From: "Singh, Aman Deep" In-Reply-To: <20221109170918.2887-1-getelson@nvidia.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0101.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:27::16) To MWHPR11MB0062.namprd11.prod.outlook.com (2603:10b6:301:67::34) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB0062:EE_|SJ0PR11MB6813:EE_ X-MS-Office365-Filtering-Correlation-Id: f27fb5f1-9fd4-4768-a41d-08dac78a5098 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: e4OBpdYCP8DVT5oVUfQu6U1xoXiK2eH7TBmfoxqlmoLC9Qvml4JlFKkZuaa0xIxFEvUY1pYxjliMcE9xaXYxcDo8ZSmUjKWQgSJoNQbdjWdRitbcAGzkhPpbZFGl7AvX+Yz6U19t7o+mk6wC8Hjc9OMHl6zVWUMS4SlcrhYtTv9XmAdrTcKkp68S15CqKCG1I5qt/7QrRnfFcYwRL/S0+Dik1YEjQP1hVFd1A4osxPfUYydNYqrhelJjb2qXD53YqKPxnOh3L3DKP2UzeUE+a5D+a4gnV9Kh9q+p7HPv1JoVGZ0gYzQRjAWEi/V53AAYfN9J3XBTwhrGGYkNchlDeT0kAA/zSPWT6XTgpJJTlUErrIal0tXf0Ta3MjJkqMA0PYPSjefHMvcGYN5yk23+ljg+DcxSbP0tcsVjrqj4JmDNTrBswRZS8LwDCl4LTyQ2WAjUS4luxKJPoURh45SO+Hl5N/2t1PFqZZrFFDXbBTUVn37cSJb2btMTJvVanhv3lhULbKflUiFIAiNwq35ERsJC7lVaUw74bsPx+8jwlDbLqz1mkBaZCKRvEejTGhz2aimubuyERUL+wY3fk+N8SdoJg7njrn3ce60kFV18m7i82ABG2aI6bqsBkwmcDMfY4qnQDb7WObKz6lvJN9Ymt4V4Xd0YCiL2shOXCztWrQfmOLeLjou5J0GDwdkWH0j44NRdhFc7QaYQo0Fa2C1XlELo0F6ELxVMENbiLoEEdG/NeRYWlquEPThvGyFpHjv1ko27pYbhgZf1QsCTl1iM/UldaeBZciHlfk+Euh7opjI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB0062.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(346002)(136003)(366004)(39860400002)(396003)(451199015)(31696002)(86362001)(83380400001)(41300700001)(66476007)(36756003)(66556008)(66946007)(2616005)(54906003)(186003)(4326008)(8676002)(5660300002)(6486002)(478600001)(6666004)(107886003)(6512007)(26005)(316002)(38100700002)(6506007)(82960400001)(53546011)(8936002)(2906002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SGVKVVI2MXhuUktzYUxhYmE1VVNycGtpQnJTVWNteXAyWmx3TkVRNmhScUNr?= =?utf-8?B?UlkzYUpJS2VyUm9tUlMzWmMySnlTeFRhaEsxUVpIbHFPWUtGNGlLa1ZJK0Qx?= =?utf-8?B?NHpLd3JYdUo3enFzZ3psQ1V6MlhFdHBJSE1vOVVhVlQ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B?a3hPYmFaekZKa3QyV3QwM2NOT2Zpc3oxemFBbkRSSFZyVVd4NXk0aC90MVZC?= =?utf-8?B?SE0rdGpXUnFyeHl2UkpQZ0RRYi9wQzFBQnlBSDh3NXd1TmZtek82VVFjMXZw?= =?utf-8?B?WGdubnVEY296QmVHcDhFbzFUbTk5cUVwQVo2WXNpR3BFTklpYzRsWmlHRVlh?= =?utf-8?B?MnFRbnZvVHRiZ1RDR3UzUkZsaUpIekFjM1U2dVhBVXBhUlRoSHM1QUxLWWVG?= =?utf-8?B?RWc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: f27fb5f1-9fd4-4768-a41d-08dac78a5098 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB0062.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 04:23:30.1691 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: VhSQoBMbjnPJL9uUNLclW1nPGvBLQ+3f5ett4Ed5cXI/f2jurtjVmYCViFyGyK5SbOi3ugH+ecGSkmTe1sBmejqJefHh1ScOcUjqu357L0s= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB6813 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi Gregory, Thanks for the patch. On 11/9/2022 10:39 PM, Gregory Etelson wrote: > Testpmd terminated unconditionally if it failed to start all ports. > > The patch allows testpmd to get into the command line, > if the interactive mode was requested. I tested testpmd in interactive mode with no ports. It did get into command line- $./dpdk-testpmd -n 4 -c 0x1f -- -i testpmd: No probed ethernet devices Interactive-mode selected testpmd: create a new mbuf pool : n=179456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Done testpmd> > > Fixes: 6937d2103e22 ("app/testpmd: add option to not start device") > > Cc: stephen@networkplumber.org > Cc: stable@dpdk.org > > Signed-off-by: Gregory Etelson > --- > v2: add Cc > --- > app/test-pmd/testpmd.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c > index 7381dfd9e5..8517f376db 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -4433,8 +4433,11 @@ main(int argc, char** argv) > } > } > > - if (!no_device_start && start_port(RTE_PORT_ALL) != 0) With no ports, start_port returns 0 so it doesn't exits. > - rte_exit(EXIT_FAILURE, "Start ports failed\n"); > + if (!no_device_start && start_port(RTE_PORT_ALL) != 0) { > + fprintf(stderr, "Start ports failed\n"); > + if (!interactive) > + goto eal_out; > + } > > /* set all ports to promiscuous mode by default */ > RTE_ETH_FOREACH_DEV(port_id) { > @@ -4526,6 +4529,7 @@ main(int argc, char** argv) > return 1; > } > > +eal_out: > ret = rte_eal_cleanup(); > if (ret != 0) > rte_exit(EXIT_FAILURE,