diff --git a/target/linux/realtek/files-6.18/drivers/soc/realtek/otto_table.c b/target/linux/realtek/files-6.18/drivers/soc/realtek/otto_table.c index 55918b32e3c..44aebdfcd0e 100644 --- a/target/linux/realtek/files-6.18/drivers/soc/realtek/otto_table.c +++ b/target/linux/realtek/files-6.18/drivers/soc/realtek/otto_table.c @@ -257,6 +257,18 @@ static const struct otto_table_map otto_table_maps[OTTO_TBL_COUNT] = { TBL_MAP(RTL9310_TBL_LAG, OTTO_REG_9310_2, 0, 3, 128, 0), TBL_MAP(RTL9310_TBL_PORT_ISO_CTRL, OTTO_REG_9310_2, 1, 2, 1024, 0), + /* The L3 tables share this access register with the two above. Their + * row counts are address spaces: the host and prefix route tables + * overlay the flow table, whose RTL9310_TBL_FT_L3_* views carry the + * same type and width (Realtek GPL SDK, rtk_mango_table_list). + */ + TBL_MAP(RTL9310_TBL_L3_ROUTER_MAC, OTTO_REG_9310_2, 2, 5, 1024, 0), + TBL_MAP(RTL9310_TBL_L3_HOST_ROUTE_IPUC, OTTO_REG_9310_2, 3, 4, 12288, 0), + TBL_MAP(RTL9310_TBL_L3_PREFIX_ROUTE_IPUC, OTTO_REG_9310_2, 4, 6, 12288, 0), + TBL_MAP(RTL9310_TBL_L3_NEXTHOP, OTTO_REG_9310_2, 6, 1, 8192, 0), + TBL_MAP(RTL9310_TBL_L3_IGR_INTF, OTTO_REG_9310_2, 7, 2, 1024, 0), + TBL_MAP(RTL9310_TBL_L3_EGR_INTF, OTTO_REG_9310_2, 8, 4, 1024, 0), + TBL_MAP(RTL9310_TBL_VLAN_UNTAG, OTTO_REG_9310_3, 0, 2, 4096, 0), TBL_MAP(RTL9310_TBL_STAT_PORT_MIB_CNTR, OTTO_REG_9310_5, 0, 53, 57, 0), diff --git a/target/linux/realtek/files-6.18/include/linux/soc/realtek/otto_table.h b/target/linux/realtek/files-6.18/include/linux/soc/realtek/otto_table.h index 5681fbe833f..09f1e4d5de6 100644 --- a/target/linux/realtek/files-6.18/include/linux/soc/realtek/otto_table.h +++ b/target/linux/realtek/files-6.18/include/linux/soc/realtek/otto_table.h @@ -145,6 +145,13 @@ enum otto_table_id { RTL9310_TBL_LAG, RTL9310_TBL_PORT_ISO_CTRL, + RTL9310_TBL_L3_ROUTER_MAC, + RTL9310_TBL_L3_HOST_ROUTE_IPUC, + RTL9310_TBL_L3_PREFIX_ROUTE_IPUC, + RTL9310_TBL_L3_NEXTHOP, + RTL9310_TBL_L3_IGR_INTF, + RTL9310_TBL_L3_EGR_INTF, + RTL9310_TBL_VLAN_UNTAG, RTL9310_TBL_STAT_PORT_MIB_CNTR,