net: dsa: pass extack to dsa_port_{bridge,lag}_join
This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
185c9a760a
commit
2afc526ab3
@ -181,12 +181,14 @@ int dsa_port_enable_rt(struct dsa_port *dp, struct phy_device *phy);
|
|||||||
int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy);
|
int dsa_port_enable(struct dsa_port *dp, struct phy_device *phy);
|
||||||
void dsa_port_disable_rt(struct dsa_port *dp);
|
void dsa_port_disable_rt(struct dsa_port *dp);
|
||||||
void dsa_port_disable(struct dsa_port *dp);
|
void dsa_port_disable(struct dsa_port *dp);
|
||||||
int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br);
|
int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br,
|
||||||
|
struct netlink_ext_ack *extack);
|
||||||
void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br);
|
void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br);
|
||||||
int dsa_port_lag_change(struct dsa_port *dp,
|
int dsa_port_lag_change(struct dsa_port *dp,
|
||||||
struct netdev_lag_lower_state_info *linfo);
|
struct netdev_lag_lower_state_info *linfo);
|
||||||
int dsa_port_lag_join(struct dsa_port *dp, struct net_device *lag_dev,
|
int dsa_port_lag_join(struct dsa_port *dp, struct net_device *lag_dev,
|
||||||
struct netdev_lag_upper_info *uinfo);
|
struct netdev_lag_upper_info *uinfo,
|
||||||
|
struct netlink_ext_ack *extack);
|
||||||
void dsa_port_lag_leave(struct dsa_port *dp, struct net_device *lag_dev);
|
void dsa_port_lag_leave(struct dsa_port *dp, struct net_device *lag_dev);
|
||||||
int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
|
int dsa_port_vlan_filtering(struct dsa_port *dp, bool vlan_filtering,
|
||||||
struct netlink_ext_ack *extack);
|
struct netlink_ext_ack *extack);
|
||||||
|
@ -144,7 +144,8 @@ static void dsa_port_change_brport_flags(struct dsa_port *dp,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br)
|
int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br,
|
||||||
|
struct netlink_ext_ack *extack)
|
||||||
{
|
{
|
||||||
struct dsa_notifier_bridge_info info = {
|
struct dsa_notifier_bridge_info info = {
|
||||||
.tree_index = dp->ds->dst->index,
|
.tree_index = dp->ds->dst->index,
|
||||||
@ -241,7 +242,8 @@ int dsa_port_lag_change(struct dsa_port *dp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int dsa_port_lag_join(struct dsa_port *dp, struct net_device *lag,
|
int dsa_port_lag_join(struct dsa_port *dp, struct net_device *lag,
|
||||||
struct netdev_lag_upper_info *uinfo)
|
struct netdev_lag_upper_info *uinfo,
|
||||||
|
struct netlink_ext_ack *extack)
|
||||||
{
|
{
|
||||||
struct dsa_notifier_lag_info info = {
|
struct dsa_notifier_lag_info info = {
|
||||||
.sw_index = dp->ds->index,
|
.sw_index = dp->ds->index,
|
||||||
@ -263,7 +265,7 @@ int dsa_port_lag_join(struct dsa_port *dp, struct net_device *lag,
|
|||||||
if (!bridge_dev || !netif_is_bridge_master(bridge_dev))
|
if (!bridge_dev || !netif_is_bridge_master(bridge_dev))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err = dsa_port_bridge_join(dp, bridge_dev);
|
err = dsa_port_bridge_join(dp, bridge_dev, extack);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_bridge_join;
|
goto err_bridge_join;
|
||||||
|
|
||||||
|
@ -1976,11 +1976,14 @@ static int dsa_slave_changeupper(struct net_device *dev,
|
|||||||
struct netdev_notifier_changeupper_info *info)
|
struct netdev_notifier_changeupper_info *info)
|
||||||
{
|
{
|
||||||
struct dsa_port *dp = dsa_slave_to_port(dev);
|
struct dsa_port *dp = dsa_slave_to_port(dev);
|
||||||
|
struct netlink_ext_ack *extack;
|
||||||
int err = NOTIFY_DONE;
|
int err = NOTIFY_DONE;
|
||||||
|
|
||||||
|
extack = netdev_notifier_info_to_extack(&info->info);
|
||||||
|
|
||||||
if (netif_is_bridge_master(info->upper_dev)) {
|
if (netif_is_bridge_master(info->upper_dev)) {
|
||||||
if (info->linking) {
|
if (info->linking) {
|
||||||
err = dsa_port_bridge_join(dp, info->upper_dev);
|
err = dsa_port_bridge_join(dp, info->upper_dev, extack);
|
||||||
if (!err)
|
if (!err)
|
||||||
dsa_bridge_mtu_normalization(dp);
|
dsa_bridge_mtu_normalization(dp);
|
||||||
err = notifier_from_errno(err);
|
err = notifier_from_errno(err);
|
||||||
@ -1991,7 +1994,7 @@ static int dsa_slave_changeupper(struct net_device *dev,
|
|||||||
} else if (netif_is_lag_master(info->upper_dev)) {
|
} else if (netif_is_lag_master(info->upper_dev)) {
|
||||||
if (info->linking) {
|
if (info->linking) {
|
||||||
err = dsa_port_lag_join(dp, info->upper_dev,
|
err = dsa_port_lag_join(dp, info->upper_dev,
|
||||||
info->upper_info);
|
info->upper_info, extack);
|
||||||
if (err == -EOPNOTSUPP) {
|
if (err == -EOPNOTSUPP) {
|
||||||
NL_SET_ERR_MSG_MOD(info->info.extack,
|
NL_SET_ERR_MSG_MOD(info->info.extack,
|
||||||
"Offloading not supported");
|
"Offloading not supported");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user