Lines Matching +full:rx +full:- +full:input +full:- +full:m
2 # SPDX-License-Identifier: GPL-2.0
7 readonly BASE="ns-$(mktemp -u XXXXXX)"
25 local -r jobs="$(jobs -p)"
26 [ -n "${jobs}" ] && kill -1 ${jobs} 2>/dev/null
41 ip -n $ns link set dev lo up
44 ip netns exec $ns sysctl -qw net.ipv6.conf.default.router_solicitations=0
45 ip netns exec $ns sysctl -qw net.ipv6.conf.all.router_solicitations=0
52 ip -n $BASE$ns link set dev veth$ns up
53 ip -n $BASE$ns addr add dev veth$ns $BM_NET_V4$ns/24
54 ip -n $BASE$ns addr add dev veth$ns $BM_NET_V6$ns/64 nodad
56 ip -n $NS_DST link set veth$DST xdp object ${BPF_FILE} section xdp 2>/dev/null
60 local -r netns=$1
61 local -r bm_dev=$2
62 local -r bm_rem_addr=$3
63 local -r vxlan_dev=$4
64 local -r vxlan_id=$5
65 local -r vxlan_port=4789
67 ip -n $netns link set dev $bm_dev up
68 ip -n $netns link add dev $vxlan_dev type vxlan id $vxlan_id \
70 ip -n $netns link set dev $vxlan_dev up
79 # note that 3 - $SRC == $DST and 3 - $DST == $SRC
80 create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V4$((3 - $ns)) vxlan$ns 4
81 ip -n $BASE$ns addr add dev vxlan$ns $OL_NET_V4$ns/24
84 create_vxlan_endpoint $BASE$ns veth$ns $BM_NET_V6$((3 - $ns)) vxlan6$ns 6
85 ip -n $BASE$ns addr add dev vxlan6$ns $OL_NET_V6$ns/24 nodad
89 local addr_dst=$(ip -j -n $BASE$DST link show dev vxlan6$DST |jq -r '.[]["address"]')
90 local addr_src=$(ip -j -n $BASE$SRC link show dev vxlan6$SRC |jq -r '.[]["address"]')
91 ip -n $BASE$DST neigh add dev vxlan6$DST lladdr $addr_src $OL_NET_V6$SRC
92 ip -n $BASE$SRC neigh add dev vxlan6$SRC lladdr $addr_dst $OL_NET_V6$DST
103 local -r msg=$1
104 local -r dst=$2
105 local -r pkts=$3
106 local -r vxpkts=$4
109 local rx_family="-4"
110 local family=-4
114 printf "%-40s" "$msg"
117 # rx program does not support '-6' and implies ipv6 usage by default
119 family=-6
125 [ -n "$bind" ] && rx_args="$rx_args -b $bind"
128 # Always expect 10 UDP frames on RX side as rx socket does
130 ip netns exec $NS_DST $ipt -A INPUT -p udp --dport 4789
131 ip netns exec $NS_DST $ipt -A INPUT -p udp --dport 8000
132 ip netns exec $NS_DST ./udpgso_bench_rx -C 2000 -R 100 -n 10 -l 1300 $rx_args &
135 ip netns exec $NS_SRC ./udpgso_bench_tx $family -M 1 -s 13000 -S 1300 -D $dst
139 if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
145 local rcv=`ip netns exec $NS_DST $ipt"-save" -c | grep 'dport 8000' | \
146 sed -e 's/\[//' -e 's/:.*//'`
148 echo " fail - received $rcv packets, expected $pkts"
153 local vxrcv=`ip netns exec $NS_DST $ipt"-save" -c | grep 'dport 4789' | \
154 sed -e 's/\[//' -e 's/:.*//'`
157 if [ $vxrcv -lt $vxpkts -o $vxrcv -gt $((vxpkts + 3)) ]; then
158 echo " fail - received $vxrcv vxlan packets, expected $vxpkts"
166 local -r msg=$1
167 local -r dst=$2
168 local family=-4
170 printf "%-40s" "$msg"
171 if [ $NPROCS -lt 2 ]; then
172 echo " skip - needed 2 CPUs found $NPROCS"
176 is_ipv6 $dst && family=-6
180 ip netns exec $NS_DST bash -c "echo 2 > /sys/class/net/veth$DST/queues/rx-0/rps_cpus"
181 ip netns exec $NS_DST taskset 0x2 ./udpgso_bench_rx -C 2000 -R 100 &
184 ip netns exec $NS_SRC taskset 0x1 ./udpgso_bench_tx $family -l 3 -S 1300 -D $dst
188 if [ ${rets} -ne 0 ] || [ ${retc} -ne 0 ]; then
210 ping -w 1 -c 1 ::1 > /dev/null 2>&1 || PING="ping6"
220 ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
221 ip netns exec $NS_DST ethtool -K veth$DST rx-gro-list on
230 ip -n $NS_DST addr add dev veth$DST $BM_NET$DST_NAT/$SUFFIX
231 ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
232 ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
233 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $BM_NET$DST_NAT \
234 -j DNAT --to-destination $BM_NET$DST
240 ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
245 ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
246 ip netns exec $NS_DST ethtool -K veth$DST rx-gro-list on
252 ip -n $NS_DST addr add dev $VXDEV$DST $OL_NET$DST_NAT/$SUFFIX
253 ip netns exec $NS_DST ethtool -K veth$DST generic-receive-offload on
254 ip netns exec $NS_DST ethtool -K veth$DST rx-udp-gro-forwarding on
255 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $OL_NET$DST_NAT \
256 -j DNAT --to-destination $OL_NET$DST
260 ip netns exec $NS_SRC $PING -q -c 1 $OL_NET$DST_NAT >/dev/null