net: dsa: remove cross-chip support for MRP

The cross-chip notifiers for MRP are bypass operations, meaning that
even though all switches in a tree are notified, only the switch
specified in the info structure is targeted.

We can eliminate the unnecessary complexity by deleting the cross-chip
notifier logic and calling the ds->ops straight from port.c.

Cc: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Vladimir Oltean
2022-01-05 15:18:12 +02:00
committed by David S. Miller
parent ff91e1b684
commit cad69019f2
3 changed files with 20 additions and 106 deletions

View File

@@ -907,49 +907,45 @@ int dsa_port_vlan_del(struct dsa_port *dp,
int dsa_port_mrp_add(const struct dsa_port *dp,
const struct switchdev_obj_mrp *mrp)
{
struct dsa_notifier_mrp_info info = {
.sw_index = dp->ds->index,
.port = dp->index,
.mrp = mrp,
};
struct dsa_switch *ds = dp->ds;
return dsa_port_notify(dp, DSA_NOTIFIER_MRP_ADD, &info);
if (!ds->ops->port_mrp_add)
return -EOPNOTSUPP;
return ds->ops->port_mrp_add(ds, dp->index, mrp);
}
int dsa_port_mrp_del(const struct dsa_port *dp,
const struct switchdev_obj_mrp *mrp)
{
struct dsa_notifier_mrp_info info = {
.sw_index = dp->ds->index,
.port = dp->index,
.mrp = mrp,
};
struct dsa_switch *ds = dp->ds;
return dsa_port_notify(dp, DSA_NOTIFIER_MRP_DEL, &info);
if (!ds->ops->port_mrp_del)
return -EOPNOTSUPP;
return ds->ops->port_mrp_del(ds, dp->index, mrp);
}
int dsa_port_mrp_add_ring_role(const struct dsa_port *dp,
const struct switchdev_obj_ring_role_mrp *mrp)
{
struct dsa_notifier_mrp_ring_role_info info = {
.sw_index = dp->ds->index,
.port = dp->index,
.mrp = mrp,
};
struct dsa_switch *ds = dp->ds;
return dsa_port_notify(dp, DSA_NOTIFIER_MRP_ADD_RING_ROLE, &info);
if (!ds->ops->port_mrp_add_ring_role)
return -EOPNOTSUPP;
return ds->ops->port_mrp_add_ring_role(ds, dp->index, mrp);
}
int dsa_port_mrp_del_ring_role(const struct dsa_port *dp,
const struct switchdev_obj_ring_role_mrp *mrp)
{
struct dsa_notifier_mrp_ring_role_info info = {
.sw_index = dp->ds->index,
.port = dp->index,
.mrp = mrp,
};
struct dsa_switch *ds = dp->ds;
return dsa_port_notify(dp, DSA_NOTIFIER_MRP_DEL_RING_ROLE, &info);
if (!ds->ops->port_mrp_del_ring_role)
return -EOPNOTSUPP;
return ds->ops->port_mrp_del_ring_role(ds, dp->index, mrp);
}
void dsa_port_set_tag_protocol(struct dsa_port *cpu_dp,