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 2332AA0351 for ; Thu, 3 Mar 2022 14:22:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E6F5640141; Thu, 3 Mar 2022 14:22:19 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2CEE040141; Thu, 3 Mar 2022 14:22:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646313738; x=1677849738; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PBA+AZWksbMtEyIR6ox6vjLmSjIWWYrVFTwJZKYP7PA=; b=YSyXj6+NN6P6PqVYcEOT1WmUx+naEPdNoglsX5t0TLEcwVuX5QsskbvH 8tlQjja1ipofz9tV2vRS6rah7fRmoZBftrEURyEjgxzs0nKiM94ik5SJM XlzQXrl75WkiiUeNGVucgW8YdTQnMqdyLFkoRBmhP+GmOL0ZycrL8cqiU 4DwSlrIS7EADcmr5nFQHYTVjYHGVI3zcCegc6wbNatHPSK47jBMObjBxx I0cNOmljBs3oeUt7CfU6oV24Y0MC0T0mZfnFi/73LDBvxt+SCAUXXwsJk +QoogKPjmuYuESGS2D3NEQWfCOw3jpd8YkUX51pbiTnXkj2N6JHyS/6qx w==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="251247759" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="251247759" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2022 05:22:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="686500365" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga001.fm.intel.com with ESMTP; 03 Mar 2022 05:22:17 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Thu, 3 Mar 2022 05:22:16 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2308.21 via Frontend Transport; Thu, 3 Mar 2022 05:22:16 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Thu, 3 Mar 2022 05:22:16 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NoUlrKxKYLWGTrGwK2MspAiU4DFk37SRfstPIg3nIrIYPLSAvxlV+ZFHnpT9z1MJoad62ets/nmhGvJmszuSMzSp5fbWdxkqYNNOBR62LcbaGiqAmjvUPvSj+rj3hfcD+G/haHgpvQfCLxzMGgLMH1v6GaUrY9P/+g+0BqOVO6fXQGC4zna95qleO76jyy7ugwKGf3++KgsSmo12yuKfOqJGATOfgHvgNCkCwGxKTP3g/Tq1v+SWNUuvkmp45tpZltKsGPfWpGGlcr9k96SDZp+NaDhlNYm7gbs71eQza80/DG2BEjk5EJeFJpBU+rzQCqDxWa/JnwaVP0zJOoZIxA== 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=JFwMxHH7DYdq2TI4EJLPbbpyRJW/Nlu7YnzwwwWCbwE=; b=RnGZtfqhUsyEq7r390M6NMrOPuFcnwq/Lte/bzciytxHFct32CF+L1AKWIAaGh+wq6IfiixlxNBgL9Mzv6tRE6lSqnQ6WWAEi8hLSVMRSm4ZjTNVQ2072cxagVjReX5nD6Qnzp8JkpU91jbfJTDa4xsYPKwCuSLAmOfoO7uNS9SAQAnM+QpKx2FC1haiJwJMbkkECuXqRMVsY5unYhmM098+HO3KZ2LxbB1z2hQVsFkZiG3Q4u0rWn43+ntH7aTOfOTBnx6nBL7sV6Os9VFDiZqbM3CYsrGsgUXJ6duOI/QDzT8CnEgW7qiAHw8FHj0/mrzMcm1mdGz1aeE6ttkW9Q== 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 Received: from MW3PR11MB4665.namprd11.prod.outlook.com (2603:10b6:303:5d::12) by CO1PR11MB4946.namprd11.prod.outlook.com (2603:10b6:303:9e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 13:22:15 +0000 Received: from MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::451e:ece:98ea:2786]) by MW3PR11MB4665.namprd11.prod.outlook.com ([fe80::451e:ece:98ea:2786%8]) with mapi id 15.20.5038.015; Thu, 3 Mar 2022 13:22:15 +0000 From: "Wu, WenxuanX" To: "Li, Xiaoyun" , "Yigit, Ferruh" , "dev@dpdk.org" CC: "stable@dpdk.org" Subject: RE: [PATCH v2 2/2] app/testpmd:fix testpmd quit failure Thread-Topic: [PATCH v2 2/2] app/testpmd:fix testpmd quit failure Thread-Index: AQHYKKwXbE8voUwsPEqFbZxGavNM4aytsRTQ Date: Thu, 3 Mar 2022 13:22:14 +0000 Message-ID: References: <20220223113251.723692-1-wenxuanx.wu@intel.com> <20220223113251.723692-3-wenxuanx.wu@intel.com> In-Reply-To: <20220223113251.723692-3-wenxuanx.wu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 558fb150-2985-496d-59f0-08d9fd18d56c x-ms-traffictypediagnostic: CO1PR11MB4946:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: cc2RHy2fu4d4acB9kPYKARbdqcGsCihcSdakF+tQ6fsy1ycU+23R+an63RFy5eXvLIJ9YCEGXaE+sGaG/bE95LYbfQ4kSwB2WbsCLweiWdRZ9nH1UT3EMoOXkyrhsTCo0ImZpRoO3qlvvJ5Ky7mCBoCyFwXxZQLXYHADxwq079x132OIXlfk5lk5uiXNXdkDW4WW1Gdm0jJPk9BxGT7RJxsyXLaMhWAZEc13JyclilBEHizmmjFOQQo18BLFRlZd4Q61pgqhsmi7bfibI9JFsa9z/ggJZJwY6hsqUMXqCxPjHS4dHcohm7XkFea/Zj2wBj7AhvrTV44yIfn4C3Epu+DiTIrfW7kwNceuJah41Y6827eE5EVaMVN+Xa3KnMnQdR5nXyrsw3BjpwvQ9jFithVTKtNFXnARpTlXVv7mz+IEUUJoiAbeblYqEU0Puwjl2TqaIq0s3hjuWjdIONePhzWp47LgcapDMJa1k3+BXBPwVlo9ZMxxojzMsfp5U43itqSAixhdvk2OcQdK8Nr12eu7Vy/N9wF4Ux60PtLlsUtLYfG5iE8lEXyaHYBL41mS1VDBr2BAQI85PI5HWV0/JutPgHh4TZliHzwybGDzmqmucwHtXXRDxAaHPG4AhbODoAvJeV8kT9RefZwrx7ry3h48Lfurprn85gI+hPi8HLotkhESQkjnA2hNqfMkpSBc58NFaY5RDF8BWWTBU+ZOYg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW3PR11MB4665.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(86362001)(64756008)(8936002)(8676002)(66946007)(52536014)(4326008)(66446008)(66556008)(66476007)(76116006)(71200400001)(6506007)(2906002)(508600001)(5660300002)(450100002)(38070700005)(110136005)(316002)(38100700002)(7696005)(53546011)(82960400001)(122000001)(83380400001)(9686003)(55016003)(33656002)(26005)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?bjUyUGMxazBFTlk1bmRQOFE2QVFEOFJOSUk4aXBmVkJiS3hGVEFEVjJv?= =?iso-2022-jp?B?U3ZLQkVXdUUxbG51R0xLcnpNbm1OZURucnNnWUhPVFdwKzFES0NQSmtm?= =?iso-2022-jp?B?aVNmcjI3cTd0dDgzSk9HV0RFekpuVUtCc2JGVDZCQ1ZHRUxRMnFXZWxl?= =?iso-2022-jp?B?bmdjbVgxUk91Ujh1ZzcwTnZtQWppYzQrTXpkNENTaUwyR2RwL1dsOWl2?= =?iso-2022-jp?B?SGxHK0M5Nkc5czAyQ3B0RzQ4aTNNWHRUbzgyNEcxaXYxek1YcEJyZ2Fz?= =?iso-2022-jp?B?bzFFcThNNFdPR3d2MzFEYkFrdURaSkRMYzIzNnVjOVd4RCtIWk9sdDU1?= =?iso-2022-jp?B?Z1liWXZwdGRQczd1akl5LzdNNDJqd0kwNDNGVlFCeXlnS0ErZ1c1bTZK?= =?iso-2022-jp?B?b2JNYytmRGs0VzdJZ2FwM2FteVFmR0ROaXJnalNFWWZvVTdVdENJSnhw?= =?iso-2022-jp?B?Y2MvcE1HeFFRVUpYc1lKaHJEdXBPTHBpSGZVR1RhUHRmMGFPc3lVNkE2?= =?iso-2022-jp?B?Q2o4MkEyak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= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW3PR11MB4665.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 558fb150-2985-496d-59f0-08d9fd18d56c X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2022 13:22:15.0544 (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: GdHvEy07VpyZ2MR7tUXSLqSlwMa9HWE9sObQa9fwADzdHKOz/Z4sFHxfVE7WREI0soWW0HRQZ+ltzZ2toKi2HQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR11MB4946 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 I found this meaning in DPDK testplan.=20 Note that currently hot-plugging of representor ports is not supported so a= ll the required representors must be specified on the creation of the PF or= the trusted VF. When testpmd is started with pf and vf representors, the order of represent= or is determined on creation. So it is guaranteed that ,pf is beneath the v= f representors, we implemented in a reverse way is acceptable just at prese= nt, depends on when the hot-plugging of representor is supported. =20 > -----Original Message----- > From: Wu, WenxuanX > Sent: 2022=1B$BG/=1B(B2=1B$B7n=1B(B23=1B$BF|=1B(B 19:33 > To: Li, Xiaoyun ; Yigit, Ferruh > ; dev@dpdk.org > Cc: Wu, WenxuanX ; stable@dpdk.org > Subject: [PATCH v2 2/2] app/testpmd:fix testpmd quit failure >=20 > From: wenxuan wu >=20 > When testpmd start ed with 1 pf and 2 vfs, testpmd quited while vfs were > still alive would result in failure. Root cause is that pf had been relea= sed > already but vfs were still accessing by func rte_eth_dev_info_get, which > would result in heap-free-after-use error. >=20 > By quitting our ports in reverse order to avoid this.And the order is > guaranteed that vf are created after pfs. >=20 > Fixes: d3a274ce9dee ("app/testpmd: handle SIGINT and SIGTERM") > Cc: stable@dpdk.org >=20 > Signed-off-by: wenxuan wu > --- > app/test-pmd/testpmd.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index > e1da961311..698b6d8cc4 100644 > --- a/app/test-pmd/testpmd.c > +++ b/app/test-pmd/testpmd.c > @@ -3384,12 +3384,12 @@ pmd_test_exit(void) #endif > if (ports !=3D NULL) { > no_link_check =3D 1; > - RTE_ETH_FOREACH_DEV(pt_id) { > + RTE_ETH_FOREACH_DEV_REVERSE(pt_id) { > printf("\nStopping port %d...\n", pt_id); > fflush(stdout); > stop_port(pt_id); > } > - RTE_ETH_FOREACH_DEV(pt_id) { > + RTE_ETH_FOREACH_DEV_REVERSE(pt_id) { > printf("\nShutting down port %d...\n", pt_id); > fflush(stdout); > close_port(pt_id); > -- > 2.25.1