]> git.proxmox.com Git - ovs.git/blob - tests/system-afxdp.at
Fix ovs-dpctl-top by removing 3 wrong hunks in py3-compat.patch.
[ovs.git] / tests / system-afxdp.at
1 AT_BANNER([AF_XDP])
2
3 AT_SETUP([AF_XDP - infinite re-addition of failed ports])
4 AT_KEYWORDS([afxdp infinite])
5 OVS_TRAFFIC_VSWITCHD_START()
6
7 AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
8
9 ADD_NAMESPACES(at_ns0, at_ns1)
10 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
11
12 AT_CHECK([ovs-vsctl del-port ovs-p0])
13 AT_CHECK([ovs-vsctl add-port br0 ovs-p0 -- \
14 set interface ovs-p0 type=afxdp options:n_rxq=42],
15 [0], [], [stderr])
16 OVS_WAIT_UNTIL([grep "ovs-p0: could not set configuration" ovs-vswitchd.log])
17 sleep 5
18 AT_CHECK([grep "ovs-p0: could not set configuration" ovs-vswitchd.log | wc -l],
19 [0], [1
20 ])
21
22 OVS_TRAFFIC_VSWITCHD_STOP(["/ovs-p0: Too big 'n_rxq'/d
23 /ovs-p0: could not set configuration/d"])
24 AT_CLEANUP
25
26
27 AT_SETUP([AF_XDP - ping between pmd and non-pmd ports])
28 AT_KEYWORDS([afxdp nonpmd])
29 OVS_TRAFFIC_VSWITCHD_START()
30
31 AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
32
33 ADD_NAMESPACES(at_ns0, at_ns1)
34 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
35 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")
36
37 AT_CHECK([ovs-vsctl del-port ovs-p0])
38 AT_CHECK([ovs-vsctl add-port br0 ovs-p0 -- \
39 set interface ovs-p0 type=afxdp-nonpmd options:n_rxq=1],
40 [0], [], [stderr])
41
42 NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 10.1.1.2 | FORMAT_PING], [0], [dnl
43 3 packets transmitted, 3 received, 0% packet loss, time 0ms
44 ])
45
46 OVS_TRAFFIC_VSWITCHD_STOP
47 AT_CLEANUP