veth.sh (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) | veth.sh (98cb12eb52a780e682bea8372fdb2912c08132dd) |
---|---|
1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 | 1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0 3 |
4BPF_FILE="../bpf/xdp_dummy.bpf.o" | 4BPF_FILE="xdp_dummy.o" |
5readonly STATS="$(mktemp -p /tmp ns-XXXXXX)" 6readonly BASE=`basename $STATS` 7readonly SRC=2 8readonly DST=1 9readonly DST_NAT=100 10readonly NS_SRC=$BASE$SRC 11readonly NS_DST=$BASE$DST 12 --- 200 unchanged lines hidden (view full) --- 213 ;; 214 "s") 215 STRESS=$OPTARG 216 ;; 217 esac 218done 219 220if [ ! -f ${BPF_FILE} ]; then | 5readonly STATS="$(mktemp -p /tmp ns-XXXXXX)" 6readonly BASE=`basename $STATS` 7readonly SRC=2 8readonly DST=1 9readonly DST_NAT=100 10readonly NS_SRC=$BASE$SRC 11readonly NS_DST=$BASE$DST 12 --- 200 unchanged lines hidden (view full) --- 213 ;; 214 "s") 215 STRESS=$OPTARG 216 ;; 217 esac 218done 219 220if [ ! -f ${BPF_FILE} ]; then |
221 echo "Missing ${BPF_FILE}. Build bpf selftest first" | 221 echo "Missing ${BPF_FILE}. Run 'make' first" |
222 exit 1 223fi 224 225[ $CPUS -lt 2 ] && echo "Only one CPU available, some tests will be skipped" 226[ $STRESS -gt 0 -a $CPUS -lt 3 ] && echo " stress test will be skipped, too" 227 228create_ns 229chk_gro_flag "default - gro flag" $SRC off --- 131 unchanged lines hidden --- | 222 exit 1 223fi 224 225[ $CPUS -lt 2 ] && echo "Only one CPU available, some tests will be skipped" 226[ $STRESS -gt 0 -a $CPUS -lt 3 ] && echo " stress test will be skipped, too" 227 228create_ns 229chk_gro_flag "default - gro flag" $SRC off --- 131 unchanged lines hidden --- |