target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl930x.c
static u64 rtl930x_get_l3_egress_mac(u32 idx)
{
	u64 mac;
	// Read L3_EGR_INTF_MAC table (2) via register RTL9300_TBL_2
	struct table_reg *r = rtl_table_get(RTL9300_TBL_2, 2);

	rtl_table_read(r, idx);
	// The table has a size of 2 registers
	mac = sw_r32(rtl_table_data(r, 0));
	mac <<= 32;
	mac |= sw_r32(rtl_table_data(r, 1));
	rtl_table_release(r);

	return mac;
}
/*
 * Get the Destination-MAC of an L3 egress interface or the Source MAC for routed packets
 * from the SoC's L3_EGR_INTF_MAC table
 * Indexes 0-2047 are DMACs, 2048+ are SMACs
 */
Get the Destination-MAC of an L3 egress interface or the Source MAC for routed packets
from the SoC's L3_EGR_INTF_MAC table
Indexes 0-2047 are DMACs, 2048+ are SMACs
Get the Destination - MAC of an L3 egress interface or the Source MAC for routed packets from the SoC ' s L3_EGR_INTF_MAC table Indexes 0 - 2047 are DMACs 2048 + are SMACs
static u64 rtl930x_get_l3_egress_mac(u32 idx)
{
	u64 mac;
	struct table_reg *r = rtl_table_get(RTL9300_TBL_2, 2);
	rtl_table_read(r, idx);
	mac = sw_r32(rtl_table_data(r, 0));
	mac <<= 32;
	mac |= sw_r32(rtl_table_data(r, 1));
	rtl_table_release(r);
	return mac;
}
static u64 rtl930x_get_l3_egress_mac ( u32 idx ) { u64 mac ; struct table_reg * r = rtl_table_get ( RTL9300_TBL_2 , 2 ) ; rtl_table_read ( r , idx ) ; mac = sw_r32 ( rtl_table_data ( r , 0 ) ) ; mac <<= 32 ; mac |= sw_r32 ( rtl_table_data ( r , 1 ) ) ; rtl_table_release ( r ) ; return mac ; }
Get the Destination-MAC of an L3 egress interface or the Source MAC for routed packets
 from the SoC's L3_EGR_INTF_MAC table
 Indexes 0-2047 are DMACs, 2048+ are SMACs
Get the Destination - MAC of an L3 egress interface or the Source MAC for routed packets from the SoC ' s L3_EGR_INTF_MAC table Indexes 0 - 2047 are DMACs 2048 + are SMACs
// Read L3_EGR_INTF_MAC table (2) via register RTL9300_TBL_2 // The table has a size of 2 registers