target/linux/realtek/files-5.10/drivers/net/dsa/rtl83xx/rtl930x.c
static void rtl930x_get_l3_nexthop(int idx, u16 *dmac_id, u16 *interface)
{
	u32 v;
	// Read L3_NEXTHOP table (3) via register RTL9300_TBL_1
	struct table_reg *r = rtl_table_get(RTL9300_TBL_1, 3);

	rtl_table_read(r, idx);
	// The table has a size of 1 register
	v = sw_r32(rtl_table_data(r, 0));
	rtl_table_release(r);

	*dmac_id = (v >> 7) & 0x7fff;
	*interface = v & 0x7f;
}
/*
 * Get the destination MAC and L3 egress interface ID of a nexthop entry from
 * the SoC's L3_NEXTHOP table
 */
Get the destination MAC and L3 egress interface ID of a nexthop entry from
the SoC's L3_NEXTHOP table
Get the destination MAC and L3 egress interface ID of a nexthop entry from the SoC ' s L3_NEXTHOP table
static void rtl930x_get_l3_nexthop(int idx, u16 *dmac_id, u16 *interface)
{
	u32 v;
	struct table_reg *r = rtl_table_get(RTL9300_TBL_1, 3);
	rtl_table_read(r, idx);
	v = sw_r32(rtl_table_data(r, 0));
	rtl_table_release(r);
	*dmac_id = (v >> 7) & 0x7fff;
	*interface = v & 0x7f;
}
static void rtl930x_get_l3_nexthop ( int idx , u16 * dmac_id , u16 * interface ) { u32 v ; struct table_reg * r = rtl_table_get ( RTL9300_TBL_1 , 3 ) ; rtl_table_read ( r , idx ) ; v = sw_r32 ( rtl_table_data ( r , 0 ) ) ; rtl_table_release ( r ) ; * dmac_id = ( v >> 7 ) & 0x7fff ; * interface = v & 0x7f ; }
Get the destination MAC and L3 egress interface ID of a nexthop entry from
 the SoC's L3_NEXTHOP table
Get the destination MAC and L3 egress interface ID of a nexthop entry from the SoC ' s L3_NEXTHOP table
// Read L3_NEXTHOP table (3) via register RTL9300_TBL_1 // The table has a size of 1 register