Skip to content

Commit

Permalink
Fix ipv6 packet noise (#211)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
chrispsommers and chrispsommers authored Sep 11, 2022
1 parent e31982c commit 2ce121e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
37 changes: 10 additions & 27 deletions dash-pipeline/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SHELL = /bin/bash
# "All" type targets for convenience
all:p4 sai saithrift-server docker-saithrift-client test

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

Expand Down Expand Up @@ -357,14 +357,14 @@ DOCKER_RUN_SAITHRIFT_CLIENT=\
$(DOCKER_FLAGS) \

# Run "production" Pytests bundled inside docker
run-saithrift-pytests:deploy-ixiac
run-saithrift-pytests:deploy-ixiac disable-ipv6
$(DOCKER_RUN_SAITHRIFT_CLIENT) \
-w /tests/saithrift/pytest \
$(DOCKER_SAITHRIFT_CLIENT_IMG) \
./run-saithrift-pytests.sh

# Run "dev" tests mounted from host
run-saithrift-dev-pytests:deploy-ixiac
run-saithrift-dev-pytests:deploy-ixiac disable-ipv6
$(DOCKER_RUN_SAITHRIFT_CLIENT) \
-v $(PWD)/tests/:/tests-dev/ \
-w /tests-dev/saithrift/pytest \
Expand All @@ -373,15 +373,15 @@ run-saithrift-dev-pytests:deploy-ixiac

# Run "production" PTF tests bundled inside docker
# Note - if add ixia-c usage to PTF tests, add dependency deploy-ixiac
run-saithrift-ptftests:
run-saithrift-ptftests: disable-ipv6
$(DOCKER_RUN_SAITHRIFT_CLIENT) \
-w /tests/saithrift/ptf \
$(DOCKER_SAITHRIFT_CLIENT_IMG) \
./run-saithrift-ptftests.sh

# Run "dev" PTF tests mounted from host
# Note - if add ixia-c usage to PTF tests, add dependency deploy-ixiac
run-saithrift-dev-ptftests:
run-saithrift-dev-ptftests: disable-ipv6
$(DOCKER_RUN_SAITHRIFT_CLIENT) \
-v $(PWD)/tests/:/tests-dev/ \
-w /tests-dev/saithrift/ptf \
Expand Down Expand Up @@ -449,7 +449,7 @@ docker-publish-dash-grpc:
# BMV2-PKTGEN NETWORKING TARGETS
###############################

network:veth0 veth2
network:veth0 veth2 disable-ipv6

veth0: /sys/class/net/veth0
/sys/class/net/veth0:
Expand All @@ -459,17 +459,6 @@ veth0: /sys/class/net/veth0
sudo ip link set dev veth1 up
sudo ip link set veth0 mtu 9500
sudo ip link set veth1 mtu 9500
sudo sysctl net.ipv6.conf.veth0.disable_ipv6=1
#https://superuser.com/questions/33196/how-to-disable-autoconfiguration-on-ipv6-in-linux
sudo sysctl net.ipv6.conf.veth0.autoconf=0
sudo sysctl net.ipv6.conf.veth0.accept_ra=0
sudo sysctl net.ipv6.conf.veth0.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth0.router_solicitations=0
sudo sysctl net.ipv6.conf.veth1.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth1.autoconf=0
sudo sysctl net.ipv6.conf.veth1.accept_ra=0
sudo sysctl net.ipv6.conf.veth1.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth1.router_solicitations=0

veth2: /sys/class/net/veth2
/sys/class/net/veth2:
Expand All @@ -478,16 +467,9 @@ veth2: /sys/class/net/veth2
sudo ip link set dev veth3 up
sudo ip link set veth2 mtu 9500
sudo ip link set veth3 mtu 9500
sudo sysctl net.ipv6.conf.veth2.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth2.autoconf=0
sudo sysctl net.ipv6.conf.veth2.accept_ra=0
sudo sysctl net.ipv6.conf.veth2.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth2.router_solicitations=0
sudo sysctl net.ipv6.conf.veth3.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth3.autoconf=0
sudo sysctl net.ipv6.conf.veth3.accept_ra=0
sudo sysctl net.ipv6.conf.veth3.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth3.router_solicitations=0

disable-ipv6:
./disable_veth_ipv6.sh

# Delete veth's, test existence to avoid needless use of sudo
network-clean:
Expand All @@ -508,6 +490,7 @@ install-python-modules:

deploy-ixiac:
cd ../test/third-party/traffic_gen && ./deploy_ixiac.sh
./disable_veth_ipv6.sh

undeploy-ixiac:
cd ../test/third-party/traffic_gen && ./undeploy_ixiac.sh
Expand Down
22 changes: 22 additions & 0 deletions dash-pipeline/disable_veth_ipv6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
echo "Disable IPv6 to suppress Linux control plane noise"
sudo sysctl net.ipv6.conf.veth0.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth0.autoconf=0
sudo sysctl net.ipv6.conf.veth0.accept_ra=0
sudo sysctl net.ipv6.conf.veth0.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth0.router_solicitations=0
sudo sysctl net.ipv6.conf.veth1.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth1.autoconf=0
sudo sysctl net.ipv6.conf.veth1.accept_ra=0
sudo sysctl net.ipv6.conf.veth1.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth1.router_solicitations=0
sudo sysctl net.ipv6.conf.veth2.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth2.autoconf=0
sudo sysctl net.ipv6.conf.veth2.accept_ra=0
sudo sysctl net.ipv6.conf.veth2.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth2.router_solicitations=0
sudo sysctl net.ipv6.conf.veth3.disable_ipv6=1
sudo sysctl net.ipv6.conf.veth3.autoconf=0
sudo sysctl net.ipv6.conf.veth3.accept_ra=0
sudo sysctl net.ipv6.conf.veth3.accept_ra_pinfo=0
sudo sysctl net.ipv6.conf.veth3.router_solicitations=0
1 change: 1 addition & 0 deletions test/third-party/traffic_gen/deployment/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
DOCKER_REGISTRY=ghcr.io/open-traffic-generator
CONTROLLER_VERSION=0.0.1-2934
TRAFFIC_ENGINE_VERSION=1.4.1.26
IFC1=veth1
Expand Down
6 changes: 3 additions & 3 deletions test/third-party/traffic_gen/deployment/ixia-c-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
services:
controller:
image: ixiacom/ixia-c-controller:${CONTROLLER_VERSION:-latest}
image: ${DOCKER_REGISTRY}/ixia-c-controller:${CONTROLLER_VERSION:-latest}
container_name: ixia-c-controller-${USER}
command: --accept-eula
network_mode: "host"
restart: always
traffic_engine_1:
image: ixiacom/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
image: ${DOCKER_REGISTRY}/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
container_name: ixia-c-traffic-engine1-${USER}
network_mode: "host"
restart: always
Expand All @@ -17,7 +17,7 @@ services:
- ARG_IFACE_LIST=virtual@af_packet,${IFC1}
- OPT_NO_HUGEPAGES=Yes
traffic_engine_2:
image: ixiacom/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
image: ${DOCKER_REGISTRY}/ixia-c-traffic-engine:${TRAFFIC_ENGINE_VERSION:-latest}
container_name: ixia-c-traffic-engine2-${USER}
network_mode: "host"
restart: always
Expand Down

0 comments on commit 2ce121e

Please sign in to comment.