Lines Matching refs:l2_lookup

346 	struct sja1105_l2_lookup_entry *l2_lookup;  in sja1105_init_static_fdb()  local
370 l2_lookup = table->entries; in sja1105_init_static_fdb()
373 l2_lookup[0].macaddr = SJA1105_UNKNOWN_MULTICAST; in sja1105_init_static_fdb()
374 l2_lookup[0].mask_macaddr = SJA1105_UNKNOWN_MULTICAST; in sja1105_init_static_fdb()
375 l2_lookup[0].lockeds = true; in sja1105_init_static_fdb()
376 l2_lookup[0].index = SJA1105_MAX_L2_LOOKUP_COUNT - 1; in sja1105_init_static_fdb()
381 l2_lookup[0].destports |= BIT(port); in sja1105_init_static_fdb()
1445 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_find_static_fdb_entry() local
1450 l2_lookup = table->entries; in sja1105_find_static_fdb_entry()
1453 if (l2_lookup[i].macaddr == requested->macaddr && in sja1105_find_static_fdb_entry()
1454 l2_lookup[i].vlanid == requested->vlanid && in sja1105_find_static_fdb_entry()
1455 l2_lookup[i].destports & BIT(port)) in sja1105_find_static_fdb_entry()
1471 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_static_fdb_change() local
1492 l2_lookup = table->entries; in sja1105_static_fdb_change()
1501 l2_lookup[match] = *requested; in sja1105_static_fdb_change()
1508 l2_lookup[match] = l2_lookup[table->entry_count - 1]; in sja1105_static_fdb_change()
1531 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105et_is_fdb_entry_in_bin() local
1538 index, &l2_lookup)) { in sja1105et_is_fdb_entry_in_bin()
1544 if (l2_lookup.macaddr == ether_addr_to_u64(addr) && in sja1105et_is_fdb_entry_in_bin()
1545 l2_lookup.vlanid == vid) { in sja1105et_is_fdb_entry_in_bin()
1547 *match = l2_lookup; in sja1105et_is_fdb_entry_in_bin()
1558 struct sja1105_l2_lookup_entry l2_lookup = {0}, tmp; in sja1105et_fdb_add() local
1568 &l2_lookup, &last_unused); in sja1105et_fdb_add()
1574 if ((l2_lookup.destports & BIT(port)) && l2_lookup.lockeds) in sja1105et_fdb_add()
1576 l2_lookup.destports |= BIT(port); in sja1105et_fdb_add()
1583 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105et_fdb_add()
1584 l2_lookup.destports = BIT(port); in sja1105et_fdb_add()
1585 l2_lookup.vlanid = vid; in sja1105et_fdb_add()
1605 l2_lookup.lockeds = true; in sja1105et_fdb_add()
1606 l2_lookup.index = sja1105et_fdb_index(bin, way); in sja1105et_fdb_add()
1609 l2_lookup.index, &l2_lookup, in sja1105et_fdb_add()
1637 return sja1105_static_fdb_change(priv, port, &l2_lookup, true); in sja1105et_fdb_add()
1643 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105et_fdb_del() local
1650 &l2_lookup, NULL); in sja1105et_fdb_del()
1660 l2_lookup.destports &= ~BIT(port); in sja1105et_fdb_del()
1662 if (l2_lookup.destports) in sja1105et_fdb_del()
1668 index, &l2_lookup, keep); in sja1105et_fdb_del()
1672 return sja1105_static_fdb_change(priv, port, &l2_lookup, keep); in sja1105et_fdb_del()
1678 struct sja1105_l2_lookup_entry l2_lookup = {0}, tmp; in sja1105pqrs_fdb_add() local
1683 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105pqrs_fdb_add()
1684 l2_lookup.vlanid = vid; in sja1105pqrs_fdb_add()
1685 l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0); in sja1105pqrs_fdb_add()
1686 l2_lookup.mask_vlanid = VLAN_VID_MASK; in sja1105pqrs_fdb_add()
1687 l2_lookup.destports = BIT(port); in sja1105pqrs_fdb_add()
1689 tmp = l2_lookup; in sja1105pqrs_fdb_add()
1700 l2_lookup = tmp; in sja1105pqrs_fdb_add()
1705 l2_lookup.destports |= BIT(port); in sja1105pqrs_fdb_add()
1723 l2_lookup.index = i; in sja1105pqrs_fdb_add()
1726 l2_lookup.lockeds = true; in sja1105pqrs_fdb_add()
1729 l2_lookup.index, &l2_lookup, in sja1105pqrs_fdb_add()
1745 tmp = l2_lookup; in sja1105pqrs_fdb_add()
1756 if (tmp.index < l2_lookup.index) { in sja1105pqrs_fdb_add()
1763 return sja1105_static_fdb_change(priv, port, &l2_lookup, true); in sja1105pqrs_fdb_add()
1769 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105pqrs_fdb_del() local
1774 l2_lookup.macaddr = ether_addr_to_u64(addr); in sja1105pqrs_fdb_del()
1775 l2_lookup.vlanid = vid; in sja1105pqrs_fdb_del()
1776 l2_lookup.mask_macaddr = GENMASK_ULL(ETH_ALEN * 8 - 1, 0); in sja1105pqrs_fdb_del()
1777 l2_lookup.mask_vlanid = VLAN_VID_MASK; in sja1105pqrs_fdb_del()
1778 l2_lookup.destports = BIT(port); in sja1105pqrs_fdb_del()
1781 SJA1105_SEARCH, &l2_lookup); in sja1105pqrs_fdb_del()
1785 l2_lookup.destports &= ~BIT(port); in sja1105pqrs_fdb_del()
1790 if (l2_lookup.destports) in sja1105pqrs_fdb_del()
1796 l2_lookup.index, &l2_lookup, keep); in sja1105pqrs_fdb_del()
1800 return sja1105_static_fdb_change(priv, port, &l2_lookup, keep); in sja1105pqrs_fdb_del()
1874 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105_fdb_dump() local
1879 i, &l2_lookup); in sja1105_fdb_dump()
1894 if (!(l2_lookup.destports & BIT(port))) in sja1105_fdb_dump()
1897 u64_to_ether_addr(l2_lookup.macaddr, macaddr); in sja1105_fdb_dump()
1906 if (vid_is_dsa_8021q(l2_lookup.vlanid)) in sja1105_fdb_dump()
1907 l2_lookup.vlanid = 0; in sja1105_fdb_dump()
1908 rc = cb(macaddr, l2_lookup.vlanid, l2_lookup.lockeds, data); in sja1105_fdb_dump()
1931 struct sja1105_l2_lookup_entry l2_lookup = {0}; in sja1105_fast_age() local
1936 i, &l2_lookup); in sja1105_fast_age()
1946 if (!(l2_lookup.destports & BIT(port))) in sja1105_fast_age()
1950 if (l2_lookup.lockeds) in sja1105_fast_age()
1953 u64_to_ether_addr(l2_lookup.macaddr, macaddr); in sja1105_fast_age()
1955 rc = __sja1105_fdb_del(ds, port, macaddr, l2_lookup.vlanid, db); in sja1105_fast_age()
1959 macaddr, l2_lookup.vlanid, ERR_PTR(rc)); in sja1105_fast_age()
2986 struct sja1105_l2_lookup_entry *l2_lookup; in sja1105_port_mcast_flood() local
2993 l2_lookup = table->entries; in sja1105_port_mcast_flood()
2996 if (l2_lookup[match].macaddr == SJA1105_UNKNOWN_MULTICAST && in sja1105_port_mcast_flood()
2997 l2_lookup[match].mask_macaddr == SJA1105_UNKNOWN_MULTICAST) in sja1105_port_mcast_flood()
3008 l2_lookup[match].destports |= BIT(to); in sja1105_port_mcast_flood()
3010 l2_lookup[match].destports &= ~BIT(to); in sja1105_port_mcast_flood()
3013 l2_lookup[match].index, in sja1105_port_mcast_flood()
3014 &l2_lookup[match], true); in sja1105_port_mcast_flood()