[v1] net/ipn3ke: fix representor name

Message ID 20230316204456.360385-1-wei.huang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series [v1] net/ipn3ke: fix representor name |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance fail Performance Testing issues
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS

Commit Message

Wei Huang March 16, 2023, 8:44 p.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Wei Huang <wei.huang@intel.com>
---
 drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Xu, Rosen March 20, 2023, 6:53 a.m. UTC | #1
Hi,

> -----Original Message-----
> From: Huang, Wei <wei.huang@intel.com>
> Sent: Friday, March 17, 2023 4:45 AM
> To: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com
> Cc: stable@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Tianfei
> <tianfei.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Huang, Wei
> <wei.huang@intel.com>
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wei Huang <wei.huang@intel.com>
> ---
>  drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> index 70a06a3..2c15611 100644
> --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> @@ -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);
>  	}
> --
> 1.8.3.1

Acked-by: Rosen Xu <rosen.xu@intel.com>
  
Qi Zhang March 20, 2023, 1:02 p.m. UTC | #2
> -----Original Message-----
> From: Xu, Rosen <rosen.xu@intel.com>
> Sent: Monday, March 20, 2023 2:53 PM
> To: Huang, Wei <wei.huang@intel.com>; dev@dpdk.org;
> thomas@monjalon.net; david.marchand@redhat.com
> Cc: stable@dpdk.org; Zhang, Tianfei <tianfei.zhang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: RE: [PATCH v1] net/ipn3ke: fix representor name
> 
> Hi,
> 
> > -----Original Message-----
> > From: Huang, Wei <wei.huang@intel.com>
> > Sent: Friday, March 17, 2023 4:45 AM
> > To: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com
> > Cc: stable@dpdk.org; Xu, Rosen <rosen.xu@intel.com>; Zhang, Tianfei
> > <tianfei.zhang@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Huang,
> > Wei <wei.huang@intel.com>
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Wei Huang <wei.huang@intel.com>
> > ---
> >  drivers/net/ipn3ke/ipn3ke_ethdev.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > index 70a06a3..2c15611 100644
> > --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> > @@ -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);
> >  	}
> > --
> > 1.8.3.1
> 
> Acked-by: Rosen Xu <rosen.xu@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c b/drivers/net/ipn3ke/ipn3ke_ethdev.c
index 70a06a3..2c15611 100644
--- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
+++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
@@ -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);
 	}