Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underlay SAI API for BMv2 #236

Open
anton7811 opened this issue Sep 26, 2022 · 6 comments
Open

Underlay SAI API for BMv2 #236

anton7811 opened this issue Sep 26, 2022 · 6 comments
Assignees

Comments

@anton7811
Copy link
Contributor

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
Copy link
Collaborator

aputriax commented Sep 28, 2022

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:

  • do dst MAC validation for ingress traffic
  • select egress port
  • set proper MACs for egress packet

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
Copy link
Collaborator

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
Copy link
Collaborator

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

@KrisNey-MSFT
Copy link
Collaborator

Still missing MAC resolution

@KrisNey-MSFT
Copy link
Collaborator

KrisNey-MSFT commented Feb 1, 2023

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
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

5 participants