5 # set arch, default to x86_64 if none given
8 # dpdk prefers "arm64" to "aarch64" and does not allow arm64 native target
9 if [ $ARCH == "aarch64" ]; then
16 ROOTDIR=/tmp/TLDK-testing
29 # Try to kill the l4fwd
31 if [ $? -eq "0" ]; then
35 for attempt in {1..5}; do
36 echo "Checking if l4fwd is still alive, attempt nr ${attempt}"
38 if [ $? -eq "1" ]; then
43 echo "l4fwd is still alive, waiting 1 second"
46 if [ "$success" = false ]; then
47 echo "The command sudo pkill l4fwd failed"
53 echo "l4fwd is not running"
56 #mount the hugepages again
58 sudo mount -t hugetlbfs nodev /mnt/huge/
59 test $? -eq 0 || exit 1
63 #run the l4fwd with tag U
64 # need to install libpcap, libpcap-dev to use --vdev
66 if [ "$IPv6_addr" == "NONE" ]; then
67 sudo sh -c "nohup ./tldk/${ARCH}-${MACHINE}-linuxapp-gcc/app/l4fwd --lcore='0' \
68 -n 2 --vdev 'eth_pcap1,rx_pcap=${rx_file},tx_pcap=${tx_file}' \
69 -b ${nic_pci} -- -P -U -R 0x1000 -S 0x1000 -s 0x20 -f ${fe_cfg} -b ${be_cfg} \
70 port=0,lcore=0,rx_offload=0,tx_offload=0,ipv4=${IPv4_addr} &"
71 elif [ "$IPv4_addr" == "NONE" ]; then
72 sudo sh -c "nohup ./tldk/${ARCH}-${MACHINE}-linuxapp-gcc/app/l4fwd --lcore='0' \
73 -n 2 --vdev 'eth_pcap1,rx_pcap=${rx_file},tx_pcap=${tx_file}' \
74 -b ${nic_pci} -- -P -U -R 0x1000 -S 0x1000 -s 0x20 -f ${fe_cfg} -b ${be_cfg} \
75 port=0,lcore=0,rx_offload=0,tx_offload=0,ipv6=${IPv6_addr} &"