Commit 0a5a2aee authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

mlxsw: spectrum_switchdev: Propagate extack on VXLAN VLAN events

Now that VLAN port object addition notifications carry an extack,
propagate it from mlxsw_sp_switchdev_vxlan_vlans_add() through
mlxsw_sp_switchdev_vxlan_vlan_add() to
mlxsw_sp_bridge_8021q_vxlan_join().

This code path is used when a VLAN is added to a VXLAN netdevice that
cannot be offloaded.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 69213513
...@@ -3205,7 +3205,8 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp, ...@@ -3205,7 +3205,8 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_bridge_device *bridge_device, struct mlxsw_sp_bridge_device *bridge_device,
const struct net_device *vxlan_dev, u16 vid, const struct net_device *vxlan_dev, u16 vid,
bool flag_untagged, bool flag_pvid, bool flag_untagged, bool flag_pvid,
struct switchdev_trans *trans) struct switchdev_trans *trans,
struct netlink_ext_ack *extack)
{ {
struct vxlan_dev *vxlan = netdev_priv(vxlan_dev); struct vxlan_dev *vxlan = netdev_priv(vxlan_dev);
__be32 vni = vxlan->cfg.vni; __be32 vni = vxlan->cfg.vni;
...@@ -3237,7 +3238,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp, ...@@ -3237,7 +3238,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp,
if (!flag_untagged || !flag_pvid) if (!flag_untagged || !flag_pvid)
return 0; return 0;
return mlxsw_sp_bridge_8021q_vxlan_join(bridge_device, return mlxsw_sp_bridge_8021q_vxlan_join(bridge_device,
vxlan_dev, vid, NULL); vxlan_dev, vid, extack);
} }
/* Second case: FID is associated with the VNI and the VLAN associated /* Second case: FID is associated with the VNI and the VLAN associated
...@@ -3277,7 +3278,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp, ...@@ -3277,7 +3278,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp *mlxsw_sp,
return 0; return 0;
err = mlxsw_sp_bridge_8021q_vxlan_join(bridge_device, vxlan_dev, vid, err = mlxsw_sp_bridge_8021q_vxlan_join(bridge_device, vxlan_dev, vid,
NULL); extack);
if (err) if (err)
goto err_vxlan_join; goto err_vxlan_join;
...@@ -3326,10 +3327,12 @@ mlxsw_sp_switchdev_vxlan_vlans_add(struct net_device *vxlan_dev, ...@@ -3326,10 +3327,12 @@ mlxsw_sp_switchdev_vxlan_vlans_add(struct net_device *vxlan_dev,
bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
struct switchdev_trans *trans = port_obj_info->trans; struct switchdev_trans *trans = port_obj_info->trans;
struct mlxsw_sp_bridge_device *bridge_device; struct mlxsw_sp_bridge_device *bridge_device;
struct netlink_ext_ack *extack;
struct mlxsw_sp *mlxsw_sp; struct mlxsw_sp *mlxsw_sp;
struct net_device *br_dev; struct net_device *br_dev;
u16 vid; u16 vid;
extack = switchdev_notifier_info_to_extack(&port_obj_info->info);
br_dev = netdev_master_upper_dev_get(vxlan_dev); br_dev = netdev_master_upper_dev_get(vxlan_dev);
if (!br_dev) if (!br_dev)
return 0; return 0;
...@@ -3353,7 +3356,8 @@ mlxsw_sp_switchdev_vxlan_vlans_add(struct net_device *vxlan_dev, ...@@ -3353,7 +3356,8 @@ mlxsw_sp_switchdev_vxlan_vlans_add(struct net_device *vxlan_dev,
err = mlxsw_sp_switchdev_vxlan_vlan_add(mlxsw_sp, bridge_device, err = mlxsw_sp_switchdev_vxlan_vlan_add(mlxsw_sp, bridge_device,
vxlan_dev, vid, vxlan_dev, vid,
flag_untagged, flag_untagged,
flag_pvid, trans); flag_pvid, trans,
extack);
if (err) if (err)
return err; return err;
} }
......
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