Lines Matching refs:l2_lookup
330 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_init_static_fdb() local
354 l2_lookup = table->entries; in sja1105_init_static_fdb()
357 l2_lookup[0].macaddr = SJA1105_UNKNOWN_MULTICAST; in sja1105_init_static_fdb()
358 l2_lookup[0].mask_macaddr = SJA1105_UNKNOWN_MULTICAST; in sja1105_init_static_fdb()
359 l2_lookup[0].lockeds = true; in sja1105_init_static_fdb()
360 l2_lookup[0].index = SJA1105_MAX_L2_LOOKUP_COUNT - 1; in sja1105_init_static_fdb()
365 l2_lookup[0].destports |= BIT(port); in sja1105_init_static_fdb()
1392 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_find_static_fdb_entry() local
1397 l2_lookup = table->entries; in sja1105_find_static_fdb_entry()
1400 if (l2_lookup[i].macaddr == requested->macaddr && in sja1105_find_static_fdb_entry()
1401 l2_lookup[i].vlanid == requested->vlanid && in sja1105_find_static_fdb_entry()
1402 l2_lookup[i].destports & BIT(port)) in sja1105_find_static_fdb_entry()
1418 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_static_fdb_change() local
1439 l2_lookup = table->entries; in sja1105_static_fdb_change()
1448 l2_lookup[match] = *requested; in sja1105_static_fdb_change()
1455 l2_lookup[match] = l2_lookup[table->entry_count - 1]; in sja1105_static_fdb_change()
1478 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105et_is_fdb_entry_in_bin() local
1485 index, &l2_lookup)) { in sja1105et_is_fdb_entry_in_bin()
1491 if (l2_lookup.macaddr == ether_addr_to_u64(addr) && in sja1105et_is_fdb_entry_in_bin()
1492 l2_lookup.vlanid == vid) { in sja1105et_is_fdb_entry_in_bin()
1494 *match = l2_lookup; in sja1105et_is_fdb_entry_in_bin()
1505 struct sja1105_l2_lookup_entry l2_lookup = {0}, tmp; in sja1105et_fdb_add() local
1515 &l2_lookup, &last_unused); in sja1105et_fdb_add()
1521 if ((l2_lookup.destports & BIT(port)) && l2_lookup.lockeds) in sja1105et_fdb_add()
1523 l2_lookup.destports |= BIT(port); in sja1105et_fdb_add()
1530 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105et_fdb_add()
1531 l2_lookup.destports = BIT(port); in sja1105et_fdb_add()
1532 l2_lookup.vlanid = vid; in sja1105et_fdb_add()
1552 l2_lookup.lockeds = true; in sja1105et_fdb_add()
1553 l2_lookup.index = sja1105et_fdb_index(bin, way); in sja1105et_fdb_add()
1556 l2_lookup.index, &l2_lookup, in sja1105et_fdb_add()
1584 return sja1105_static_fdb_change(priv, port, &l2_lookup, true); in sja1105et_fdb_add()
1590 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105et_fdb_del() local
1597 &l2_lookup, NULL); in sja1105et_fdb_del()
1607 l2_lookup.destports &= ~BIT(port); in sja1105et_fdb_del()
1609 if (l2_lookup.destports) in sja1105et_fdb_del()
1615 index, &l2_lookup, keep); in sja1105et_fdb_del()
1619 return sja1105_static_fdb_change(priv, port, &l2_lookup, keep); in sja1105et_fdb_del()
1625 struct sja1105_l2_lookup_entry l2_lookup = {0}, tmp; in sja1105pqrs_fdb_add() local
1630 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105pqrs_fdb_add()
1631 l2_lookup.vlanid = vid; in sja1105pqrs_fdb_add()
1632 l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0); in sja1105pqrs_fdb_add()
1633 l2_lookup.mask_vlanid = VLAN_VID_MASK; in sja1105pqrs_fdb_add()
1634 l2_lookup.destports = BIT(port); in sja1105pqrs_fdb_add()
1636 tmp = l2_lookup; in sja1105pqrs_fdb_add()
1647 l2_lookup = tmp; in sja1105pqrs_fdb_add()
1652 l2_lookup.destports |= BIT(port); in sja1105pqrs_fdb_add()
1670 l2_lookup.index = i; in sja1105pqrs_fdb_add()
1673 l2_lookup.lockeds = true; in sja1105pqrs_fdb_add()
1676 l2_lookup.index, &l2_lookup, in sja1105pqrs_fdb_add()
1692 tmp = l2_lookup; in sja1105pqrs_fdb_add()
1703 if (tmp.index < l2_lookup.index) { in sja1105pqrs_fdb_add()
1710 return sja1105_static_fdb_change(priv, port, &l2_lookup, true); in sja1105pqrs_fdb_add()
1716 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105pqrs_fdb_del() local
1721 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105pqrs_fdb_del()
1722 l2_lookup.vlanid = vid; in sja1105pqrs_fdb_del()
1723 l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0); in sja1105pqrs_fdb_del()
1724 l2_lookup.mask_vlanid = VLAN_VID_MASK; in sja1105pqrs_fdb_del()
1725 l2_lookup.destports = BIT(port); in sja1105pqrs_fdb_del()
1728 SJA1105_SEARCH, &l2_lookup); in sja1105pqrs_fdb_del()
1732 l2_lookup.destports &= ~BIT(port); in sja1105pqrs_fdb_del()
1737 if (l2_lookup.destports) in sja1105pqrs_fdb_del()
1743 l2_lookup.index, &l2_lookup, keep); in sja1105pqrs_fdb_del()
1747 return sja1105_static_fdb_change(priv, port, &l2_lookup, keep); in sja1105pqrs_fdb_del()
1774 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105_fdb_dump() local
1779 i, &l2_lookup); in sja1105_fdb_dump()
1794 if (!(l2_lookup.destports & BIT(port))) in sja1105_fdb_dump()
1798 if (l2_lookup.macaddr == SJA1105_UNKNOWN_MULTICAST && in sja1105_fdb_dump()
1799 l2_lookup.mask_macaddr == SJA1105_UNKNOWN_MULTICAST) in sja1105_fdb_dump()
1802 u64_to_ether_addr(l2_lookup.macaddr, macaddr); in sja1105_fdb_dump()
1806 l2_lookup.vlanid = 0; in sja1105_fdb_dump()
1807 rc = cb(macaddr, l2_lookup.vlanid, l2_lookup.lockeds, data); in sja1105_fdb_dump()
1820 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105_fast_age() local
1825 i, &l2_lookup); in sja1105_fast_age()
1835 if (!(l2_lookup.destports & BIT(port))) in sja1105_fast_age()
1839 if (l2_lookup.lockeds) in sja1105_fast_age()
1842 u64_to_ether_addr(l2_lookup.macaddr, macaddr); in sja1105_fast_age()
1844 rc = sja1105_fdb_del(ds, port, macaddr, l2_lookup.vlanid); in sja1105_fast_age()
1848 macaddr, l2_lookup.vlanid, ERR_PTR(rc)); in sja1105_fast_age()
2849 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_port_mcast_flood() local
2854 l2_lookup = table->entries; in sja1105_port_mcast_flood()
2857 if (l2_lookup[match].macaddr == SJA1105_UNKNOWN_MULTICAST && in sja1105_port_mcast_flood()
2858 l2_lookup[match].mask_macaddr == SJA1105_UNKNOWN_MULTICAST) in sja1105_port_mcast_flood()
2868 l2_lookup[match].destports |= BIT(to); in sja1105_port_mcast_flood()
2870 l2_lookup[match].destports &= ~BIT(to); in sja1105_port_mcast_flood()
2873 l2_lookup[match].index, in sja1105_port_mcast_flood()
2874 &l2_lookup[match], in sja1105_port_mcast_flood()