-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The softnpu table mapping mechanism uses manually collected table names here:
dendrite/asic/src/softnpu/table.rs
Lines 44 to 62 in 823a717
| const SWITCH_ADDR4: &str = "pipe.Ingress.filter.switch_ipv4_addr"; | |
| const SWITCH_ADDR6: &str = "pipe.Ingress.filter.switch_ipv6_addr"; | |
| const ROUTER4_LOOKUP_RT: &str = | |
| "pipe.Ingress.l3_router.Router4.lookup_idx.route"; | |
| const ROUTER4_LOOKUP_IDX: &str = | |
| "pipe.Ingress.l3_router.Router4.lookup_idx.lookup"; | |
| const ROUTER6_LOOKUP_RT: &str = | |
| "pipe.Ingress.l3_router.Router6.lookup_idx.route"; | |
| const ROUTER6_LOOKUP_IDX: &str = | |
| "pipe.Ingress.l3_router.Router6.lookup_idx.lookup"; | |
| const NDP: &str = "pipe.Ingress.l3_router.Router6.Ndp.tbl"; | |
| const ARP: &str = "pipe.Ingress.l3_router.Router4.Arp.tbl"; | |
| const DPD_MAC_REWRITE: &str = "pipe.Ingress.mac_rewrite.mac_rewrite"; | |
| const NAT_INGRESS4: &str = "pipe.Ingress.nat_ingress.ingress_ipv4"; | |
| const NAT_INGRESS6: &str = "pipe.Ingress.nat_ingress.ingress_ipv6"; | |
| const ATTACHED_SUBNET_INGRESS4: &str = | |
| "pipe.Ingress.attached_subnet_ingress.attached_subnets_v4"; | |
| const ATTACHED_SUBNET_INGRESS6: &str = | |
| "pipe.Ingress.attached_subnet_ingress.attached_subnets_v6"; |
To create a mapping onto sidecar-lite table names. This is highly error prone and just cost me a good chunk of time. The ASIC table names should probably be conditionally compiled for the ASIC being used in places like this
dendrite/dpd/src/table/arp_ipv4.rs
Line 17 in 823a717
| pub const TABLE_NAME: &str = "pipe.Ingress.l3_router.Router4.Arp.tbl"; |
So we don't have to manually map things.
While the argument can and should be made that sidecar-lite should move toward full emulation of sidecar-proper. We've got new hardware ASICs in the pipeline that may have differing ASIC table names. And until we get to a place where data plane code is completely portable we'll need to deal with these differences in dpd.