From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [PATCH] net/i40e: revert default PF PMD device name Date: Mon, 30 Apr 2018 16:30:20 +0100 Message-ID: <20180430153020.971-1-declan.doherty@intel.com> Cc: Declan Doherty To: dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 551E7DD2 for ; Mon, 30 Apr 2018 17:38:31 +0200 (CEST) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changes introduced by e0cb96204b71 modified the default name generated for the i40e PF PMD, this patch reverts the default name to the original PCI BDBF. Fixes: e0cb96204b71 ("net/i40e: add support for representor ports") Signed-off-by: Declan Doherty --- drivers/net/i40e/i40e_ethdev.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index d869add95..284e9cb64 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -630,10 +630,7 @@ eth_i40e_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, return retval; } - /* physical port net_bdf_port */ - snprintf(name, sizeof(name), "net_%s", pci_dev->device.name); - - retval = rte_eth_dev_create(&pci_dev->device, name, + retval = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name, sizeof(struct i40e_adapter), eth_dev_pci_specific_init, pci_dev, eth_i40e_dev_init, NULL); @@ -642,7 +639,8 @@ eth_i40e_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, return retval; /* probe VF representor ports */ - struct rte_eth_dev *pf_ethdev = rte_eth_dev_allocated(name); + struct rte_eth_dev *pf_ethdev = rte_eth_dev_allocated( + pci_dev->device.name); if (pf_ethdev == NULL) return -ENODEV; -- 2.14.3