Skip to content

Commit

Permalink
Several minor updates related to the Packet Testing Framework (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo authored May 25, 2024
1 parent c74e0a0 commit 812c356
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ dpdk-devbind.py
dpdk-hugepages.py
dictionary.dic
venv/
ptf/log/
4 changes: 2 additions & 2 deletions ptf/.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
# Contains all dependencies for PTF tests
TESTER_DOCKER_IMG=bess-upf-ptf
# Address of the server running the UPF
UPF_ADDR=${UPF_ADDR:-"10.128.13.128:10514"}
UPF_ADDR=${UPF_ADDR:-"192.168.150.1:10514"}
# Address of the server running TRex for traffic generation
TREX_ADDR=${TREX_ADDR:-"10.128.13.27"}
TREX_ADDR=${TREX_ADDR:-"192.168.150.2"}
10 changes: 4 additions & 6 deletions ptf/config/docker_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ipaddrs=(198.18.0.1/30 198.19.0.1/30)
# MAC addresses of gateway interface(s)
#
# In the order of (s1u/n3 sgi/n6)
macaddrs=(b4:96:91:b2:06:40 b4:96:91:b2:06:41)
macaddrs=(40:a6:b7:20:4f:b8 40:a6:b7:20:4f:b9)

# Static IP addresses of the neighbors of gateway interface(s)
#
Expand All @@ -44,7 +44,7 @@ nhipaddrs=(198.18.0.2 198.19.0.2)
# Static MAC addresses of the neighbors of gateway interface(s)
#
# In the order of (n-s1u/n3 n-sgi/n6)
nhmacaddrs=(b4:96:91:b4:4b:08 b4:96:91:b4:4b:09)
nhmacaddrs=(40:a6:b7:20:c8:24 40:a6:b7:20:c8:25)

# IPv4 route table entries in cidr format per port
#
Expand Down Expand Up @@ -166,7 +166,7 @@ sudo rm -rf /var/run/netns/pause
make docker-build

if [ "$mode" == 'dpdk' ]; then
DEVICES=${DEVICES:-'--device=/dev/vfio/48 --device=/dev/vfio/49 --device=/dev/vfio/vfio'}
DEVICES=${DEVICES:-'--device=/dev/vfio/115 --device=/dev/vfio/116 --device=/dev/vfio/vfio'}
PRIVS='--cap-add IPC_LOCK'

elif [[ "$mode" == 'af_xdp' || "$mode" == 'cndp' ]]; then
Expand Down Expand Up @@ -217,10 +217,8 @@ if [ "$mode" == 'cndp' ]; then
fi

# Run bessd
#--cpuset-cpus=42-43 \
docker run --name bess -td --restart unless-stopped \
-v /lib/firmware/updates/intel/ice/ddp:/lib/firmware/updates/intel/ice/ddp \
--cpuset-cpus=22-23 \
--cpuset-cpus=24-27 \
--ulimit memlock=-1 -v /dev/hugepages:/dev/hugepages \
-v "$PWD/conf":/opt/bess/bessctl/conf \
--net container:pause \
Expand Down
10 changes: 5 additions & 5 deletions ptf/config/trex-cfg-for-ptf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

- version: 2
port_limit: 2
interfaces: ['4b:00.0', '4b:00.1']
interfaces: ['86:00.0', '86:00.1']
port_bandwidth_gb: 10
c: 2
port_info:
- src_mac: b4:96:91:b4:4b:08
dest_mac: b4:96:91:b2:06:40
- src_mac: b4:96:91:b4:4b:09
dest_mac: b4:96:91:b2:06:41
- src_mac: 40:a6:b7:20:c8:24
dest_mac: 40:a6:b7:20:4f:b8
- src_mac: 40:a6:b7:20:c8:25
dest_mac: 40:a6:b7:20:4f:b9
memory:
mbuf_64 : 4096
mbuf_128 : 512
Expand Down
2 changes: 1 addition & 1 deletion ptf/config/upf.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"sim": {
// At this point we can simulate either N3/N6 or N3/N9 traffic, so choose n6 or n9 below
"core": "n6",
"max_sessions": 5000,
"max_sessions": 50000,
"start_ue_ip": "16.0.0.1",
"start_enb_ip": "11.1.1.129",
"start_aupf_ip": "13.1.1.199",
Expand Down
6 changes: 3 additions & 3 deletions ptf/tests/linerate/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from ipaddress import IPv4Address

# MAC addresses
TREX_SRC_MAC = "b4:96:91:b4:4b:09" # Source MAC address for DL traffic
UPF_CORE_MAC = "b4:96:91:b2:06:41" # MAC address of N6 for the UPF/BESS
UPF_ACCESS_MAC = "b4:96:91:b2:06:40" # MAC address of N3 for the UPF/BESS
TREX_SRC_MAC = "40:a6:b7:20:c8:25" # Source MAC address for DL traffic
UPF_CORE_MAC = "40:a6:b7:20:4f:b9" # MAC address of N6 for the UPF/BESS
UPF_ACCESS_MAC = "40:a6:b7:20:4f:b8" # MAC address of N3 for the UPF/BESS

# Port setup
TREX_SENDER_PORT = 1
Expand Down

0 comments on commit 812c356

Please sign in to comment.