Skip to content

Commit

Permalink
Merge branch 'sonic-net:main' into pr-table-size
Browse files Browse the repository at this point in the history
  • Loading branch information
mgheorghe authored Aug 6, 2024
2 parents e31d4b4 + 2d622bc commit 895b20e
Show file tree
Hide file tree
Showing 89 changed files with 3,828 additions and 1,036 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dash-bmv2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ jobs:
run: make docker-bmv2-bldr
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Check if SAI spec is updated
run: DOCKER_FLAGS=$docker_fg_flags make check-sai-spec
- name: Build libsai c++ tests
run: DOCKER_FLAGS=$docker_fg_flags make test
- name: Prepare network
Expand Down
9 changes: 9 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ MaxUdpFlow
md
microsoft
misorder
MSEE
MSFT
msft
MSRC
Expand All @@ -377,6 +378,7 @@ Novus
NPL
NPU
NPUS
NPUs
NSG
NSGs
num
Expand Down Expand Up @@ -418,6 +420,7 @@ oversubscription
param
params
PAs
PCC
PCI
PCIe
Pensando
Expand Down Expand Up @@ -499,6 +502,7 @@ roadmap
routable
RPC
RPCs
RPF
RST
RSTPackets
RSTs
Expand Down Expand Up @@ -733,3 +737,8 @@ Ivantsiv
Zhixiong
Niu
validonly
pb
proto
smac
BFD
hamgrd
8 changes: 8 additions & 0 deletions dash-pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,14 @@ sai-clean: SAI/SAI libsai-clean saithrift-server-clean
rm -rf SAI/SAI/inc SAI/SAI/experimental SAI/SAI/meta
cd SAI/SAI && git checkout -- inc experimental meta

.PHONY:check-sai-spec
check-sai-spec:
if git status | grep -q "SAI/specs"; then \
echo 'SAI specs have changed, please run "make sai-headers" locally and commit the changes for review.'; \
echo ""; echo "SAI spec diff found as below:"; \
git diff SAI/specs; \
exit 1; \
fi

# Run to recreate same environment as building saithrift client & server
run-saithrift-bldr-bash:
Expand Down
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/SAI
Submodule SAI updated 46 files
+2 −2 doc/SAI-Proposal-FRR.md
+480 −0 doc/SAI-Proposal-ICMP-ECHO.md
+ doc/figures/sai_icmp_echo_state.png
+16 −16 experimental/saiexperimentaldashacl.h
+9 −9 experimental/saiexperimentaldashdirectionlookup.h
+122 −78 experimental/saiexperimentaldasheni.h
+94 −32 experimental/saiexperimentaldashha.h
+15 −15 experimental/saiexperimentaldashinboundrouting.h
+159 −89 experimental/saiexperimentaldashmeter.h
+53 −23 experimental/saiexperimentaldashoutboundcatopa.h
+132 −31 experimental/saiexperimentaldashoutboundrouting.h
+9 −9 experimental/saiexperimentaldashpavalidation.h
+154 −0 experimental/saiexperimentaldashtunnel.h
+9 −9 experimental/saiexperimentaldashvip.h
+8 −8 experimental/saiexperimentaldashvnet.h
+4 −1 experimental/saiextensions.h
+20 −2 experimental/saiportextensions.h
+17 −2 experimental/saiswitchextensions.h
+6 −2 experimental/saitypesextensions.h
+6 −5 inc/sai.h
+388 −0 inc/saiicmpecho.h
+4 −0 inc/saiobject.h
+19 −2 inc/saiport.h
+31 −1 inc/saiswitch.h
+2 −5 inc/saitypes.h
+1 −0 meta/acronyms.txt
+1 −0 meta/ancestry.825c835.history
+0 −1 meta/ancestry.eaf2812.history
+3 −1 meta/ancestry.pl
+1 −0 meta/aspell.en.pws
+2 −2 meta/checkancestry.sh
+2 −0 meta/checkheaders.pl
+8 −1 meta/checkstructs.sh
+97 −9 meta/parse.pl
+17 −21 meta/saidepgraphgen.cpp
+7 −0 meta/saimetadatatypes.h
+57 −28 meta/saimetadatautils.c
+12 −0 meta/saimetadatautils.h
+495 −144 meta/saisanitycheck.c
+1 −1 meta/saiserializetest.c
+1 −0 meta/structs.825c835.history
+27 −1 meta/structs.pl
+8 −2 meta/style.pm
+38 −26 meta/test.pm
+40 −0 test/saithrift/src/switch_sai_rpc_server.cpp
+2 −0 test/saithrift/tests/switch.py
4 changes: 3 additions & 1 deletion dash-pipeline/SAI/sai_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from utils.dash_p4 import DashP4SAIExtensions
from utils.p4ir import P4IRTree, P4VarRefGraph
from utils.sai_spec import SaiSpec
from utils.sai_gen import SAIGenerator
from utils.sai_gen import SAIGenerator, SaiHeaderGenerator
except ImportError as ie:
print("Import failed for " + ie.name)
exit(1)
Expand Down Expand Up @@ -68,8 +68,10 @@
print("Outputting new SAI spec to " + sai_spec_dir)
yaml_inc_ctor.autoload = False
new_sai_spec = dash_sai_exts.to_sai()
new_sai_spec.finalize()
sai_spec.merge(new_sai_spec)
sai_spec.serialize(sai_spec_dir)

# Generate and update all SAI files
SAIGenerator(dash_sai_exts).generate()
SaiHeaderGenerator(sai_spec).generate()
106 changes: 95 additions & 11 deletions dash-pipeline/SAI/specs/dash_acl.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup
name: dash_acl
description: ''
description: DASH ACL
api_type: overlay
sai_apis:
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: dash_acl_group
description: ''
description: DASH ACL group
is_object: true
enums: []
structs: []
attributes:
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_GROUP_IP_ADDR_FAMILY
description: Action parameter IP_ADDR_FAMILY
name: SAI_DASH_ACL_GROUP_ATTR_IP_ADDR_FAMILY
description: Action parameter IP address family
type: sai_ip_addr_family_t
attr_value_field: u32
default: SAI_IP_ADDR_FAMILY_IPV4
Expand All @@ -20,7 +21,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: null
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
Expand All @@ -33,12 +35,12 @@ sai_apis:
attr_param_id: {}
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: dash_acl_rule
description: ''
description: DASH ACL rule
is_object: true
enums:
- !!python/object:utils.sai_spec.sai_enum.SaiEnum
name: sai_dash_acl_rule_action_t
description: Attribute data for SAI_DASH_ACL_RULE_ATTR_ACTION
description: 'Attribute data for #SAI_DASH_ACL_RULE_ATTR_ACTION'
members:
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember
name: SAI_DASH_ACL_RULE_ACTION_PERMIT
Expand All @@ -65,11 +67,90 @@ sai_apis:
attr_value_field: null
default: SAI_DASH_ACL_RULE_ACTION_PERMIT
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_DASH_ACL_GROUP_ID
description: Exact matched key dash_acl_group_id
type: sai_object_id_t
attr_value_field: u16
default: null
isresourcetype: true
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: SAI_OBJECT_TYPE_DASH_ACL_GROUP
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_DIP
description: List matched key dip
type: sai_ip_prefix_list_t
attr_value_field: ipprefixlist
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_SIP
description: List matched key sip
type: sai_ip_prefix_list_t
attr_value_field: ipprefixlist
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_PROTOCOL
description: List matched key protocol
type: sai_u8_list_t
attr_value_field: u8list
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_SRC_PORT
description: Range_list matched key src_port
type: sai_u16_range_list_t
attr_value_field: u16rangelist
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_DST_PORT
description: Range_list matched key dst_port
type: sai_u16_range_list_t
attr_value_field: u16rangelist
default: null
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
object_name: null
allow_null: false
valid_only: null
deprecated: null
is_vlan: false
deprecated: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_COUNTER_ID
description: Attach a counter. When it is empty, then packet hits won't be counted.
Expand All @@ -81,7 +162,8 @@ sai_apis:
object_name: SAI_OBJECT_TYPE_COUNTER
allow_null: true
valid_only: null
deprecated: null
deprecated: false
is_vlan: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_PRIORITY
description: Rule priority in table
Expand All @@ -93,7 +175,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: null
deprecated: false
is_vlan: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DASH_ACL_RULE_ATTR_IP_ADDR_FAMILY
description: IP address family for resource accounting
Expand All @@ -105,7 +188,8 @@ sai_apis:
object_name: null
allow_null: false
valid_only: null
deprecated: null
deprecated: false
is_vlan: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
Expand Down
38 changes: 30 additions & 8 deletions dash-pipeline/SAI/specs/dash_direction_lookup.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
!!python/object:utils.sai_spec.sai_api_group.SaiApiGroup
name: dash_direction_lookup
description: ''
description: DASH direction lookup
api_type: overlay
sai_apis:
- !!python/object:utils.sai_spec.sai_api.SaiApi
name: direction_lookup_entry
description: ''
description: direction lookup entry
is_object: false
enums:
- !!python/object:utils.sai_spec.sai_enum.SaiEnum
name: sai_direction_lookup_entry_action_t
description: Attribute data for SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION
description: 'Attribute data for #SAI_DIRECTION_LOOKUP_ENTRY_ATTR_ACTION'
members:
- !!python/object:utils.sai_spec.sai_enum_member.SaiEnumMember
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
description: ''
value: '0'
structs:
- !!python/object:utils.sai_spec.sai_struct.SaiStruct
name: sai_direction_lookup_entry_entry_t
name: sai_direction_lookup_entry_t
description: Entry for direction_lookup_entry
members:
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
name: VNI
name: switch_id
description: Switch ID
type: sai_object_id_t
objects: SAI_OBJECT_TYPE_SWITCH
valid_only: null
- !!python/object:utils.sai_spec.sai_struct_entry.SaiStructEntry
name: vni
description: Exact matched key VNI
type: sai_uint32_t
objects: null
Expand All @@ -34,11 +41,25 @@ sai_apis:
attr_value_field: null
default: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
isresourcetype: false
flags: MANDATORY_ON_CREATE | CREATE_ONLY
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
deprecated: false
is_vlan: false
- !!python/object:utils.sai_spec.sai_attribute.SaiAttribute
name: SAI_DIRECTION_LOOKUP_ENTRY_ATTR_DASH_ENI_MAC_OVERRIDE_TYPE
description: Action parameter DASH ENI MAC override type
type: sai_dash_eni_mac_override_type_t
attr_value_field: s32
default: SAI_DASH_ENI_MAC_OVERRIDE_TYPE_NONE
isresourcetype: false
flags: CREATE_AND_SET
object_name: null
allow_null: false
valid_only: null
deprecated: null
is_vlan: false
deprecated: false
stats: []
p4_meta: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4Meta
tables:
Expand All @@ -48,4 +69,5 @@ sai_apis:
SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION: !!python/object:utils.sai_spec.sai_api_p4_meta.SaiApiP4MetaAction
name: SAI_DIRECTION_LOOKUP_ENTRY_ACTION_SET_OUTBOUND_DIRECTION
id: 17408972
attr_param_id: {}
attr_param_id:
SAI_DIRECTION_LOOKUP_ENTRY_ATTR_DASH_ENI_MAC_OVERRIDE_TYPE: 1
Loading

0 comments on commit 895b20e

Please sign in to comment.