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 C56E842D94; Fri, 30 Jun 2023 10:14:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B2E88406B5; Fri, 30 Jun 2023 10:14:35 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id F3DA04021F for ; Fri, 30 Jun 2023 10:14:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688112874; x=1719648874; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=QNXR3b8W749GqRpqjSXu7ibwZR48675jZHIUB0FqbCA=; b=V/+iZOqlSUcTfbddoary7VUL9vxFusqI5CG55oBLbh2ePumAzhHlxDVt XvxAGuIivVMmP4pccZfHpOPkKzfJerYWApVSjDX7Z4RVhEfUa0a5//d1f /Tra1svups+jEgCikZdD21QVCOmisEhnYqijOEfdmT6yHVsHikdVs1jG9 YsWFBocCsyow9cGk+dwjUVtL7QN5lRqxxzAtF7N5yMS5rAyZhXgYKjQbD GOk+ekV4GEAKleTQLEL1fBC0caiabaLRW/5KyTJqG0YdA4jXOdMbgIjtf KxWcBFxJHjOj5iUyEh+F37U3FzGHoZInhqteVH6C+4s3GwPQRsQQEnz8W A==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="352165636" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="352165636" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2023 01:14:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="891685355" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="891685355" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2023 01:14:32 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 30 Jun 2023 01:14:32 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 30 Jun 2023 01:14:31 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Fri, 30 Jun 2023 01:14:31 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.173) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Fri, 30 Jun 2023 01:14:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q+3f4iWLTd+BgxJRZkB+g+EfTiIxcTLM8ahrbq9zFwRHSBvaYWsebRN6ryL69zrCMI81HsXc7eD+2CamfqRfit872cByskf1FJFrqBNva3JFRyVLpBoeSkQn+pcDDNG954yQVY/Dgmr2GPK1OWM7Lvc+1MMAilCwsUjkZWEFTUQ+RmV4mNAoWaxggVPwC809MQqVRjqhRQOYY6JuMDMisDy9nk9TN5IObhs6aDlLwnV3+AHHd8xJLN7k20QAdn9f9MzL/HZBr4Xs7OEEE8bP7XudYV75HxDZpIg8+jcYFrGY2WcQ0c80i9bQgVn6DBnig4XXN5e1Bun0PwOMbmdxWA== 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=S7wum8bmvCxmI1rykZ6Ij/Jio7qtO+7yE4iCzBYQN0Y=; b=Qwb83ejPtf0aOvpq3LNWNPaPp3k0I98ZaKakoBFo2ObqrrUct5nmowv5xQTQ2LxDGNHfeCMhPVwfgPSZOd7AOYRfQN9WV/MBWyzShP4GSU0+G3i5Rzns0nzLZD43U3HArJr+25rQsJboqA0XUec6qE0plwCn0Opm8g6pWc45sLX3pL8tq+8XhSKk3aAoUQYf7PVFHWizxuylpP58V/QXnof8bZaMrYTVximov5TbCcFz5d2vDGxYhqxEKT8GYoLoQ1U3nJEg1pEEYGdgiNRjKXnZX9MjDU4A3wM6Fed4++q86k0JuPHmNdpoWIvwf14iiHBLGIbAoJ809w7k2odv6Q== 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 DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by SA1PR11MB6566.namprd11.prod.outlook.com (2603:10b6:806:251::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.19; Fri, 30 Jun 2023 08:14:27 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::e570:d9a7:df1b:1589%6]) with mapi id 15.20.6521.024; Fri, 30 Jun 2023 08:14:27 +0000 From: "Zhang, Qi Z" To: "Liu, Mingxia" , "dev@dpdk.org" CC: "Wu, Jingjing" , "Xing, Beilei" , "Liu, Mingxia" Subject: RE: [PATCH] net/idpf: refine idpf_dev_vport_init() function Thread-Topic: [PATCH] net/idpf: refine idpf_dev_vport_init() function Thread-Index: AQHZp/HfeIQQ2N2s6EiVlJtRQC5evq+jBRDQgAAAuZA= Date: Fri, 30 Jun 2023 08:14:27 +0000 Message-ID: References: <20230626140606.490871-1-mingxia.liu@intel.com> In-Reply-To: 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-traffictypediagnostic: DM4PR11MB5994:EE_|SA1PR11MB6566:EE_ x-ms-office365-filtering-correlation-id: 7ab5525f-9731-4bd3-aaf3-08db794205e1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wO/fVx592WPA+VNl03ZAbEmkkXp3dmFz864EokL45o2SQ52sOGFTiHqpkkRUKno/sJOcUR5wNxT6KBedvzPT8S/LkOZLjEZysR4GiYW+8Uw7Szjpwkc6RO9Cw4vmgmlCIgo9YrZGlneOSDsg38cHRlI4le0LHzAHmshgFm6VLof0D5KfiOFdDyGAo1DHMfIdu0xco+PBjchLjNJsklxWIUGpAIGFmEuO3BhKI5gOVpQ9xMc5sVjvl1+WWXtGU1qJ50lm1qSDvK2L3R5Nmnh65AcOdbsBdjEGXozwaR+ixNg2AFvBRZCl0H5IzuidGUI7q2K1j6KILHnAxdEFtolqJ3Tt5HvJI9xJRjHyKF4+BuaKf40IQOwwT75MS9AmhpqSAtNyRn+mwUdcW+D/mMJqgGoHFrUr5hG34fPGdXFU2fn+qT6212xyKf2dAmNIt3/b8telCcj3w1OXUVThcaQTHVLyfm9Iv96JXpCpTsaeE7T+uihKN9NnyLST8B+9wk5pWBUwTBpZT3uLtcAR0BQ6TdxQ+Ra02XC+rZ1GEy+25oDEJWuPZrR1sm7gNQOHV6o1WK3gSCL0L8M5hm5eS/iEQqBM5++BSVVJfPy+Kyp1zxeUwqADcNn8WJgLZl88YUTs x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(346002)(39860400002)(136003)(366004)(376002)(396003)(451199021)(55016003)(83380400001)(38070700005)(2906002)(122000001)(38100700002)(82960400001)(8936002)(8676002)(110136005)(5660300002)(52536014)(86362001)(107886003)(71200400001)(54906003)(41300700001)(76116006)(66946007)(66556008)(66476007)(66446008)(64756008)(4326008)(316002)(7696005)(33656002)(478600001)(186003)(53546011)(9686003)(6506007)(2940100002)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?zl0BBVF0LZ830By0e651WSMsR/DmTU1mAm3gTTtn3KhvplDXdYoye6uJzdh/?= =?us-ascii?Q?fQo3Yp/XtaAG1FBH8z0E6F8pVkkmhGkjgtTd2RHP8zM324rFxA5f/Jy4UmfA?= =?us-ascii?Q?EU4lZaLx/Uchd+6tctYm/NTq8BjWeO4CteV0MVwJnXYmmDmkxD6TnaKEsLK/?= =?us-ascii?Q?1MkIFPfBki8D9n08rnSkjcMQyNKusid0DePrNlnVlDFEQ+KfcZIHv3KEADWo?= =?us-ascii?Q?c1e5MS3wo5w4eV/qBaiNNeeqRopt8QvQRa5mRQVeQD2p7V0Wl60K75GUN9Bw?= =?us-ascii?Q?EyMY/gbz5JuhKPj8W9RbRyKH4ViPs9ivWRNLGnuqpOTcidlj3YpMHs5Px6B0?= =?us-ascii?Q?z6eMk1eFQCZBNRqplrY+HZQNsszNq539AkZU0sIJI+Gf5/WDByJyex20ZLHM?= =?us-ascii?Q?GuRaHTA4JbM52W+kgBV0NfLMlUQLnhtGjRe5v73Bg3p68qzUf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?Q?VU5MVzAux9myPIQcjmPeqZTogGNMEfCekT7PmOcoMGgSHc4QULBTAjdwxV0B?= =?us-ascii?Q?99giKiT3nRcw8NDjqABkGlgEV2NuV1VGz9eFbTlQw9IzWOX2jEnf8DqlF7RT?= =?us-ascii?Q?eHjABvj4y7vjaDM9cmp662aj9nZExCsS6DgxuxIhheDrrbIrsyvhv3nltk20?= =?us-ascii?Q?mc5gtVE/B5ueSReGHjcZbxckZz/dKbcf4I3m/BmV6ExSdcq+LTCAKwB0aFbE?= =?us-ascii?Q?TQ/zlQ5Uo5yZBdsRcToz9imcorU7mJQmACdCBoNR?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7ab5525f-9731-4bd3-aaf3-08db794205e1 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2023 08:14:27.6319 (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: 54be/pd2v6qeKwKzxs4yG0MvgGpSEyT46HPYtP0+4WtazsTNkAbzzDY6nBUKEnZTji5M4jFpbClygu3yGAKuSA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6566 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > -----Original Message----- > From: Zhang, Qi Z > Sent: Friday, June 30, 2023 4:13 PM > To: Mingxia Liu ; dev@dpdk.org > Cc: Wu, Jingjing ; Xing, Beilei ; > Liu, Mingxia > Subject: RE: [PATCH] net/idpf: refine idpf_dev_vport_init() function >=20 >=20 >=20 > > -----Original Message----- > > From: Mingxia Liu > > Sent: Monday, June 26, 2023 10:06 PM > > To: dev@dpdk.org > > Cc: Wu, Jingjing ; Xing, Beilei > > ; Liu, Mingxia > > Subject: [PATCH] net/idpf: refine idpf_dev_vport_init() function > > > > This patch adds 'cur_vports' and 'cur_vport_nb' updation in error path. > > > > Signed-off-by: Mingxia Liu > > --- > > drivers/net/idpf/idpf_ethdev.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/net/idpf/idpf_ethdev.c > > b/drivers/net/idpf/idpf_ethdev.c index 801da57472..3e66898aaf 100644 > > --- a/drivers/net/idpf/idpf_ethdev.c > > +++ b/drivers/net/idpf/idpf_ethdev.c > > @@ -1300,6 +1300,8 @@ idpf_dev_vport_init(struct rte_eth_dev *dev, > > void > > *init_params) > > err_mac_addrs: > > adapter->vports[param->idx] =3D NULL; /* reset */ > > idpf_vport_deinit(vport); > > + adapter->cur_vports &=3D ~RTE_BIT32(param->devarg_id); > > + adapter->cur_vport_nb--; >=20 > Can we move below two lines to the last? >=20 > adapter->cur_vports |=3D RTE_BIT32(param->devarg_id); cur_vport_nb++; >=20 > so we don't need to revert them in error handle Btw this is a fix, please also add the fixline. >=20 > > err: > > return ret; > > } > > -- > > 2.34.1