Skip to content

Commit 152800a

Browse files
Merge remote-tracking branch 'origin-1/main' into patch-4
2 parents cc43c75 + 51df513 commit 152800a

File tree

83 files changed

+2816
-880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2816
-880
lines changed

.github/workflows/dash-md-spellcheck.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@master
1818
- name: Spellcheck
19-
uses: rojopolis/spellcheck-github-actions@0.26.0
19+
uses: rojopolis/spellcheck-github-actions@0.35.0

.wordlist.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Accton
66
ACK
77
Ack
88
ack
9+
ack'ed
910
acl
1011
ACL
1112
ACLs
@@ -37,6 +38,7 @@ AspNet
3738
assignees
3839
asyncE
3940
atlassian
41+
attr
4042
ATTR
4143
auditability
4244
autogenerate
@@ -304,6 +306,7 @@ IxLoad
304306
ixload
305307
IxNetwork
306308
IxNetworkWeb
309+
Jiang
307310
Jinja
308311
jitter
309312
journaled
@@ -372,6 +375,7 @@ NonSynStateful
372375
NorthBound
373376
Novus
374377
NPL
378+
NPU
375379
NPUS
376380
NSG
377381
NSGs
@@ -421,6 +425,7 @@ performant
421425
pingmesh
422426
PIR
423427
pluggable
428+
PLS
424429
PLVision's
425430
PKTS
426431
pmon
@@ -471,11 +476,13 @@ README
471476
READMEs
472477
README's
473478
reconvergence
479+
RECV
474480
RedirectRuleResimulatedUf
475481
redis
476482
renderer
477483
repo
478484
repos
485+
REQ
479486
resimulated
480487
resimulation
481488
responder
@@ -528,12 +535,14 @@ sharding
528535
SInce
529536
SKU
530537
SKUs
538+
SLA
531539
SLB
532540
SMAC
533541
SmartAppliances
534542
SmartNIC
535543
SmartNic
536544
SmartNICs
545+
SmartSwitch
537546
SmartSwitches
538547
snappi
539548
SNAT

dash-pipeline/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ sai-submodule:
9292
# P4 Source code compile TARGETS
9393
######################################
9494

95-
P4_SRC=$(wildcard bmv2/*.p4)
95+
P4_SRC=$(wildcard bmv2/**/*.p4)
9696
P4_MAIN=bmv2/dash_pipeline.p4
9797
P4_OUTDIR=bmv2/dash_pipeline.bmv2
9898
P4_ARTIFACTS=$(P4_OUTDIR)/dash_pipeline.json $(P4_OUTDIR)/dash_pipeline_p4rt.txt

dash-pipeline/SAI/SAI

Submodule SAI updated 201 files

dash-pipeline/SAI/debian/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ libsai-dev_$(VERSION)_amd64.deb: ../SAI/inc/*.h ../SAI/experimental/*.h
1616
dpkg-deb --build --root-owner-group libsai-dev_$(VERSION)_amd64
1717

1818
libsai_$(VERSION)_amd64.deb: ../lib/libsai.so
19+
mkdir -p -m 755 libsai_$(VERSION)_amd64/etc/dash
20+
install -vCD ../../bmv2/dash_pipeline.bmv2/* libsai_$(VERSION)_amd64/etc/dash/
1921
mkdir -p -m 755 libsai_$(VERSION)_amd64/usr/lib/x86_64-linux-gnu/
2022
find -type d |xargs chmod go-w
2123
install -vCD ../lib/libsai.so libsai_$(VERSION)_amd64/usr/lib/x86_64-linux-gnu/libsai.so

dash-pipeline/SAI/sai_api_gen.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,8 @@ def _parse_sai_table_attribute_annotation(self, p4rt_anno_list: Dict[str, Any])
484484
self.skipattr = str(kv['value']['stringValue'])
485485
elif kv['key'] == 'match_type':
486486
self.match_type = str(kv['value']['stringValue'])
487+
elif kv['key'] == 'validonly':
488+
self.validonly = str(kv['value']['stringValue'])
487489
else:
488490
raise ValueError("Unknown attr annotation " + kv['key'])
489491

@@ -516,6 +518,7 @@ def __init__(self):
516518
self.isreadonly: str = "true"
517519
self.counter_type: str = "bytes"
518520
self.attr_type: str = "stats"
521+
self.no_suffix: bool = ""
519522
self.param_actions: List[str] = []
520523

521524
def parse_p4rt(self, p4rt_counter: Dict[str, Any], var_ref_graph: P4VarRefGraph) -> None:
@@ -597,6 +600,8 @@ def __parse_sai_counter_annotation(self, p4rt_counter: Dict[str, Any]) -> None:
597600
self.attr_type = str(kv['value']['stringValue'])
598601
if self.attr_type not in ["counter_attr", "counter_id", "stats"]:
599602
raise ValueError(f'Unknown counter attribute type: attr_type={self.attr_type}')
603+
elif kv['key'] == 'no_suffix':
604+
self.no_suffix = str(kv['value']['stringValue']) == "true"
600605
else:
601606
raise ValueError("Unknown attr annotation " + kv['key'])
602607

@@ -613,10 +618,11 @@ def generate_counter_sai_attributes(self) -> 'Iterator[SAICounter]':
613618
counter = copy.deepcopy(self)
614619

615620
counter.counter_type = counter_type
621+
616622
if counter.attr_type == "counter_attr":
617-
counter.name = f"{counter.name}_{counter.counter_type}_counter"
623+
counter.name = f"{counter.name}_{counter.counter_type}_counter" if not self.no_suffix else f"{counter.name}_counter"
618624
else:
619-
counter.name = f"{counter.name}_{counter.counter_type}"
625+
counter.name = f"{counter.name}_{counter.counter_type}" if not self.no_suffix else counter.name
620626

621627
yield counter
622628

@@ -695,8 +701,8 @@ def parse_p4rt(self, p4rt_table_action: Dict[str, Any], sai_enums: List[SAIEnum]
695701
},
696702
"params": [
697703
{ "id": 1, "name": "dst_vnet_id", "bitwidth": 16 },
698-
{ "id": 2, "name": "meter_policy_en", "bitwidth": 1 },
699-
{ "id": 3, "name": "meter_class", "bitwidth": 16 }
704+
{ "id": 2, "name": "meter_class_or", "bitwidth": 32 },
705+
{ "id": 3, "name": "meter_class_and", "bitwidth": 32 }
700706
]
701707
}
702708
'''

dash-pipeline/SAI/src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ CXXFLAGS_COMMON+= -Wno-switch-default
4343
CXXFLAGS_COMMON+= -Wconversion
4444
CXXFLAGS_COMMON+= -Wno-psabi
4545
CXXFLAGS_COMMON+= -Wno-unused-label
46+
CXXFLAGS_COMMON+= -Wno-unused-result
4647

4748
# Sources from OCP SAI Repo:
4849
SAI_DIR=../SAI/meta/

dash-pipeline/SAI/src/objectidmanager.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extern "C" {
77

88
#include <set>
99
#include <map>
10+
#include <string>
1011

1112
namespace dash
1213
{
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include "saiimpl.h"
2+
3+
DASH_GENERIC_QUAD(BUFFER_POOL,buffer_pool);
4+
DASH_GENERIC_QUAD(INGRESS_PRIORITY_GROUP,ingress_priority_group);
5+
DASH_GENERIC_QUAD(BUFFER_PROFILE,buffer_profile);
6+
7+
sai_buffer_api_t redis_buffer_api = {
8+
9+
DASH_GENERIC_QUAD_API(buffer_pool)
10+
11+
.get_buffer_pool_stats = 0,
12+
.get_buffer_pool_stats_ext = 0,
13+
.clear_buffer_pool_stats = 0,
14+
15+
DASH_GENERIC_QUAD_API(ingress_priority_group)
16+
17+
.get_ingress_priority_group_stats = 0,
18+
.get_ingress_priority_group_stats_ext = 0,
19+
.clear_ingress_priority_group_stats = 0,
20+
21+
DASH_GENERIC_QUAD_API(buffer_profile)
22+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include "saiimpl.h"
2+
3+
DASH_GENERIC_QUAD(DTEL,dtel);
4+
DASH_GENERIC_QUAD(DTEL_QUEUE_REPORT,dtel_queue_report);
5+
DASH_GENERIC_QUAD(DTEL_INT_SESSION,dtel_int_session);
6+
DASH_GENERIC_QUAD(DTEL_REPORT_SESSION,dtel_report_session);
7+
DASH_GENERIC_QUAD(DTEL_EVENT,dtel_event);
8+
9+
sai_dtel_api_t dash_sai_dtel_api = {
10+
11+
DASH_GENERIC_QUAD_API(dtel)
12+
DASH_GENERIC_QUAD_API(dtel_queue_report)
13+
DASH_GENERIC_QUAD_API(dtel_int_session)
14+
DASH_GENERIC_QUAD_API(dtel_report_session)
15+
DASH_GENERIC_QUAD_API(dtel_event)
16+
};

0 commit comments

Comments
 (0)