2020-08-07 02:07:10

by Saeed Mahameed

[permalink] [raw]
Subject: [PATCH 4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode

From: Roi Dayan <[email protected]>

Support for phys switch id ndo added for representors and if
we do not have representors there is no need to support it.
Since each port return different switch id supporting this
block support for creating bond over PFs and attaching to bridge
in legacy mode.

This bug doesn't exist upstream as the code got refactored and the
netdev api is totally different.

Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
Signed-off-by: Roi Dayan <[email protected]>
Signed-off-by: Saeed Mahameed <[email protected]>
---
Hi Greg,

Sorry for submitting a non upstream patch, but this bug is
bothering some users on 4.19-stable kernels and it doesn't exist
upstream, so i hope you are ok with backporting this one liner patch.

Thanks !!

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 701624a63d2f..1ab40d622ae1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -198,7 +198,7 @@ int mlx5e_attr_get(struct net_device *dev, struct switchdev_attr *attr)
struct mlx5_eswitch_rep *rep = rpriv->rep;
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;

- if (esw->mode == SRIOV_NONE)
+ if (esw->mode != SRIOV_OFFLOADS)
return -EOPNOTSUPP;

switch (attr->id) {
--
2.8.4


2020-08-07 13:14:47

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode

On Thu, Aug 06, 2020 at 07:05:42PM -0700, Saeed Mahameed wrote:
> From: Roi Dayan <[email protected]>
>
> Support for phys switch id ndo added for representors and if
> we do not have representors there is no need to support it.
> Since each port return different switch id supporting this
> block support for creating bond over PFs and attaching to bridge
> in legacy mode.
>
> This bug doesn't exist upstream as the code got refactored and the
> netdev api is totally different.
>
> Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
> Signed-off-by: Roi Dayan <[email protected]>
> Signed-off-by: Saeed Mahameed <[email protected]>
> ---
> Hi Greg,
>
> Sorry for submitting a non upstream patch, but this bug is
> bothering some users on 4.19-stable kernels and it doesn't exist
> upstream, so i hope you are ok with backporting this one liner patch.

Also queued up to 4.9.y and 4.14.y.

thanks,

greg k-h

2020-09-10 18:50:06

by Saeed Mahameed

[permalink] [raw]
Subject: Re: [PATCH 4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode

On Fri, 2020-08-07 at 15:13 +0200, Greg Kroah-Hartman wrote:
> On Thu, Aug 06, 2020 at 07:05:42PM -0700, Saeed Mahameed wrote:
> > From: Roi Dayan <[email protected]>
> >
> > Support for phys switch id ndo added for representors and if
> > we do not have representors there is no need to support it.
> > Since each port return different switch id supporting this
> > block support for creating bond over PFs and attaching to bridge
> > in legacy mode.
> >
> > This bug doesn't exist upstream as the code got refactored and the
> > netdev api is totally different.
> >
> > Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
> > Signed-off-by: Roi Dayan <[email protected]>
> > Signed-off-by: Saeed Mahameed <[email protected]>
> > ---
> > Hi Greg,
> >
> > Sorry for submitting a non upstream patch, but this bug is
> > bothering some users on 4.19-stable kernels and it doesn't exist
> > upstream, so i hope you are ok with backporting this one liner
> > patch.
>
> Also queued up to 4.9.y and 4.14.y.
>

Hi Greg, the request was originally made for 4.19.y kernel,
I see the patch in 4.9 and 4.14 but not in 4.19 can we push it to 4.19
as well ?

Thanks,
Saeed.



2020-09-11 11:58:50

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode

On Thu, Sep 10, 2020 at 11:46:36AM -0700, Saeed Mahameed wrote:
> On Fri, 2020-08-07 at 15:13 +0200, Greg Kroah-Hartman wrote:
> > On Thu, Aug 06, 2020 at 07:05:42PM -0700, Saeed Mahameed wrote:
> > > From: Roi Dayan <[email protected]>
> > >
> > > Support for phys switch id ndo added for representors and if
> > > we do not have representors there is no need to support it.
> > > Since each port return different switch id supporting this
> > > block support for creating bond over PFs and attaching to bridge
> > > in legacy mode.
> > >
> > > This bug doesn't exist upstream as the code got refactored and the
> > > netdev api is totally different.
> > >
> > > Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
> > > Signed-off-by: Roi Dayan <[email protected]>
> > > Signed-off-by: Saeed Mahameed <[email protected]>
> > > ---
> > > Hi Greg,
> > >
> > > Sorry for submitting a non upstream patch, but this bug is
> > > bothering some users on 4.19-stable kernels and it doesn't exist
> > > upstream, so i hope you are ok with backporting this one liner
> > > patch.
> >
> > Also queued up to 4.9.y and 4.14.y.
> >
>
> Hi Greg, the request was originally made for 4.19.y kernel,
> I see the patch in 4.9 and 4.14 but not in 4.19 can we push it to 4.19
> as well ?

Very odd, don't know what happened.

Now fixed up, thanks.

greg k-h