Commit 4c08c586 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by David S. Miller
Browse files

net: switchdev: propagate extack to port attributes



When a struct switchdev_attr is notified through switchdev, there is no
way to report informational messages, unlike for struct switchdev_obj.

Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarIdo Schimmel <idosch@nvidia.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarNikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b0aae0bd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -695,7 +695,8 @@ static int prestera_port_attr_stp_state_set(struct prestera_port *port,
}

static int prestera_port_obj_attr_set(struct net_device *dev,
				      const struct switchdev_attr *attr)
				      const struct switchdev_attr *attr,
				      struct netlink_ext_ack *extack)
{
	struct prestera_port *port = netdev_priv(dev);
	int err = 0;
+2 −1
Original line number Diff line number Diff line
@@ -887,7 +887,8 @@ mlxsw_sp_port_attr_br_mrouter_set(struct mlxsw_sp_port *mlxsw_sp_port,
}

static int mlxsw_sp_port_attr_set(struct net_device *dev,
				  const struct switchdev_attr *attr)
				  const struct switchdev_attr *attr,
				  struct netlink_ext_ack *extack)
{
	struct mlxsw_sp_port *mlxsw_sp_port = netdev_priv(dev);
	int err;
+2 −1
Original line number Diff line number Diff line
@@ -1005,7 +1005,8 @@ static void ocelot_port_attr_mc_set(struct ocelot *ocelot, int port, bool mc)
}

static int ocelot_port_attr_set(struct net_device *dev,
				const struct switchdev_attr *attr)
				const struct switchdev_attr *attr,
				struct netlink_ext_ack *extack)
{
	struct ocelot_port_private *priv = netdev_priv(dev);
	struct ocelot *ocelot = priv->port.ocelot;
+2 −1
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ static int am65_cpsw_port_attr_br_flags_pre_set(struct net_device *netdev,
}

static int am65_cpsw_port_attr_set(struct net_device *ndev,
				   const struct switchdev_attr *attr)
				   const struct switchdev_attr *attr,
				   struct netlink_ext_ack *extack)
{
	struct am65_cpsw_port *port = am65_ndev_to_port(ndev);
	int ret;
+2 −1
Original line number Diff line number Diff line
@@ -83,7 +83,8 @@ static int cpsw_port_attr_br_flags_pre_set(struct net_device *netdev,
}

static int cpsw_port_attr_set(struct net_device *ndev,
			      const struct switchdev_attr *attr)
			      const struct switchdev_attr *attr,
			      struct netlink_ext_ack *extack)
{
	struct cpsw_priv *priv = netdev_priv(ndev);
	int ret;
Loading