projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d602be2
)
net/mlx5: Bridge, Only handle registered netdev bridge events
author
Roi Dayan
<roid@nvidia.com>
Tue, 11 Jul 2023 10:23:27 +0000
(13:23 +0300)
committer
Saeed Mahameed
<saeedm@nvidia.com>
Mon, 7 Aug 2023 17:53:52 +0000
(10:53 -0700)
Don't handle bridge events for a netdev that doesn't belong to
an eswitch that registered for bridge events.
Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
b/drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
index 5608002465734d4dfb6da83248f6bae817fd59a4..0fef853eab6265771a0445385e17df20e453407b 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
+++ b/
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c
@@
-77,6
+77,10
@@
mlx5_esw_bridge_rep_vport_num_vhca_id_get(struct net_device *dev, struct mlx5_es
return NULL;
priv = netdev_priv(dev);
+
+ if (!priv->mdev->priv.eswitch->br_offloads)
+ return NULL;
+
rpriv = priv->ppriv;
*vport_num = rpriv->rep->vport;
*esw_owner_vhca_id = MLX5_CAP_GEN(priv->mdev, vhca_id);