/* Here is possible to use control or test dmac because the mask * doesn't cover the LSB
*/
ether_addr_copy(filter->key.etype.dmac.value, mrp_test_dmac);
ether_addr_copy(filter->key.etype.dmac.mask, mrp_mask);
}
priv = container_of(ocelot_port, struct ocelot_port_private, port);
dev = priv->dev;
if (mrp->p_port != dev && mrp->s_port != dev) return 0;
ocelot_port->mrp_ring_id = mrp->ring_id;
return 0;
}
EXPORT_SYMBOL(ocelot_mrp_add);
int ocelot_mrp_del(struct ocelot *ocelot, int port, conststruct switchdev_obj_mrp *mrp)
{ struct ocelot_port *ocelot_port = ocelot->ports[port];
if (!ocelot_port) return -EOPNOTSUPP;
if (ocelot_port->mrp_ring_id != mrp->ring_id) return 0;
ocelot_port->mrp_ring_id = 0;
return 0;
}
EXPORT_SYMBOL(ocelot_mrp_del);
int ocelot_mrp_add_ring_role(struct ocelot *ocelot, int port, conststruct switchdev_obj_ring_role_mrp *mrp)
{ struct ocelot_port *ocelot_port = ocelot->ports[port]; int dst_port; int err;
if (!ocelot_port) return -EOPNOTSUPP;
if (mrp->ring_role != BR_MRP_RING_ROLE_MRC && !mrp->sw_backup) return -EOPNOTSUPP;
if (ocelot_port->mrp_ring_id != mrp->ring_id) return 0;
ocelot_mrp_save_mac(ocelot, ocelot_port);
if (mrp->ring_role != BR_MRP_RING_ROLE_MRC) return ocelot_mrp_trap_add(ocelot, port);
dst_port = ocelot_mrp_find_partner_port(ocelot, ocelot_port); if (dst_port == -1) return -EINVAL;
err = ocelot_mrp_redirect_add_vcap(ocelot, port, dst_port); if (err) return err;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.