sonic-net / DASH

Disaggregated APIs for SONiC Hosts
Apache License 2.0
78 stars 88 forks source link

Underlay SAI API for BMv2 #236

Open anton7811 opened 1 year ago

anton7811 commented 1 year ago

Currently, BMv2 does not support the underlay SAI API listed in dash-sonic-hld. But we already have the tests in PR #231 that are using it. The absence of underlay makes tests not executable on BMv2 without code modification.

As I understand, the primary idea of BMv2 is to validate behavior. But since tests are not compatible, it makes BMv2 unless for this. Looking at the DASH topology in sonic-mgmt, DASH has to support underlay, and all vendors will follow this.

So the question is - what to do with BMv2? And how to make tests compatible?

aputriax commented 1 year ago

Based on the saidashvnet.py test case here are the SAI-Thrift calls that are required:

sai_thrift_create_router_interface(self.client, virtual_router_id, src_mac_address, port_id, type=SAI_ROUTER_INTERFACE_TYPE_PORT)
sai_thrift_create_next_hop(self.client, ip, router_interface_id, type=SAI_NEXT_HOP_TYPE_IP)
sai_thrift_create_neighbor_entry(self.client, neighbor_entry, dst_mac_address)
sai_thrift_create_route_entry(self.client, route_entry, next_hop_id)

This configuration is used to:

Also DASH assumes running BGP on the appliance, and this service will be using that API too.

Existing Vnet2Vnet test already relays on that API.

KrisNey-MSFT commented 1 year ago

bmv2 to run SONiC-like test cases?
If we want to run standardized test cases on HW an SW, then we have to enhance the bmv2 for some amount of Underlay. The goal is to run the same test cases and achieve the same behavior. Implementation s/be as simple as possible to achieve the goal. ECMP on the Underlay = how ECMP selects egress port. (ECMP is supposed to be configured in the test, which simplifies the bmv2 implementation). RE: ECMP, Underlay doesn't care b/c each port is equal. Underlay API to properly handle API calls. Return the list of ports when SAI is asked, etc...

Need to list SAI Attributes, handle SAI API call for attribute, reflect proper behavior. Marian can outline the first swing of attributes

Need list of Underlay SAI attributes (in HLD), use this list as a reference? Section 3.3.4 of SONiC DASH HLD

Add 'supported in bmv2' column and stub column to SWSS Lite table? @marian-pritsak to file Issue or PR?

yusefMS06 commented 1 year ago

@marian-pritsak @anton7811 Can we remove block tagged based on response from kristina?

KrisNey-MSFT commented 1 year ago

Still missing MAC resolution

KrisNey-MSFT commented 1 year ago

Discussed James' email of 2/1/2023 to go through and identify if P4 items are applicable. Possibly go over in Behavioral Model meeting 2/2/2023?

Hanif: PINS project (SAI.p4) to leverage to reduce amount of work - is there code we can borrow? This has routing and ACL mirroring. A: Can be done as part of PR236

KrisNey-MSFT commented 4 months ago

Will the convo in tonight's VSS meeting replace the need for this?
VPP implementation of SONiC pipeline to integrate w/DASH bmv2?
Issue may become superceded.