Skip to content

Commit

Permalink
Sai challenger staging - sync to main, Plvision test-framework-extens…
Browse files Browse the repository at this point in the history
…ion branches (#272)

* Create dash-docker-p4c-bmv2-acr.yml

* Update Makefile

* Experimenting with ACR publish workflows

Revert p4c-bmv2 tag

* Update and rename dash-docker-p4c-bmv2-acr.yml to dash-p4c-bmv2-docker-acr.yml

* Experimental ACR publish; change regname

Use sonicdash ACR for p4c-bmv2. No publish yet.

* Update dash-p4c-bmv2-docker-acr.yml

Publish to ACR using secrets

* Fix macro errors

* Update dash-p4c-bmv2-docker-acr.yml

Force trigger.

* Uncomment docker push command

* Build dash-grpc:1.43.2 docker and publish to ACR

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* Publish docker images to ACR and use those in build process. (#208)

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

* Incremental progress - publish to ACRs (#212)

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Call docker publish make targets from all CI scripts which publish.

* Incremental progress publishing dockers to ACR (#213)

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

* Call docker publish make targets from all CI scripts which publish.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Added SAI-Challenger to CI setup.

    1. Added SAI-Challenger submodule.
    2. Added SAI-Challenger basic test.
    3. Changed Makefile to build/start/stop SAI-Challenger.

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Added saithrift to SAI-Challenger client docker image

- Added saithrift to SAI-Challenger client docker image
- Changed SAI-C submodule branch

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Update example vnet test.

    1. Added SAI-Challenger submodule.
    2. Added SAI-Challenger basic test.
    3. Changed Makefile to build/start/stop SAI-Challenger.

Signed-off-by: Kostiantyn Goloveshko <kostiantyn.goloveshko@plvision.eu>
Co-authored-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Add vnet outbound test based on SAI description.

Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Fixup double network host usage for sai-challenger-client

Signed-off-by: Konstantin Goloveshko <kostiantyn.goloveshko@plvision.eu>

* Kdt 17: Update docker environment (#8)

* Added cgyang submodule
* Updated docker env for thrift tests
* Makefile refactor

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Fixup VNET inbound cleanup removals in test config.

Signed-off-by: Konstantin Goloveshko <kostiantyn.goloveshko@plvision.eu>

* Update CA_TO_PA entry in outbound test

Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Add vnet scenarios in DASH config format.

* Added dash-style VNET inbound routing test
* Added dash-style VNET outbound routing test
* Read config from json (temp workaround)
* Added JSON setup configs for testbed

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>
Co-authored-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Fixed saigen links.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Fixes in test scanario.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Fixed path to saigen. Fixed inbound test.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Update submodule

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Final test fixes to align with submodue version.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Spellcheck - add to wordslist

* Sync to main via intermediate dev branch. (#216)

* AMD-Pensando HA Proposal document

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* SAI apigen support for tables with no action parameters and a single action (#207)

* Update .wordlist.txt

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

* Call docker publish make targets from all CI scripts which publish.

* Doc dash as submodule (#203)

* Document third-party workflows using DASH as a Git submodule.

* Add URL to sample project.

* Incorporate review feedback (typo; missing file).

* Spellcheck fixes.

* Spellcheck

* Add .wordlist.txt to CI triggers.

* Spellcheck wordlist.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Split SAI API (#201)

Make APIs compatible with SONiC bulk infra

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add APP_DB to SAI mapping (#102)

* Add APP_DB to SAI mapping

* Spellcheck - add to wordslist

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Sanjay Thyamagundalu <tsanjay@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: KrisNey-MSFT <krisney@microsoft.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>

* Incremental progress publishing dockers to ACR (#219)

* AMD-Pensando HA Proposal document

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* SAI apigen support for tables with no action parameters and a single action (#207)

* Update .wordlist.txt

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

* Call docker publish make targets from all CI scripts which publish.

* Doc dash as submodule (#203)

* Document third-party workflows using DASH as a Git submodule.

* Add URL to sample project.

* Incorporate review feedback (typo; missing file).

* Spellcheck fixes.

* Spellcheck

* Add .wordlist.txt to CI triggers.

* Spellcheck wordlist.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Split SAI API (#201)

Make APIs compatible with SONiC bulk infra

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add APP_DB to SAI mapping (#102)

* Add APP_DB to SAI mapping

* Spellcheck - add to wordslist

* Fix docker & Makefile perms (#202)

* Incremental work on docker permissions fixes.

* More progress on docker and make permissions issues.

* Trial remove -u root from CI file.

* Makefile and CI file perms

* Fix CI docker flags

* Final purge of obs sudo commands to fix perms.

* Test for veth's before deleting.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Fix ipv6 packet noise (#211)

* Ensure ipv6 disabled on veth's prior to PTF tests, fix #205.

* CHange docker registrey for ixia-c to Google cloud (was Dockerhub). No functional change but new b uilds will pull new image into workspaces.

* Move ipv6 disable code to a separate shell script. Call it after deploy-ixiac target.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Sanjay Thyamagundalu <tsanjay@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: KrisNey-MSFT <krisney@microsoft.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>

* Remove publish steps from non-ACR CI scripts (consequence of merge).

* Incremental progress publishing dockers to ACR. (#220)

* AMD-Pensando HA Proposal document

* Add CI script for saithrift-bldr-docker

* Remove superfluous ACR publish steps from regular docker build CI script.

* Add CI scripts to build and publish remaining docker images to Azure Container Registery (ACR).

* SAI apigen support for tables with no action parameters and a single action (#207)

* Update .wordlist.txt

* Use make target to publish to ACR (just bmv2-bldr as first candidate).

* Call docker publish make targets from all CI scripts which publish.

* Doc dash as submodule (#203)

* Document third-party workflows using DASH as a Git submodule.

* Add URL to sample project.

* Incorporate review feedback (typo; missing file).

* Spellcheck fixes.

* Spellcheck

* Add .wordlist.txt to CI triggers.

* Spellcheck wordlist.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Split SAI API (#201)

Make APIs compatible with SONiC bulk infra

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add APP_DB to SAI mapping (#102)

* Add APP_DB to SAI mapping

* Spellcheck - add to wordslist

* Fix docker & Makefile perms (#202)

* Incremental work on docker permissions fixes.

* More progress on docker and make permissions issues.

* Trial remove -u root from CI file.

* Makefile and CI file perms

* Fix CI docker flags

* Final purge of obs sudo commands to fix perms.

* Test for veth's before deleting.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Fix ipv6 packet noise (#211)

* Ensure ipv6 disabled on veth's prior to PTF tests, fix #205.

* CHange docker registrey for ixia-c to Google cloud (was Dockerhub). No functional change but new b uilds will pull new image into workspaces.

* Move ipv6 disable code to a separate shell script. Call it after deploy-ixiac target.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Remove publish steps from non-ACR CI scripts (consequence of merge).

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Sanjay Thyamagundalu <tsanjay@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: KrisNey-MSFT <krisney@microsoft.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>

* Trial of env var to define docker img

* Add docker .env variable to CI triggers.

* Fix stray conflict markers in Makefile.

* Fix CI triggers.

* Use .env files to define docker images. Fix CI triggers. Remove some docker image CI triggers.

* add missing path

* Fix path.

* Trivial change to force a CI build.

* Change Makefile to force CI rebuild.

* Trivial change to docker image .env file to test CI triggers.

* Change .env file to force CI.

* Change grpc docker .env file to trigger CI rebuild.

* Change saithrift-bldr docker .env to force CI rebuild.

* Change saithrift-client .env file to force CI rebuild/

* Fixed VNET outbound test scenario.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Trial docker build/conditional publish.

* Get env variable into context.

* Correct env filename

* Debugging env vars & docker save

* Fix CI syntax

* Add Makefile targets to upload/download docker image tarball artifact.

* Revert to simple conditional job for build+publish.

* Conditional CI for non-publish docker job.

* Outbound test passes with traffic

Fixed configuration based on changes in main.

Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Add conditionals to all docker build/publish workflows: run build-only in forks, run build-publish in main repo.

* Documenting Docker workflows.

* Spellcheck fixes.

* Spellcheck fixes.

* Add screen cap of skipped job.

* Spellcheck

* Update PR from dev branch (sync to main) (#224)

* Update program-scale-testing-requirements-draft.md

Update Scale #'s per Keysight/MSFT call; document is a version which needs an update.

* Fix Spelling (#221)

* Update AMD-Pensando_HA_Proposal.md

Explicitly add 'parallel' to state synchronization stages (per @lguohan )

* Update AMD-Pensando_HA_Proposal.md (#210)

* SAI apigen support for tables with no action parameters and a single action (#207)

* Update .wordlist.txt

* Update AMD-Pensando_HA_Proposal.md

* Doc dash as submodule (#203)

* Document third-party workflows using DASH as a Git submodule.

* Add URL to sample project.

* Incorporate review feedback (typo; missing file).

* Spellcheck fixes.

* Spellcheck

* Add .wordlist.txt to CI triggers.

* Spellcheck wordlist.

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Split SAI API (#201)

Make APIs compatible with SONiC bulk infra

Signed-off-by: Marian Pritsak <marianp@mellanox.com>

* Add APP_DB to SAI mapping (#102)

* Add APP_DB to SAI mapping

* Update .wordlist.txt

Updating w/Chris

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: Chris Sommers <31145757+chrispsommers@users.noreply.github.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: Chris Sommers <31145757+chrispsommers@users.noreply.github.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>

* Update .wordlist.txt

* Slide deck for today's SAI Challenger presentation

* [doc]: Fix the typo of TCP UDP protocol number (#223)

According to: https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml, the ptotocol number of TCP should be 6, and the UDP's should be 17.

* Proofreading, image clarity.

Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: KrisNey-MSFT <krisney@microsoft.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Ze Gan <ganze718@gmail.com>

* Use env variable for DASH_ACR_LOGIN_SERVER instead of secret.

* Use literal expression instead of env variable.

* Use literal expression for ACR repository instead of secret.

* Clarify docker publishing.

* Spellcheck.

* Document another dockerfile workflow.

* spellcheck

* CI triggers on PR to any branch, not just main.

* Update documentation

- Added dash-test-sai-challenger.md doc file under test/docs
- Updated Makefile make run-saic-test-thrift target with passing parameters.

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Updated SAI-Challenger submodule.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Improvements to SAI-Challenger docker flows.

- Use docker hub to pull images
- Fixed make run-saic-tests to do not show errors
- Updated manuals

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Fixes per review feedback #225 (comment):
 - fix image; (docxkerhub->ACR in one case
 - replace "local" with "host"
Expand on instructions for writing and running PTF tests (from verbal feedback in WG meeting, not an issue or PR review).
Discovered an oversight in the dockerfile .env files which prevented overriding image macros (had to replace = with ?=); tested fix.

* Spellcheck.

* Spellcheck.

* Update dash-test-sai-challenger.md

Signed-off-by: Mircea Dan Gheorghe <mircea-dan.gheorghe@keysight.com>

* Add bmv2 SAI port attributes (num_active, port_list), dflt vlan, dflt vrf)

* Added SAI-Challenger docker build verification to GitHub actions

- Added SAI-Challenger docker verification action.
- Fixed spellchecker and docker build issues.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Add default .1Q bridge to bmv2

Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Fixed SAI-Challenger user guide and file namings.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Spellcheck

* Scaled VNET outbound test using snappi and saigen. (1st edition)

- Split scale and simple tests / jsons
- Updated ixia controller version
- Added dash_helper for traffic profile scaling.

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* spellcheck

* Move saichallenger client docker to ACR.

* Fix .yml formatting.

* Fix dependency in action file.

* Add missing .env file

* remove space in action script, add .env dependencies

* fix include path

* Add saichalleneger tests to run-all-tests and CI

* Fix docker image name.

* Correct mixup in image names.

* Remove stray hyphen

* Run saichallenger workflows on any branch PR.

* Added few more VNET scenario examples.

- Extended VNET traffic scenarios.
- Added docstrings for helper methods.
- Removed unused code.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>
Co-authored-by: Maksym Hedeon <maksym.hedeon@plvision.eu>

* Slides from DASH WG Meeting (SAI Challenger Episode 2) (#254)

* Add outbound diagram

Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Added inbound to xfail test results. (#44)

- Marked VNET Inbound Routing with xfail
- Added pytest.ini with marks definitions.
- Decreased duration of tests.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* Scaling test configuration documentation

- Added scaling approach documentation.
- Vnet2vnet traffic scaling scenario description.
- Added docstring to the test cases.
- Added more test examples.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>
Co-authored-by: Maksym Hedeon <maksym.hedeon@plvision.eu>
Co-authored-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>

* Submodule update and rename

* Rename and update the SAI-Challenger submodule
* Enabled additional tests based on the fixes in the SAI-Challenger.
* Renamed test folder.

Signed-off-by: Anton Putria <anton.putrya@plvision.eu>

* PTF: add basic test infra and more test cases (#231)

* ptf: add vnet sample test cases for dash

- Common VNet API for all tests
- Test cases:
  - Inbound VNI/ENI
  - Inbound Routing PA validate
  - Inbound Routing VNI match
  - Inbound Routing PA SRC IP
  - Outbound Routing Vnet direct
  - Outbound Routing direct
  - CT (just placeholder)
  - Route (basic)

Signed-off-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>
Signed-off-by: Yuriy Harhas <yuriyx.harhas@intel.com>

* ptf: run only bmv2 ready test case on CI

Signed-off-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>

* ptf: test_saithrift_vnet: removed unused libs

Signed-off-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>

* test-cases folder restructure.

- created two subfolders in root: functional and scale
- removed outdated bmv2_model folder
- moved all existing content of test-cases to test-cases/scale

Signed-off-by: Anton Putria <antonx.putria@intel.com>

* Moved saidashvnet.py to a proper location.

Signed-off-by: Anton Putria <antonx.putria@intel.com>

* Fixed ENI creation in Outbound tests

Signed-off-by: Yuriy Harhas <yuriyx.harhas@intel.com>

* Spellchecker related fixes.

Signed-off-by: Anton Putria <antonx.putria@intel.com>

* Updated VNET test cases based on the PR #238.

Signed-off-by: Yuriy Harhas <yuriyx.harhas@intel.com>

Signed-off-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>
Signed-off-by: Yuriy Harhas <yuriyx.harhas@intel.com>
Signed-off-by: Anton Putria <antonx.putria@intel.com>
Co-authored-by: Anton Putria <antonx.putria@intel.com>
Co-authored-by: Yuriy Harhas <yuriyx.harhas@intel.com>

* Adding updated license files (#266)

* Fixbug: SAI Server crash on DASH ACL API (#264)

1. Fix duplicate SAI ID
2. Wrong search action
3. Double delete entry if SAI write error
4. Wrong format of error message

Signed-off-by: Ze Gan <ganze718@gmail.com>

* Add VNET v6 PTF test case; Fix v4 PTF test case to address test hang issue (#263)

This PR adds VNET v6 test case and also fixes the PTF thrift client issue (the v6 test case just hangs) #237. This is a joint work with @chrispsommers and @aputriax.

* Fixed links in the README after renaming folders. (#262)

Signed-off-by: Anton Putria <antonx.putria@intel.com>

Signed-off-by: Anton Putria <antonx.putria@intel.com>

* Correct CI file, was publishing wrong image. Some prior merge must have caused a mixup.

Signed-off-by: Maksym Hedeon <maksym.hedeon@plvision.eu>
Signed-off-by: Kostiantyn Goloveshko <kostiantyn.goloveshko@plvision.eu>
Signed-off-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>
Signed-off-by: Konstantin Goloveshko <kostiantyn.goloveshko@plvision.eu>
Signed-off-by: Anton Putria <anton.putrya@plvision.eu>
Signed-off-by: Marian Pritsak <marianp@mellanox.com>
Signed-off-by: Mircea Dan Gheorghe <mircea-dan.gheorghe@keysight.com>
Signed-off-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>
Signed-off-by: Yuriy Harhas <yuriyx.harhas@intel.com>
Signed-off-by: Anton Putria <antonx.putria@intel.com>
Signed-off-by: Ze Gan <ganze718@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Maksym Hedeon <106111454+maksymhedeon@users.noreply.github.com>
Co-authored-by: Kostiantyn Goloveshko <kostyagoloveshko@gmail.com>
Co-authored-by: Maksym Hedeon <maksym.hedeon@plvision.eu>
Co-authored-by: Maksym Prytoliuk <71631949+maksym-prytoliuk-plv@users.noreply.github.com>
Co-authored-by: Anton Putria <anton7811@gmail.com>
Co-authored-by: Maksym Prytoliuk <maksym.prytoliuk@plvision.eu>
Co-authored-by: Anton Putria <anton.putrya@plvision.eu>
Co-authored-by: Sanjay Thyamagundalu <tsanjay@gmail.com>
Co-authored-by: Mukesh Moopath Velayudhan <mukesh@pensando.io>
Co-authored-by: KrisNey-MSFT <krisney@microsoft.com>
Co-authored-by: Marian Pritsak <marianp@mellanox.com>
Co-authored-by: Ze Gan <ganze718@gmail.com>
Co-authored-by: MirceaDan <mircea-dan.gheorghe@keysight.com>
Co-authored-by: Volodymyr Mytnyk <volodymyrx.mytnyk@intel.com>
Co-authored-by: Anton Putria <antonx.putria@intel.com>
Co-authored-by: Yuriy Harhas <yuriyx.harhas@intel.com>
Co-authored-by: Mohammad Hanif <mohammad.hanif@broadcom.com>
  • Loading branch information
19 people authored Nov 1, 2022
1 parent d627924 commit 14c8b50
Show file tree
Hide file tree
Showing 12 changed files with 342 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ jobs:
- name: Build dash-saithrift-client-bldr image
run: DOCKER_FLAGS=$docker_fg_flags make docker-saithrift-client-bldr
- name: Publish dash-saithrift-client-bldr docker image
run: make docker-publish-saichallenger-client
run: make docker-publish-saithrift-client-bldr
2 changes: 2 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ io
IP
IPs
ip
ips
IPDK
IPU
IPUs
Expand Down Expand Up @@ -426,6 +427,7 @@ reconvergence
README
READMEs
README's
reconvergence
RedirectRuleResimulatedUf
redis
renderer
Expand Down
Binary file not shown.
Binary file not shown.
21 changes: 12 additions & 9 deletions dash-pipeline/SAI/templates/saiapi.cpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,20 @@ sai_status_t sai_create_{{ table.name }}(
{% else %}
// Search the action
for (uint32_t i = 0; i < attr_count; i++) {
switch(attr_list[i].value.s32) {
{% for action in table.actions %}
case SAI_{{ table.name | upper }}_ACTION_{{ action.name | upper }}: {
actionId = {{action.id}};
expectedParams = {{ action.params|length }};
break;
if (SAI_{{ table.name | upper }}_ATTR_ACTION == attr_list[i].id)
{
switch(attr_list[i].value.s32) {
{% for action in table.actions %}
case SAI_{{ table.name | upper }}_ACTION_{{ action.name | upper }}: {
actionId = {{action.id}};
expectedParams = {{ action.params|length }};
break;
}
{% endfor %}
}
{% endfor %}
// only one action
break;
}
// only one action
break;
}
{% endif %}
action->set_action_id(actionId);
Expand Down
7 changes: 3 additions & 4 deletions dash-pipeline/SAI/templates/utils.cpp.j2
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ grpc::StatusCode MutateTableEntry(p4::v1::TableEntry *entry, p4::v1::Update_Type
LOG("GRPC call Write::" << updateTypeStr(updateType) << " OK" << entry->ShortDebugString() << std::endl);
}
else {
LOG("GRPC ERROR["<< status.error_code() <<"]: " << status.error_message() << ", " << status.error_details());
LOG("GRPC call Write::" << updateTypeStr(updateType) << " ERROR: " << std::endl << entry->ShortDebugString());
LOG("GRPC ERROR["<< status.error_code() <<"]: " << status.error_message() << ", " << status.error_details() << std::endl);
LOG("GRPC call Write::" << updateTypeStr(updateType) << " ERROR: " << std::endl << entry->ShortDebugString() << std::endl);
}
//MILIND?? What is this? reference release? memory release?
entity->release_table_entry();
Expand All @@ -163,13 +163,12 @@ grpc::StatusCode MutateTableEntry(p4::v1::TableEntry *entry, p4::v1::Update_Type
bool InsertInTable(p4::v1::TableEntry *entry, sai_object_id_t *objId) {
auto retCode = MutateTableEntry(entry, p4::v1::Update_Type_INSERT);
if (grpc::StatusCode::OK != retCode) {
delete entry;
return false;
}

tableLock.lock();
if (*objId == 0) {
*objId = nextId++;
*objId = NextObjIndex();
}
tableEntryMap[*objId] = entry;
tableLock.unlock();
Expand Down
58 changes: 29 additions & 29 deletions dash-pipeline/tests/saithrift/ptf/vnet/test_saithrift_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ def setUp(self):

dip = sai_thrift_ip_address_t(addr_family=SAI_IP_ADDR_FAMILY_IPV4,
addr=sai_thrift_ip_addr_t(ip4=self.dst_ca_ip))
# TODO: Enable ACL rule
#self.out_acl_rule_id = sai_thrift_create_dash_acl_rule(self.client, dash_acl_group_id=self.out_acl_group_id,
# dip=dip, priority=10, action=SAI_DASH_ACL_RULE_ACTION_PERMIT)
#assert(status == SAI_STATUS_SUCCESS)

self.out_acl_rule_id = sai_thrift_create_dash_acl_rule(self.client, dash_acl_group_id=self.out_acl_group_id, priority=10, action=SAI_DASH_ACL_RULE_ACTION_PERMIT)
assert(status == SAI_STATUS_SUCCESS)

ca_prefix = sai_thrift_ip_prefix_t(addr_family=SAI_IP_ADDR_FAMILY_IPV4,
addr=sai_thrift_ip_addr_t(ip4="10.1.0.0"),
Expand Down Expand Up @@ -214,7 +213,7 @@ def runTest(self):
send_packet(self, 0, vxlan_pkt)
print("\nVerifying packet...\n", self.pkt_exp.__repr__())
verify_packet(self, self.pkt_exp, 0)
print ("test_sai_thrift_outbound_udp_pkt_test OK")
print ("TestSaiThrift_outbound_udp_pkt OK")
except AssertionError as ae:
self.failure_teardown()
raise ae
Expand All @@ -225,8 +224,8 @@ def failure_teardown(self):
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
if hasattr(self, "ore"):
status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
#if hasattr(self, "out_acl_rule_id"):
# sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
if hasattr(self, "out_acl_rule_id"):
sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
if hasattr(self, "e2v"):
sai_thrift_remove_outbound_eni_to_vni_entry(self.client, self.e2v)
if hasattr(self, "eam"):
Expand All @@ -249,34 +248,35 @@ def failure_teardown(self):
def tearDown(self):

# Delete in reverse order
if self.cleaned_up:
return
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)
if not self.cleaned_up:
status = sai_thrift_remove_outbound_ca_to_pa_entry(self.client, self.ocpe)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_outbound_routing_entry(self.client, self.ore)
assert(status == SAI_STATUS_SUCCESS)

#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)
#status = sai_thrift_remove_dash_acl_rule(self.client, self.out_acl_rule_id)
#assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_eni_ether_address_map_entry(self.client, self.eam)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_eni(self.client, self.eni)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_vnet(self.client, self.vnet)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.out_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_dash_acl_group(self.client, self.in_acl_group_id)
assert(status == SAI_STATUS_SUCCESS)
status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)

status = sai_thrift_remove_direction_lookup_entry(self.client, self.dle)
assert(status == SAI_STATUS_SUCCESS)
sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)

sai_thrift_remove_vip_entry(self.client, self.vpe)
assert(status == SAI_STATUS_SUCCESS)
super(self.__class__, self).tearDown()
Loading

0 comments on commit 14c8b50

Please sign in to comment.