/* Number of IRQs supported */ #define DPSW_IRQ_NUM 2
/* Port is member of VLAN */ #define ETHSW_VLAN_MEMBER 1 /* VLAN to be treated as untagged on egress */ #define ETHSW_VLAN_UNTAGGED 2 /* Untagged frames will be assigned to this VLAN */ #define ETHSW_VLAN_PVID 4 /* VLAN configured on the switch */ #define ETHSW_VLAN_GLOBAL 8
/* Number of times to retry DPIO portal operations while waiting * for portal to finish executing current command and become * available. We want to avoid being stuck in a while loop in case * hardware becomes unresponsive, but not give up too easily if * the portal really is busy for valid reasons
*/ #define DPAA2_SWITCH_SWP_BUSY_RETRIES 1000
staticinlineint dpaa2_switch_get_index(struct ethsw_core *ethsw, struct net_device *netdev)
{ int i;
for (i = 0; i < ethsw->sw_attr.num_ifs; i++) if (ethsw->ports[i]->netdev == netdev) return ethsw->ports[i]->idx;
return -EINVAL;
}
staticinlinebool dpaa2_switch_supports_cpu_traffic(struct ethsw_core *ethsw)
{ if (ethsw->sw_attr.options & DPSW_OPT_CTRL_IF_DIS) {
dev_err(ethsw->dev, "Control Interface is disabled, cannot probe\n"); returnfalse;
}
if (ethsw->sw_attr.flooding_cfg != DPSW_FLOODING_PER_FDB) {
dev_err(ethsw->dev, "Flooding domain is not per FDB, cannot probe\n"); returnfalse;
}
if (ethsw->sw_attr.broadcast_cfg != DPSW_BROADCAST_PER_FDB) {
dev_err(ethsw->dev, "Broadcast domain is not per FDB, cannot probe\n"); returnfalse;
}
if (ethsw->sw_attr.max_fdbs < ethsw->sw_attr.num_ifs) {
dev_err(ethsw->dev, "The number of FDBs is lower than the number of ports, cannot probe\n"); returnfalse;
}
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.