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 DCBED42D94; Fri, 30 Jun 2023 10:13:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 63F4E406B5; Fri, 30 Jun 2023 10:13:14 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6EBBC4021F for ; Fri, 30 Jun 2023 10:13:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688112792; x=1719648792; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=wopvbiIVdobZpLZUutwyAljSREmzc8dm0YhsLyPmTrE=; b=bJcGk+ObQPoAZ6IOPAtmr1gXhS3S9rm6SozHrsuYLRRDNh5M1+iNqkpa WS59X9L13kJCas0CxMcaxAtse2kJYV/FDsXN5JntYxaP3u6gAjagr3JgM aonofMvBq2kwrHx267KKTHgGQ2AoYSp/3YDloF0UvdTrSbG1Bb7i/eTTm bj/svcZF+MEBou/IS0eKaIrL6H1kd3/EqzLdtvdK8ndzRkPuRK6rgGe/G Jduvg0NejCN55iLzAGO5coTvhBo7a1OOhlsrgQ/zDorryKKp3buzoqSB8 J3TqqA0RP0PElDF03KF1PJkhgiFRGcG8M1w+t5vLjALl0MsrgdsgHQ+hm A==; X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="352165411" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="352165411" 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:13:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10756"; a="891685203" X-IronPort-AV: E=Sophos;i="6.01,170,1684825200"; d="scan'208";a="891685203" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 30 Jun 2023 01:13:11 -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:13:10 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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:13:09 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) 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 via Frontend Transport; Fri, 30 Jun 2023 01:13:09 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) 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:13:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q04aUS01kH5823mf3uesAEUpObdIngaEjVgVDk9VSfdEaTHFADVHs8GrZP8ntbeU/BG6LhC9QTZLrk/N5ToEF604s75xOwbcCZOO2zRTLgIVYtnnQqC0/t01rFq7S3I0R80C9GBhLYKRWvAeM6KKvwqvQwPYBBnN/loCqoZYCFCw/fOm7A1izEfRx/cS0c1RDp40l0dz77TJZ7EI7Tp68IXFGQICfc72L1W2tWtlvS/AGUgl7Ol1MtyWscZWjhorzshQePPQXSE6CUVFyn5bPv0X9GmYIzUyKGrMSjlg2E5NxqitEpjsI0V1/qUFkjV8Rf+SLsMiDTQF9zdSlJ5Csw== 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=/Me1+LYws47NqlZ0jHQXxwQpfnDzeoe29JPM+aOh/cA=; b=iwcS085/332Vc27MbpPpY2Oa7gBGBEeNjBST5PcgG8yqOBdrYzrn27sDczApbEBfj4BesgoZ07WXx0RRr8e/thBWkdynL3sVn2ew+es/g91hfIUYlXbMcerv/Zr8UjknOzroFpYVXQ6Gtsz9uwZrhTYAwetHpWwRUXbIAhf04jO5chqGTW8bj5Ox5keo+mqW+b6JSSkTOkk7HxMDG/hzviA140ZxxtuEVD+09tasdj6MHtVn2n0v917bjFPnvSbik1JMYh1y84Fb6rv5gXFCbm5uOX1HeM6V6qbUuouDE8+/qYNwwjWssJqUrlLFfw6rxE2cvMgdA9khbQyVTSIBmA== 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:13:07 +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:13:07 +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+jBRDQ Date: Fri, 30 Jun 2023 08:13:06 +0000 Message-ID: References: <20230626140606.490871-1-mingxia.liu@intel.com> In-Reply-To: <20230626140606.490871-1-mingxia.liu@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-traffictypediagnostic: DM4PR11MB5994:EE_|SA1PR11MB6566:EE_ x-ms-office365-filtering-correlation-id: 39bfd3f8-5f06-4971-d007-08db7941d5d0 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Pno5MMm9p2XoGNDY/xhFwWqVT7IPbsoNGEq2mVY7cTrjPDGl2aaYztwoC9z1WCDGVpx/EU1FYbYlmKi5KRuMh48xd3amW3EwF7k9d9Ydf7BdT4pdOq0tSHQ9vUygrO33N4mIMceO/n15iwnuedewT4stAwvH6UpRPdew/84RfLIUudgGVb7fNp6wjprB8FYTHPJ8WMu9F6OLIqZNOVXeae1i5GkkaqBOa3OpCddGXz4UAy9hV/EHtPNcDMYCTumFd8+l/4sdyLZ8TxTTd8JqEn4TLO0eK2vBjGe+IS6Kqb/8d8XD7ltV0P0yS7c9WQgFdtwG/4pzegvZLnUFa3VA40oeExceAJr/TdBnxYcqJGvznniqvGxkFwkF2ri1g7ZQ2FEtYw64wuUeXeo7rUWDuOc+goZJ+yUxFfZlwXCIjE46b021zmDamCrIGwhBMdzwpm56kN7+GhAcZIBFke9LZAQAbLx0wTXMTjvwfU8yIloGBWndPBEAisGfEq5+LECfU2XUiCY0vI1FPWloIifF55vFTn4WWfCLzyoechGwEScfwqcjHaI42MoMoqck69HG9KtK0cT58FMzbJJ/Dx4UJDGypWzD3vsQbLslvQ6iOZ7zTHfe0SWYlEWEdZQ5bNas 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)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nk576SuUxVZajmqytsAdLTqgLh1FjhDOH7W8NDLvGU/4XUKggP5S2lBayVcf?= =?us-ascii?Q?wpKGRTKIiisHr6/ON9LroB/4/EHOGrXdnadfrDHoD2TMozeMKJKMElOpweMu?= =?us-ascii?Q?9Wd0VZX80r5heeO3XGbMY5iQ3TF/35EhhjMrE+/rb5thXflcSNWb2mjoleWQ?= =?us-ascii?Q?XHY2qVVyFESwmiR1tVH1GMbOHewIyM5zaCa4U0gxLzIgNDRsuMP9js884KTh?= =?us-ascii?Q?8n8ZNtNKHEQgDX8N/QEV1y9nv/nXq8IfUDmjMHDw/50Qp5yhLdeAfx+oe4iB?= =?us-ascii?Q?cCiJp3eAAU1sAvTmd8W1+TM2X3sW0qHto/loPePZennJhI9ZRnXHdy53Maes?= =?us-ascii?Q?iDWVZ3uem68BAiWbPRJdjpDQnrPdvHgd+iIEOqxi2pwMTaR1Ngfv/ZD8Uzfv?= =?us-ascii?Q?8VRe60ytklkAH3uFdhX8zJviYbQ5BhNC/iyZZcTq8S1nEbJ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0sBc5SAIVAunNbPUsKMbIVtBchS0r6ZCPfLYnX0ixa?= =?us-ascii?Q?0hA5uQ2Zilahfxu+Dzt66B8o+yWtxUTC8U71PEWQtVvrEqbASIFyRhC0Rp5d?= =?us-ascii?Q?vRZyK9kXybGA5YFDAUiJcmuRybZK0vmBmdO+xKX1KZ7GC96H5+PfwHUQUx7k?= =?us-ascii?Q?+qcnJlKlsT+E2wKYyDuhXSQiUxXoOrO2icYirqiRQD/sKgel8YNlTj5pd5Uo?= =?us-ascii?Q?rzZ2R0qactr+Yzm9vDEtEtmNhYPI45UmGdQWO9ki?= 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: 39bfd3f8-5f06-4971-d007-08db7941d5d0 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Jun 2023 08:13:07.0065 (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: gDm41c7TX/oaiFBzAwc8L0JQdK7Q6rR4kyqOgIcBbihIc72ilvgYwD7k7/lygai4q1r2NR/s18/BgS/ivlUKfA== 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: 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 >=20 > This patch adds 'cur_vports' and 'cur_vport_nb' updation in error path. >=20 > Signed-off-by: Mingxia Liu > --- > drivers/net/idpf/idpf_ethdev.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethde= v.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--; Can we move below two lines to the last? adapter->cur_vports |=3D RTE_BIT32(param->devarg_id); adapter->cur_vport_nb++; so we don't need to revert them in error handle > err: > return ret; > } > -- > 2.34.1