Skip to contentSkip to conversation

net/ipn3ke: fix representor name

PATCH Applied Wei Huang 3 participants 3 messages Mar 17, 2023 – Mar 20, 2023 Network drivers

lore
Share & tools
lore

Wei Huang

author
#0 lore raw

PATCH 1/1 net/ipn3ke: fix representor name

The device name used in rte_eth_dev_allocated() function is afu device name instead of representor name, this patch correct it.

Fixes c01c748e4ae6 ("net/ipn3ke: add new driver")
---
 drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_ethdev.c +1 -1
index 70a06a3..2c15611 100644
@@ -558,7 +558,7 @@ static int ipn3ke_vswitch_remove(struct rte_afu_device *afu_dev)
 		snprintf(name, sizeof(name), "net_%s_representor_%d",
 			afu_dev->device.name, i);
 
-		ethdev = rte_eth_dev_allocated(afu_dev->device.name);
+		ethdev = rte_eth_dev_allocated(name);
 		if (ethdev != NULL)
 			rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
 	}
Signature · 1 line
1.8.3.1
Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 34 lines

-----Original Message-----
From: Huang, Wei <[email protected]>
Sent: Friday, March 17, 2023 4:45 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Xu, Rosen <[email protected]>; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>; Huang, Wei <[email protected]>
Subject: [PATCH v1] net/ipn3ke: fix representor name

The device name used in rte_eth_dev_allocated() function is afu device name instead of representor name, this patch correct it.

Fixes c01c748e4ae6 ("net/ipn3ke: add new driver")
---
 drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_ethdev.c +1 -1
index 70a06a3..2c15611 100644
@@ -558,7 +558,7 @@ static int ipn3ke_vswitch_remove(struct
 rte_afu_device *afu_dev)
 		snprintf(name, sizeof(name), "net_%s_representor_%d",
 			afu_dev->device.name, i);
 
-		ethdev = rte_eth_dev_allocated(afu_dev->device.name);
+		ethdev = rte_eth_dev_allocated(name);
 		if (ethdev != NULL)
 			rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);
Quoted 3 lines

}
--
1.8.3.1

Applied
#2 lore raw
Quoted 43 lines

-----Original Message-----
From: Xu, Rosen <[email protected]>
Sent: Monday, March 20, 2023 2:53 PM
To: Huang, Wei <[email protected]>; [email protected]; [email protected]; [email protected]
Cc: [email protected]; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: RE: [PATCH v1] net/ipn3ke: fix representor name

Hi,

Quoted 30 lines

-----Original Message-----
From: Huang, Wei <[email protected]>
Sent: Friday, March 17, 2023 4:45 AM
To: [email protected]; [email protected]; [email protected]
Cc: [email protected]; Xu, Rosen <[email protected]>; Zhang, Tianfei <[email protected]>; Zhang, Qi Z <[email protected]>; Huang, Wei <[email protected]>
Subject: [PATCH v1] net/ipn3ke: fix representor name

The device name used in rte_eth_dev_allocated() function is afu device name instead of representor name, this patch correct it.

Fixes c01c748e4ae6 ("net/ipn3ke: add new driver")
---
 drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ipn3ke/ipn3ke_ethdev.c +0 -0
index 70a06a3..2c15611 100644
@@ -558,7 +558,7 @@ static int ipn3ke_vswitch_remove(struct
 rte_afu_device *afu_dev)
 		snprintf(name, sizeof(name), "net_%s_representor_%d",
 			afu_dev->device.name, i);
 
Quoted 9 lines
Quoted 7 lines
drivers/net/ipn3ke/ipn3ke_ethdev.c +1 -1
-		ethdev = rte_eth_dev_allocated(afu_dev->device.name);
+		ethdev = rte_eth_dev_allocated(name);
 		if (ethdev != NULL)
 			rte_eth_dev_destroy(ethdev, ipn3ke_rpst_uninit);

}
--
1.8.3.1

Applied to dpdk-next-net-intel.

Thanks
Qi