Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
32d63e6
Added SAI-Challenger to CI setup.
maksymhedeon Aug 31, 2022
cef877f
Added saithrift to SAI-Challenger client docker image
maksymhedeon Sep 2, 2022
a331675
Update example vnet test.
elchupanebrej Sep 5, 2022
946f1b2
Add vnet outbound test based on SAI description.
maksym-prytoliuk-plv Sep 6, 2022
17b9093
Fixup double network host usage for sai-challenger-client
elchupanebrej Sep 6, 2022
bfd02b3
Kdt 17: Update docker environment (#8)
maksymhedeon Sep 7, 2022
9ce438c
Fixup VNET inbound cleanup removals in test config.
elchupanebrej Sep 7, 2022
987f8d1
Update CA_TO_PA entry in outbound test
maksym-prytoliuk-plv Sep 7, 2022
ea54251
Add vnet scenarios in DASH config format.
anton7811 Sep 7, 2022
1d8df59
Fixed saigen links.
anton7811 Sep 7, 2022
4da8289
Fixes in test scanario.
anton7811 Sep 8, 2022
49d62f6
Fixed path to saigen. Fixed inbound test.
anton7811 Sep 8, 2022
b242290
Update submodule
anton7811 Sep 8, 2022
bb44f60
Final test fixes to align with submodue version.
anton7811 Sep 8, 2022
608dbc0
Fixed VNET outbound test scenario.
anton7811 Sep 14, 2022
72afca4
Outbound test passes with traffic
maksym-prytoliuk-plv Sep 15, 2022
a55b206
Update documentation
maksymhedeon Sep 19, 2022
00ab287
Updated SAI-Challenger submodule.
anton7811 Sep 19, 2022
2d0c21e
Merge branch 'main' into test-framework-extension
anton7811 Sep 20, 2022
21c44ac
Improvements to SAI-Challenger docker flows.
anton7811 Sep 21, 2022
59afa5b
Update dash-test-sai-challenger.md
mgheorghe Sep 26, 2022
341ccb4
Add bmv2 SAI port attributes (num_active, port_list), dflt vlan, dflt…
chrispsommers Sep 30, 2022
86139a4
Added SAI-Challenger docker build verification to GitHub actions
anton7811 Sep 30, 2022
c424c62
Merge pull request #37 from chrispsommers/chris-more-switch-attr
maksym-prytoliuk-plv Oct 3, 2022
9e7707e
Add default .1Q bridge to bmv2
maksym-prytoliuk-plv Oct 3, 2022
dd18255
Fixed SAI-Challenger user guide and file namings.
anton7811 Oct 3, 2022
04df302
Scaled VNET outbound test using snappi and saigen. (1st edition)
maksymhedeon Oct 11, 2022
deb1518
Merge remote-tracking branch 'upstream/main' into merge-main-chris
chrispsommers Oct 12, 2022
de6a200
spellcheck
chrispsommers Oct 12, 2022
ce18524
Move saichallenger client docker to ACR.
chrispsommers Oct 12, 2022
1b061c6
Fix .yml formatting.
chrispsommers Oct 12, 2022
1f317ed
Fix dependency in action file.
chrispsommers Oct 12, 2022
f6965fe
Add missing .env file
chrispsommers Oct 12, 2022
981a7e3
remove space in action script, add .env dependencies
chrispsommers Oct 12, 2022
c2983c2
fix include path
chrispsommers Oct 12, 2022
c5fa177
Add saichalleneger tests to run-all-tests and CI
chrispsommers Oct 12, 2022
a013ef7
Fix docker image name.
chrispsommers Oct 12, 2022
d171622
Publish saic to acr (#252)
chrispsommers Oct 12, 2022
aa3033a
Correct mixup in image names.
chrispsommers Oct 12, 2022
cffc506
Remove stray hyphen
chrispsommers Oct 12, 2022
f225dc4
Run saichallenger workflows on any branch PR.
chrispsommers Oct 12, 2022
c5d80b4
Merge remote-tracking branch 'upstream/sai-challenger-staging' into p…
chrispsommers Oct 12, 2022
7bfb9bc
Publish saic to acr (#253)
chrispsommers Oct 12, 2022
0a1ec5d
Merge remote-tracking branch 'upstream/sai-challenger-staging' into p…
chrispsommers Oct 12, 2022
46461fd
Added few more VNET scenario examples.
anton7811 Oct 12, 2022
ce5d563
Merge remote-tracking branch 'origin/test-framework-extension' into p…
chrispsommers Oct 12, 2022
12d8d8b
Merge remote-tracking branch 'upstream/main' into publish-saic-to-acr
chrispsommers Oct 12, 2022
b0aca69
Add outbound diagram
maksym-prytoliuk-plv Oct 13, 2022
e505508
Added inbound to xfail test results. (#44)
anton7811 Oct 13, 2022
fb32d8a
Merge pull request #41 from chrispsommers/publish-saic-to-acr
anton7811 Oct 13, 2022
6513dca
Scaling test configuration documentation
anton7811 Oct 14, 2022
4481a6e
Submodule update and rename
anton7811 Oct 17, 2022
81a9ee8
Merge branch 'main' into test-framework-extension
anton7811 Oct 18, 2022
4c80ab1
Merge branch 'main' into test-framework-extension
anton7811 Nov 3, 2022
6157fa2
Replaced submodule with PyPI package. Upgraded Ixia-C version.
anton7811 Nov 4, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/dash-bmv2-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/docker files/Dockerfile.*'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- 'dash-pipeline/dockerfiles/*.env'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
Expand All @@ -27,7 +28,8 @@ on:
- 'test/**.sh'
- 'test/**.yml'
- 'dash-pipeline/**'
- '!dash-pipeline/docker files/Dockerfile.*'
- '!dash-pipeline/dockerfiles/Dockerfile.*'
- 'dash-pipeline/dockerfiles/*.env'
- '!dash-pipeline/.dockerignore'
- '!dash-pipeline/**.md'
- '!dash-pipeline/**.svg'
Expand Down Expand Up @@ -82,4 +84,6 @@ jobs:
run: DOCKER_FLAGS=$docker_fg_flags make deploy-ixiac
- name: Run Pytests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saithrift-pytests
- name: Run SAI-Challenger Tests
run: DOCKER_FLAGS=$docker_fg_root_flags make run-saichallenger-tests

54 changes: 54 additions & 0 deletions .github/workflows/dash-saichallenger-client-docker-acr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: DASH-docker-saichallenger-client-build-publish-acr

on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-saichallenger-client-docker-acr.yml'
- 'dash-pipeline/Makefile'
- 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "**" ]
paths:
- '.github/workflows/dash-saichallenger-client-docker-acr.yml'
- 'dash-pipeline/Makefile'
- 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
# Can only publish from within DASH repo (need credentials from secrets)
if: github.repository == 'Azure/DASH'
name: Build and publish dash-saichallenger-client image
runs-on: ubuntu-20.04
env:
docker_fg_flags: -u root --privileged
docker_bg_flags: -d -u root --privileged
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Pull docker p4c image
run: make docker-pull-dash-p4c
- name: Build P4 software switch (bmv2) and P4Info
run: DOCKER_FLAGS=$docker_fg_flags make p4
- name: Install SAI submodule
run: git submodule update --init
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Generate SAI-Thrift client and server code and libs
run: DOCKER_FLAGS=$docker_fg_flags make saithrift-server
- uses: azure/docker-login@v1
with:
login-server: sonicdash.azurecr.io
username: ${{ secrets.DASH_ACR_USERNAME }}
password: ${{ secrets.DASH_ACR_PASSWORD }}
- name: Build SAI-Challenger client docker image
run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client
- name: Publish SAI-Challenger client docker image
run: make docker-publish-saichallenger-client
45 changes: 45 additions & 0 deletions .github/workflows/dash-saichallenger-client-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: DASH-docker-saichallenger-client-img

on:
push:
branches: [ "**" ]
paths:
- '.github/workflows/dash-saichallenger-client-docker.yml'
- 'dash-pipeline/Makefile'
- 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
pull_request:
branches: [ "**" ]
paths:
- '.github/workflows/dash-saichallenger-client-docker.yml'
- 'dash-pipeline/Makefile'
- 'dash-pipeline/dockerfiles/Dockerfile.saichallenger-client'
- 'dash-pipeline/.dockerignore'
- 'dash-pipeline/dockerfiles/.dockerignore'
workflow_dispatch:

jobs:
build:
name: Build dash-saichallenger-client-image
runs-on: ubuntu-20.04
env:
docker_fg_flags: -u root --privileged
docker_bg_flags: -d -u root --privileged
defaults:
run:
working-directory: ./dash-pipeline
steps:
- uses: actions/checkout@v3
- name: Pull docker p4c image
run: make docker-pull-dash-p4c
- name: Build P4 software switch (bmv2) and P4Info
run: DOCKER_FLAGS=$docker_fg_flags make p4
- name: Install SAI submodule
run: git submodule update --init
- name: Generate SAI API
run: DOCKER_FLAGS=$docker_fg_flags make sai
- name: Generate SAI-Thrift client and server code and libs
run: DOCKER_FLAGS=$docker_fg_flags make saithrift-server
- name: Build SAI-Challenger client docker image
run: DOCKER_FLAGS=$docker_fg_flags make docker-saichallenger-client
4 changes: 2 additions & 2 deletions .github/workflows/dash-saithrift-client-bldr-docker-acr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ jobs:
with:
login-server: sonicdash.azurecr.io
username: ${{ secrets.DASH_ACR_USERNAME }}
password: ${{ secrets.DASH_ACR_PASSWORD }}
- name: Build dash-saithrift-client-bldr image
password: ${{ secrets.DASH_ACR_PASSWORD }}
- 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-saithrift-client-bldr
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
path = dash-pipeline/SAI/SAI
url = https://github.com/reshmaintel/SAI.git
branch = dash-ptf-ci
[submodule "test/SAI-Challenger"]
path = test/SAI-Challenger
url = https://github.com/opencomputeproject/SAI-Challenger
branch = multiple-api-support
5 changes: 5 additions & 0 deletions .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ LLDP
lldp
loadbalancer
lookups
LOOKUPs
loopback
LPM
lts
Expand All @@ -304,6 +305,7 @@ makefile
Makefile
Makefiles
makefiles
MAPs
MatchedHalfOpenFlow
MatchedOtherFlow
MatchedTcpFlow
Expand Down Expand Up @@ -421,6 +423,7 @@ qos
Radv
rdpty
reachability
reconvergence
README
READMEs
README's
Expand Down Expand Up @@ -452,12 +455,14 @@ runtime
rx
SAI
sai
saigen
sairedis
SAIRPC
saiserver
saithrift
sata
scalability
scalable
Scalable
scapy
Schemas
Expand Down
85 changes: 78 additions & 7 deletions dash-pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ mkfile_dir := $(dir $(mkfile_path))
# "All" type targets for convenience
all:p4 sai saithrift-server docker-saithrift-client test

run-all-tests:run-libsai-test run-saithrift-client-tests
run-all-tests:run-libsai-test run-saithrift-client-tests run-saichallenger-tests
run-saithrift-client-tests: run-saithrift-ptftests run-saithrift-pytests
run-saithrift-client-dev-tests: run-saithrift-dev-ptftests run-saithrift-dev-pytests

.PHONY:clean
clean: kill-all p4-clean sai-clean test-clean network-clean saithrift-server-clean
rm -rf $(P4_OUTDIR)

kill-all: kill-saithrift-server kill-switch undeploy-ixiac
kill-all: kill-saithrift-server kill-switch undeploy-ixiac kill-saichallenger-client

PWD := $(realpath $(mkfile_dir))
DASH_USER ?=dashuser
Expand Down Expand Up @@ -49,6 +49,10 @@ include dockerfiles/DOCKER_SAITHRIFT_CLIENT_BLDR_IMG.env
# TODO: consider some other tagging scheme
DOCKER_SAITHRIFT_CLIENT_IMG ?= local/dash-saithrift-client:latest

# Base image with test frameworks, DASH client libs not installed
# include file defines DOCKER_SAI_CHALLENGER_CLIENT_IMG
include dockerfiles/DOCKER_SAI_CHALLENGER_CLIENT_IMG.env

# Set differently in CI scripts as needed, e.g. run switch container in -d mode
DOCKER_FLAGS ?=-it

Expand Down Expand Up @@ -122,7 +126,7 @@ DOCKER_RUN_SAITHRIFT_BLDR =\

sai: sai-clean sai-headers sai-meta libsai

sai-headers: p4 | SAI/SAI
sai-headers: p4 | SAI/SAI
@echo "Generate SAI library headers and implementation..."
mkdir -p SAI/lib && chmod -R o+w SAI && \
$(DOCKER_RUN) \
Expand All @@ -131,7 +135,7 @@ sai-headers: p4 | SAI/SAI
-w /SAI $(DOCKER_SAITHRIFT_BLDR_IMG) \
./generate_dash_api.sh

sai-meta:
sai-meta:
@echo "Generate SAI metadata..."
# hack - remove scripts which cause Git ownership failures in CI pipelines
# We don't need them, they're to check that SAI headers didn't experience enum changes etc.
Expand All @@ -146,7 +150,7 @@ sai-meta:
make

# TODO - add SAI header dependencies
libsai:
libsai:
@echo "build libsai.so..."
$(DOCKER_RUN) \
$(DOCKER_FLAGS) \
Expand All @@ -155,7 +159,7 @@ libsai:
$(DOCKER_BMV2_BLDR_IMG) \
make

libsai-clean:
libsai-clean:
-rm -rf SAI/lib/*

.PHONY:sai-clean
Expand Down Expand Up @@ -354,7 +358,7 @@ docker-publish-saithrift-client-bldr:
docker push $(DOCKER_SAITHRIFT_CLIENT_BLDR_IMG)

###############################

# Client image, rebuild any time SAI interface changes
# TODO - add sai header (inc/ and experimental) dependencies
docker-saithrift-client:
Expand Down Expand Up @@ -512,6 +516,73 @@ deploy-ixiac:
undeploy-ixiac:
cd ../test/third-party/traffic_gen && ./undeploy_ixiac.sh

###############################
# SAI-CHALLENGER TARGETS
###############################

SAI_CHALLENGER_PATH = $(PWD)/../test/SAI-Challenger

CONTAINER_SAI_CHALLENGER_CLIENT_NAME = dash-saichallenger-client-$(USER)

# Add passing parameters to the run-saichallenger-tests target.
ifeq (run-saichallenger-tests,$(firstword $(MAKECMDGOALS)))
SAI_CHALLENGER_SETUP_FILE := $(wordlist 2, 2, $(MAKECMDGOALS))
SAI_CHALLENGER_TEST := $(wordlist 3, 3, $(MAKECMDGOALS))
$(eval $(SAI_CHALLENGER_SETUP_FILE):;@:)
$(eval $(SAI_CHALLENGER_TEST):;@:)
endif
# If setup file's isn't passed, set it to the default.
ifeq ($(SAI_CHALLENGER_SETUP_FILE),)
SAI_CHALLENGER_SETUP_FILE := sai_dpu_client_server_snappi.json
endif
# If test's name isn't passed, set it to the default.
ifeq ($(SAI_CHALLENGER_TEST),)
SAI_CHALLENGER_TEST := test_sai_vnet_*.py
endif

docker-saichallenger-client:
cd $(SAI_CHALLENGER_PATH) && ./build.sh -i client
docker build \
-f dockerfiles/Dockerfile.saichallenger-client \
-t $(DOCKER_SAI_CHALLENGER_CLIENT_IMG) \
.

docker-publish-saichallenger-client:
@echo "Publish $(DOCKER_SAI_CHALLENGER_CLIENT_IMG) - requires credentials, can only do from DASH repo, not a fork"
docker push $(DOCKER_SAI_CHALLENGER_CLIENT_IMG)

DOCKER_RUN_SAI_CHALLENGER_CLIENT=docker run \
-v $(SAI_CHALLENGER_PATH):/sai-challenger \
-v $(SAI_CHALLENGER_PATH)/../test-cases/scale/saic/:/sai-challenger/dash_tests \
-v $(PWD)/../:/dash \
--cap-add=NET_ADMIN \
--device /dev/net/tun:/dev/net/tun \
--rm \
--network=host \
--name $(CONTAINER_SAI_CHALLENGER_CLIENT_NAME)

run-saichallenger-client: deploy-ixiac
$(DOCKER_RUN_SAI_CHALLENGER_CLIENT) \
-d \
--name $(CONTAINER_SAI_CHALLENGER_CLIENT_NAME) \
$(DOCKER_SAI_CHALLENGER_CLIENT_IMG)

run-saichallenger-client-bash: deploy-ixiac
$(DOCKER_RUN_SAI_CHALLENGER_CLIENT) \
-w /sai-challenger/dash_tests \
$(DOCKER_FLAGS) \
$(DOCKER_SAI_CHALLENGER_CLIENT_IMG) \
/bin/bash

kill-saichallenger-client:
-docker kill $(CONTAINER_SAI_CHALLENGER_CLIENT_NAME)

run-saichallenger-tests: deploy-ixiac
$(DOCKER_RUN_SAI_CHALLENGER_CLIENT) \
-w /sai-challenger/dash_tests \
$(DOCKER_FLAGS) \
$(DOCKER_SAI_CHALLENGER_CLIENT_IMG) \
./run_vnet_tests.sh --setup=$(SAI_CHALLENGER_SETUP_FILE) $(SAI_CHALLENGER_TEST)

###############################
# ENVIRONMENT SETUP TARGETS
Expand Down
Loading