diff mbox series

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

Message ID 20200807020542.636290-1-saeedm@mellanox.com
State Not Applicable
Delegated to: David Miller
Headers show
Series [4.19] net/mlx5e: Don't support phys switch id if not in switchdev mode | expand

Commit Message

Saeed Mahameed Aug. 7, 2020, 2:05 a.m. UTC
From: Roi Dayan <roid@mellanox.com>

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 <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
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(-)

Comments

gregkh@linuxfoundation.org Aug. 7, 2020, 1:13 p.m. UTC | #1
On Thu, Aug 06, 2020 at 07:05:42PM -0700, Saeed Mahameed wrote:
> From: Roi Dayan <roid@mellanox.com>
> 
> 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 <roid@mellanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> ---
> 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
Saeed Mahameed Sept. 10, 2020, 6:46 p.m. UTC | #2
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 <roid@mellanox.com>
> > 
> > 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 <roid@mellanox.com>
> > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> > ---
> > 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.
gregkh@linuxfoundation.org Sept. 11, 2020, 11:57 a.m. UTC | #3
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 <roid@mellanox.com>
> > > 
> > > 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 <roid@mellanox.com>
> > > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
> > > ---
> > > 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
diff mbox series

Patch

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) {