Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] vdpa/mlx5: Extract correct pointer from driver data
@ 2021-02-16  5:50 Eli Cohen
  2021-02-16  5:50 ` Eli Cohen
  2021-02-23 12:32 ` Michael S. Tsirkin
  0 siblings, 2 replies; 9+ messages in thread
From: Eli Cohen @ 2021-02-16  5:50 UTC (permalink / raw)
  To: mst, jasowang, linux-kernel, virtualization, netdev; +Cc: si-wei.liu, elic

struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().

Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 6b0a42183622..4103d3b64a2a 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
 
 static void mlx5v_remove(struct auxiliary_device *adev)
 {
-	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
+	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
 
-	vdpa_unregister_device(&mvdev->vdev);
+	vdpa_unregister_device(&ndev->mvdev.vdev);
 }
 
 static const struct auxiliary_device_id mlx5v_id_table[] = {
-- 
2.29.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  5:50 [PATCH] vdpa/mlx5: Extract correct pointer from driver data Eli Cohen
@ 2021-02-16  5:50 ` Eli Cohen
  2021-02-16  6:35   ` Leon Romanovsky
  2021-02-23 12:32 ` Michael S. Tsirkin
  1 sibling, 1 reply; 9+ messages in thread
From: Eli Cohen @ 2021-02-16  5:50 UTC (permalink / raw)
  To: mst, jasowang, linux-kernel, virtualization, netdev; +Cc: si-wei.liu, elic

struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
in mlx5v_remove().

Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
Signed-off-by: Eli Cohen <elic@nvidia.com>
---
 drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 6b0a42183622..4103d3b64a2a 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
 
 static void mlx5v_remove(struct auxiliary_device *adev)
 {
-	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
+	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
 
-	vdpa_unregister_device(&mvdev->vdev);
+	vdpa_unregister_device(&ndev->mvdev.vdev);
 }
 
 static const struct auxiliary_device_id mlx5v_id_table[] = {
-- 
2.29.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  5:50 ` Eli Cohen
@ 2021-02-16  6:35   ` Leon Romanovsky
  2021-02-16  6:42     ` Eli Cohen
  0 siblings, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2021-02-16  6:35 UTC (permalink / raw)
  To: Eli Cohen; +Cc: mst, jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
> struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> in mlx5v_remove().
>
> Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> Signed-off-by: Eli Cohen <elic@nvidia.com>
> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 6b0a42183622..4103d3b64a2a 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
>
>  static void mlx5v_remove(struct auxiliary_device *adev)
>  {
> -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
>
> -	vdpa_unregister_device(&mvdev->vdev);
> +	vdpa_unregister_device(&ndev->mvdev.vdev);
>  }

IMHO, The more correct solution is to fix dev_set_drvdata() call,
because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".

diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index 88dde3455bfd..079b8fe669af 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -1995,7 +1995,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
 	if (err)
 		goto err_reg;

-	dev_set_drvdata(&adev->dev, ndev);
+	dev_set_drvdata(&adev->dev, mvdev);
 	return 0;

 err_reg:

>
>  static const struct auxiliary_device_id mlx5v_id_table[] = {

> --
> 2.29.2
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  6:35   ` Leon Romanovsky
@ 2021-02-16  6:42     ` Eli Cohen
  2021-02-16  7:37       ` Leon Romanovsky
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Cohen @ 2021-02-16  6:42 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: mst, jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
> On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
> > struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> > in mlx5v_remove().
> >
> > Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> > Signed-off-by: Eli Cohen <elic@nvidia.com>
> > ---
> >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 6b0a42183622..4103d3b64a2a 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> >
> >  static void mlx5v_remove(struct auxiliary_device *adev)
> >  {
> > -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> > +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
> >
> > -	vdpa_unregister_device(&mvdev->vdev);
> > +	vdpa_unregister_device(&ndev->mvdev.vdev);
> >  }
> 
> IMHO, The more correct solution is to fix dev_set_drvdata() call,
> because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
> 

We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
a member field of "struct mlx5_vdpa_net".

> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 88dde3455bfd..079b8fe669af 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -1995,7 +1995,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
>  	if (err)
>  		goto err_reg;
> 
> -	dev_set_drvdata(&adev->dev, ndev);
> +	dev_set_drvdata(&adev->dev, mvdev);
>  	return 0;
> 
>  err_reg:
> 
> >
> >  static const struct auxiliary_device_id mlx5v_id_table[] = {
> 
> > --
> > 2.29.2
> >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  6:42     ` Eli Cohen
@ 2021-02-16  7:37       ` Leon Romanovsky
  2021-02-16 12:45         ` Eli Cohen
  0 siblings, 1 reply; 9+ messages in thread
From: Leon Romanovsky @ 2021-02-16  7:37 UTC (permalink / raw)
  To: Eli Cohen; +Cc: mst, jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
> On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
> > On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
> > > struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> > > in mlx5v_remove().
> > >
> > > Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> > > Signed-off-by: Eli Cohen <elic@nvidia.com>
> > > ---
> > >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > index 6b0a42183622..4103d3b64a2a 100644
> > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> > >
> > >  static void mlx5v_remove(struct auxiliary_device *adev)
> > >  {
> > > -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> > > +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
> > >
> > > -	vdpa_unregister_device(&mvdev->vdev);
> > > +	vdpa_unregister_device(&ndev->mvdev.vdev);
> > >  }
> >
> > IMHO, The more correct solution is to fix dev_set_drvdata() call,
> > because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
> >
>
> We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
> a member field of "struct mlx5_vdpa_net".

I referred to these lines in the mlx5v_probe():
  1986         err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
  1987         if (err)
  1988                 goto err_mtu;
  1989
  1990         err = alloc_resources(ndev);
  1991         if (err)
  1992                 goto err_res;
  1993
  1994         err = vdpa_register_device(&mvdev->vdev);

So mlx5v_remove() is better to be symmetrical.

Thanks

>
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 88dde3455bfd..079b8fe669af 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -1995,7 +1995,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> >  	if (err)
> >  		goto err_reg;
> >
> > -	dev_set_drvdata(&adev->dev, ndev);
> > +	dev_set_drvdata(&adev->dev, mvdev);
> >  	return 0;
> >
> >  err_reg:
> >
> > >
> > >  static const struct auxiliary_device_id mlx5v_id_table[] = {
> >
> > > --
> > > 2.29.2
> > >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  7:37       ` Leon Romanovsky
@ 2021-02-16 12:45         ` Eli Cohen
  2021-02-16 13:17           ` Leon Romanovsky
  0 siblings, 1 reply; 9+ messages in thread
From: Eli Cohen @ 2021-02-16 12:45 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: mst, jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 09:37:34AM +0200, Leon Romanovsky wrote:
> On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
> > On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
> > > On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
> > > > struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> > > > in mlx5v_remove().
> > > >
> > > > Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> > > > Signed-off-by: Eli Cohen <elic@nvidia.com>
> > > > ---
> > > >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > index 6b0a42183622..4103d3b64a2a 100644
> > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> > > >
> > > >  static void mlx5v_remove(struct auxiliary_device *adev)
> > > >  {
> > > > -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> > > > +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
> > > >
> > > > -	vdpa_unregister_device(&mvdev->vdev);
> > > > +	vdpa_unregister_device(&ndev->mvdev.vdev);
> > > >  }
> > >
> > > IMHO, The more correct solution is to fix dev_set_drvdata() call,
> > > because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
> > >
> >
> > We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
> > a member field of "struct mlx5_vdpa_net".
> 
> I referred to these lines in the mlx5v_probe():
>   1986         err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
>   1987         if (err)
>   1988                 goto err_mtu;
>   1989
>   1990         err = alloc_resources(ndev);
>   1991         if (err)
>   1992                 goto err_res;
>   1993
>   1994         err = vdpa_register_device(&mvdev->vdev);
> 
> So mlx5v_remove() is better to be symmetrical.
> 

It's "struct mlx5_vdpa_net" that is being allocated here so it makes
sense to set this pointer as the the driver data.

> Thanks
> 
> >
> > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > index 88dde3455bfd..079b8fe669af 100644
> > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > @@ -1995,7 +1995,7 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> > >  	if (err)
> > >  		goto err_reg;
> > >
> > > -	dev_set_drvdata(&adev->dev, ndev);
> > > +	dev_set_drvdata(&adev->dev, mvdev);
> > >  	return 0;
> > >
> > >  err_reg:
> > >
> > > >
> > > >  static const struct auxiliary_device_id mlx5v_id_table[] = {
> > >
> > > > --
> > > > 2.29.2
> > > >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16 12:45         ` Eli Cohen
@ 2021-02-16 13:17           ` Leon Romanovsky
  0 siblings, 0 replies; 9+ messages in thread
From: Leon Romanovsky @ 2021-02-16 13:17 UTC (permalink / raw)
  To: Eli Cohen; +Cc: mst, jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 02:45:40PM +0200, Eli Cohen wrote:
> On Tue, Feb 16, 2021 at 09:37:34AM +0200, Leon Romanovsky wrote:
> > On Tue, Feb 16, 2021 at 08:42:26AM +0200, Eli Cohen wrote:
> > > On Tue, Feb 16, 2021 at 08:35:51AM +0200, Leon Romanovsky wrote:
> > > > On Tue, Feb 16, 2021 at 07:50:22AM +0200, Eli Cohen wrote:
> > > > > struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> > > > > in mlx5v_remove().
> > > > >
> > > > > Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> > > > > Signed-off-by: Eli Cohen <elic@nvidia.com>
> > > > > ---
> > > > >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > > index 6b0a42183622..4103d3b64a2a 100644
> > > > > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > > > > @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> > > > >
> > > > >  static void mlx5v_remove(struct auxiliary_device *adev)
> > > > >  {
> > > > > -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> > > > > +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
> > > > >
> > > > > -	vdpa_unregister_device(&mvdev->vdev);
> > > > > +	vdpa_unregister_device(&ndev->mvdev.vdev);
> > > > >  }
> > > >
> > > > IMHO, The more correct solution is to fix dev_set_drvdata() call,
> > > > because we are regustering/unregistering/allocating "struct mlx5_vdpa_dev".
> > > >
> > >
> > > We're allocating "struct mlx5_vdpa_net". "struct mlx5_vdpa_dev" is just
> > > a member field of "struct mlx5_vdpa_net".
> >
> > I referred to these lines in the mlx5v_probe():
> >   1986         err = mlx5_vdpa_alloc_resources(&ndev->mvdev);
> >   1987         if (err)
> >   1988                 goto err_mtu;
> >   1989
> >   1990         err = alloc_resources(ndev);
> >   1991         if (err)
> >   1992                 goto err_res;
> >   1993
> >   1994         err = vdpa_register_device(&mvdev->vdev);
> >
> > So mlx5v_remove() is better to be symmetrical.
> >
>
> It's "struct mlx5_vdpa_net" that is being allocated here so it makes
> sense to set this pointer as the the driver data.

Anyway, it doesn't important.

Thanks, for the original patch.
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-16  5:50 [PATCH] vdpa/mlx5: Extract correct pointer from driver data Eli Cohen
  2021-02-16  5:50 ` Eli Cohen
@ 2021-02-23 12:32 ` Michael S. Tsirkin
  2021-02-23 12:43   ` Eli Cohen
  1 sibling, 1 reply; 9+ messages in thread
From: Michael S. Tsirkin @ 2021-02-23 12:32 UTC (permalink / raw)
  To: Eli Cohen; +Cc: jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 16, 2021 at 07:50:21AM +0200, Eli Cohen wrote:
> struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> in mlx5v_remove().
> 
> Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> Signed-off-by: Eli Cohen <elic@nvidia.com>

Sorry which tree this is for? Couldn't apply.

> ---
>  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> index 6b0a42183622..4103d3b64a2a 100644
> --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
>  
>  static void mlx5v_remove(struct auxiliary_device *adev)
>  {
> -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
>  
> -	vdpa_unregister_device(&mvdev->vdev);
> +	vdpa_unregister_device(&ndev->mvdev.vdev);
>  }
>  
>  static const struct auxiliary_device_id mlx5v_id_table[] = {
> -- 
> 2.29.2


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] vdpa/mlx5: Extract correct pointer from driver data
  2021-02-23 12:32 ` Michael S. Tsirkin
@ 2021-02-23 12:43   ` Eli Cohen
  0 siblings, 0 replies; 9+ messages in thread
From: Eli Cohen @ 2021-02-23 12:43 UTC (permalink / raw)
  To: Michael S. Tsirkin
  Cc: jasowang, linux-kernel, virtualization, netdev, si-wei.liu

On Tue, Feb 23, 2021 at 07:32:49AM -0500, Michael S. Tsirkin wrote:
> On Tue, Feb 16, 2021 at 07:50:21AM +0200, Eli Cohen wrote:
> > struct mlx5_vdpa_net pointer was stored in drvdata. Extract it as well
> > in mlx5v_remove().
> > 
> > Fixes: 74c9729dd892 ("vdpa/mlx5: Connect mlx5_vdpa to auxiliary bus")
> > Signed-off-by: Eli Cohen <elic@nvidia.com>
> 
> Sorry which tree this is for? Couldn't apply.
> 

Drop it. The patch that adds support for management bus implicitly
addresses the issue.

> > ---
> >  drivers/vdpa/mlx5/net/mlx5_vnet.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > index 6b0a42183622..4103d3b64a2a 100644
> > --- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > +++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
> > @@ -2036,9 +2036,9 @@ static int mlx5v_probe(struct auxiliary_device *adev,
> >  
> >  static void mlx5v_remove(struct auxiliary_device *adev)
> >  {
> > -	struct mlx5_vdpa_dev *mvdev = dev_get_drvdata(&adev->dev);
> > +	struct mlx5_vdpa_net *ndev = dev_get_drvdata(&adev->dev);
> >  
> > -	vdpa_unregister_device(&mvdev->vdev);
> > +	vdpa_unregister_device(&ndev->mvdev.vdev);
> >  }
> >  
> >  static const struct auxiliary_device_id mlx5v_id_table[] = {
> > -- 
> > 2.29.2
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-16  5:50 [PATCH] vdpa/mlx5: Extract correct pointer from driver data Eli Cohen
2021-02-16  5:50 ` Eli Cohen
2021-02-16  6:35   ` Leon Romanovsky
2021-02-16  6:42     ` Eli Cohen
2021-02-16  7:37       ` Leon Romanovsky
2021-02-16 12:45         ` Eli Cohen
2021-02-16 13:17           ` Leon Romanovsky
2021-02-23 12:32 ` Michael S. Tsirkin
2021-02-23 12:43   ` Eli Cohen

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git