[dpdk-dev,dpdk-dev,1/3,v2] net/ixgbe: revert default PF PMD device name

Message ID 20180502155941.1338-1-declan.doherty@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation success Compilation OK

Commit Message

Doherty, Declan May 2, 2018, 3:59 p.m. UTC
Changes introduced by cf80ba6e2038 modified the default name generated
for the IXGBE PF PMD, this patch reverts the default name to the
original PCI BDBF.

Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
  

Comments

Ferruh Yigit May 2, 2018, 4:48 p.m. UTC | #1
On 5/2/2018 4:59 PM, Declan Doherty wrote:
> Changes introduced by cf80ba6e2038 modified the default name generated
> for the IXGBE PF PMD, this patch reverts the default name to the
> original PCI BDBF.
> 
> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
> Signed-off-by: Declan Doherty <declan.doherty@intel.com>

For series,
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit May 2, 2018, 5:05 p.m. UTC | #2
On 5/2/2018 5:48 PM, Ferruh Yigit wrote:
> On 5/2/2018 4:59 PM, Declan Doherty wrote:
>> Changes introduced by cf80ba6e2038 modified the default name generated
>> for the IXGBE PF PMD, this patch reverts the default name to the
>> original PCI BDBF.
>>
>> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports")
>> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
> 
> For series,
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Series applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 6088c7e48..e49319a14 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -1725,7 +1725,7 @@  eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		struct rte_pci_device *pci_dev)
 {
 	char name[RTE_ETH_NAME_MAX_LEN];
-
+	struct rte_eth_dev *pf_ethdev;
 	struct rte_eth_devargs eth_da;
 	int i, retval;
 
@@ -1736,10 +1736,7 @@  eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 			return retval;
 	}
 
-	/* physical port net_bdf_port */
-	snprintf(name, sizeof(name), "net_%s_%d", pci_dev->device.name, 0);
-
-	retval = rte_eth_dev_create(&pci_dev->device, name,
+	retval = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name,
 		sizeof(struct ixgbe_adapter),
 		eth_dev_pci_specific_init, pci_dev,
 		eth_ixgbe_dev_init, NULL);
@@ -1748,7 +1745,7 @@  eth_ixgbe_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);
+	pf_ethdev = rte_eth_dev_allocated(pci_dev->device.name);
 
 	for (i = 0; i < eth_da.nb_representor_ports; i++) {
 		struct ixgbe_vf_info *vfinfo;