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 AC439A0547; Thu, 29 Apr 2021 12:34:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F31C412EE; Thu, 29 Apr 2021 12:34:02 +0200 (CEST) Received: from smtpbg516.qq.com (smtpbg516.qq.com [203.205.250.54]) by mails.dpdk.org (Postfix) with ESMTP id E2E3441311 for ; Thu, 29 Apr 2021 12:33:58 +0200 (CEST) X-QQ-mid: bizesmtp32t1619692428tahu8r99 Received: from jiawenwu.trustnetic.com (unknown [183.129.236.74]) by esmtp6.qq.com (ESMTP) with id ; Thu, 29 Apr 2021 18:33:47 +0800 (CST) X-QQ-SSF: 01400000002000D0E000000A0000000 X-QQ-FEAT: vCa7dv7JIu5izfP9FJ+z1nE5oOXV9JUqsP9JMbUVHj4sv0WS9br2/sWWkdQBH EaapZLXCLd9yI/l5WCzOT9uAPfLD8L6JnEmbZYiXA3I3xX4R+nudlk3vtoElGb2RHFe8GYJ K2DnDSZh7m9+iajFUVAHzQYPJSTAM9A1RKTmTFB9E4fd6WA3oGQDfL7r5YN6v+GNNnNHJwO cgbD/RAovD3zKRvLetnRSZ2iyQXLsEX0MjHGCfMU3CbkXzJYG35xzAbpAaWWZ3u3mUIkJV8 g2O5Uw9mnOgSgz7TNR/mKiML/Q+TvS59ccedJEGDqDy8UCsAacMbYuadxAT/YIFN4k2Mo96 azo5VsSLcuzZtlRVUOpZ+FP2UQNub9juur1RJaC X-QQ-GoodBg: 2 From: Jiawen Wu To: dev@dpdk.org Cc: Jiawen Wu Date: Thu, 29 Apr 2021 18:33:34 +0800 Message-Id: <20210429103335.23060-5-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20210429103335.23060-1-jiawenwu@trustnetic.com> References: <20210429103335.23060-1-jiawenwu@trustnetic.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 Subject: [dpdk-dev] [PATCH v2 4/5] net/txgbe: remove port representor 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 Sender: "dev" Remove port representor in device probe process, because it is not supported by the driver yet. Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_ethdev.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index ddf8a18ac5..c932cca6f5 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -930,34 +930,10 @@ static int eth_txgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, struct rte_pci_device *pci_dev) { - struct rte_eth_dev *pf_ethdev; - struct rte_eth_devargs eth_da; - int retval; - - if (pci_dev->device.devargs) { - retval = rte_eth_devargs_parse(pci_dev->device.devargs->args, - ð_da); - if (retval) - return retval; - } else { - memset(ð_da, 0, sizeof(eth_da)); - } - - retval = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name, + return rte_eth_dev_create(&pci_dev->device, pci_dev->device.name, sizeof(struct txgbe_adapter), eth_dev_pci_specific_init, pci_dev, eth_txgbe_dev_init, NULL); - - if (retval || eth_da.nb_representor_ports < 1) - return retval; - if (eth_da.type != RTE_ETH_REPRESENTOR_VF) - return -ENOTSUP; - - pf_ethdev = rte_eth_dev_allocated(pci_dev->device.name); - if (pf_ethdev == NULL) - return -ENODEV; - - return 0; } static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev) @@ -966,7 +942,7 @@ static int eth_txgbe_pci_remove(struct rte_pci_device *pci_dev) ethdev = rte_eth_dev_allocated(pci_dev->device.name); if (!ethdev) - return -ENODEV; + return 0; return rte_eth_dev_destroy(ethdev, eth_txgbe_dev_uninit); } -- 2.21.0.windows.1