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: Petr Machata <pe...@mellanox.com>
Acked-by: Jiri Pirko <j...@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c 
b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 4b9292289256..906dfded3098 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -3205,7 +3205,8 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp 
*mlxsw_sp,
                                  struct mlxsw_sp_bridge_device *bridge_device,
                                  const struct net_device *vxlan_dev, u16 vid,
                                  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);
        __be32 vni = vxlan->cfg.vni;
@@ -3237,7 +3238,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp 
*mlxsw_sp,
                if (!flag_untagged || !flag_pvid)
                        return 0;
                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
@@ -3277,7 +3278,7 @@ mlxsw_sp_switchdev_vxlan_vlan_add(struct mlxsw_sp 
*mlxsw_sp,
                return 0;
 
        err = mlxsw_sp_bridge_8021q_vxlan_join(bridge_device, vxlan_dev, vid,
-                                              NULL);
+                                              extack);
        if (err)
                goto err_vxlan_join;
 
@@ -3326,10 +3327,12 @@ mlxsw_sp_switchdev_vxlan_vlans_add(struct net_device 
*vxlan_dev,
        bool flag_pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID;
        struct switchdev_trans *trans = port_obj_info->trans;
        struct mlxsw_sp_bridge_device *bridge_device;
+       struct netlink_ext_ack *extack;
        struct mlxsw_sp *mlxsw_sp;
        struct net_device *br_dev;
        u16 vid;
 
+       extack = switchdev_notifier_info_to_extack(&port_obj_info->info);
        br_dev = netdev_master_upper_dev_get(vxlan_dev);
        if (!br_dev)
                return 0;
@@ -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,
                                                        vxlan_dev, vid,
                                                        flag_untagged,
-                                                       flag_pvid, trans);
+                                                       flag_pvid, trans,
+                                                       extack);
                if (err)
                        return err;
        }
-- 
2.4.11

Reply via email to