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 469A542D54; Mon, 26 Jun 2023 07:48:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 38C9042D16; Mon, 26 Jun 2023 07:48:27 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 4F3064067B for ; Mon, 26 Jun 2023 07:48:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687758506; x=1719294506; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vlsOODptLKU/skWRVhoTC8nVINqLLcdxWzbtTrzlp/8=; b=PvuRt9RgJA55XUovz/+AyxrZI0DEFfBzY3YIzPjrHtWmSrCF/spfs3yy alLag2FCLRhS1Wq7d1S8rptbfHs8FuZ6kzYgnQLlFK42Gg8Fa/ZZrpsqQ CIkWmoSdhfaJg1kIshtG/TjUqflrDPqBy8wzJllk1gdCWd8VXzSJf2CRe L16y4qu0DS5lZmU8o47H5Ya620dqgZYq+el8Cd7BHz92QxdmuAYEog+pJ YyHdMRgKySbFf/btLEfYgRiza6/xSMCcMEs9C8CRrDitW+9OPZm9rdSrk jpemDQxDwymqyi4AE7WZdlJN5RqNUP/IxgaNFlEm0C2O55UTXFKvM/XF+ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="427172465" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="427172465" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jun 2023 22:48:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10752"; a="719210539" X-IronPort-AV: E=Sophos;i="6.01,158,1684825200"; d="scan'208";a="719210539" Received: from dpdk-mingxial-ice.sh.intel.com ([10.67.110.210]) by fmsmga007.fm.intel.com with ESMTP; 25 Jun 2023 22:48:23 -0700 From: Mingxia Liu To: dev@dpdk.org Cc: jingjing.wu@intel.com, beilei.xing@intel.com, Mingxia Liu Subject: [PATCH] net/idpf: refine idpf_dev_vport_init() function Date: Mon, 26 Jun 2023 14:06:06 +0000 Message-Id: <20230626140606.490871-1-mingxia.liu@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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] = NULL; /* reset */ idpf_vport_deinit(vport); + adapter->cur_vports &= ~RTE_BIT32(param->devarg_id); + adapter->cur_vport_nb--; err: return ret; } -- 2.34.1