Skip to content

Commit 0216f88

Browse files
roidayangregkh
authored andcommitted
net/mlx5e: Don't support phys switch id if not in switchdev mode
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: cb67b83 ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 487862f commit 0216f88

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_rep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ int mlx5e_attr_get(struct net_device *dev, struct switchdev_attr *attr)
139139
struct mlx5_eswitch_rep *rep = priv->ppriv;
140140
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
141141

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

145145
switch (attr->id) {

0 commit comments

Comments
 (0)