Commit b56fb19c authored by Roi Dayan's avatar Roi Dayan Committed by Saeed Mahameed

net/mlx5: Bridge, Only handle registered netdev bridge events

Don't handle bridge events for a netdev that doesn't belong to
an eswitch that registered for bridge events.
Signed-off-by: default avatarRoi Dayan <roid@nvidia.com>
Reviewed-by: default avatarVlad Buslov <vladbu@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
parent d602be22
...@@ -77,6 +77,10 @@ mlx5_esw_bridge_rep_vport_num_vhca_id_get(struct net_device *dev, struct mlx5_es ...@@ -77,6 +77,10 @@ mlx5_esw_bridge_rep_vport_num_vhca_id_get(struct net_device *dev, struct mlx5_es
return NULL; return NULL;
priv = netdev_priv(dev); priv = netdev_priv(dev);
if (!priv->mdev->priv.eswitch->br_offloads)
return NULL;
rpriv = priv->ppriv; rpriv = priv->ppriv;
*vport_num = rpriv->rep->vport; *vport_num = rpriv->rep->vport;
*esw_owner_vhca_id = MLX5_CAP_GEN(priv->mdev, vhca_id); *esw_owner_vhca_id = MLX5_CAP_GEN(priv->mdev, vhca_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment