2018-09-14 10:12:02 -04:00
|
|
|
m4_define([CONFIGURE_VETH_OFFLOADS],
|
|
|
|
[AT_CHECK([ethtool -K $1 tx off], [0], [ignore], [ignore])])
|
|
|
|
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_BANNER([OVS-DPDK unit tests])
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
2018-09-14 10:12:02 -04:00
|
|
|
dnl Check if EAL init is successful
|
2019-10-23 10:19:39 -07:00
|
|
|
AT_SETUP([OVS-DPDK - EAL init])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_KEYWORDS([dpdk])
|
2018-09-14 10:11:57 -04:00
|
|
|
OVS_DPDK_PRE_CHECK()
|
2018-04-20 14:46:27 +01:00
|
|
|
OVS_DPDK_START()
|
|
|
|
AT_CHECK([grep "DPDK Enabled - initializing..." ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "EAL" ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "DPDK Enabled - initialized" ovs-vswitchd.log], [], [stdout])
|
2018-09-14 10:11:57 -04:00
|
|
|
OVS_VSWITCHD_STOP(["/Global register is changed during/d
|
|
|
|
/EAL: Invalid NUMA socket, default to 0/d
|
2018-09-14 10:11:59 -04:00
|
|
|
/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
|
2021-11-30 14:12:04 +00:00
|
|
|
/EAL: No free hugepages reported in hugepages-1048576kB/d
|
|
|
|
/TELEMETRY: No legacy callbacks, legacy socket not created/d"])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Add standard DPDK PHY port
|
2019-10-23 10:19:39 -07:00
|
|
|
AT_SETUP([OVS-DPDK - add standard DPDK port])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_KEYWORDS([dpdk])
|
|
|
|
|
2018-09-14 10:11:57 -04:00
|
|
|
OVS_DPDK_PRE_PHY_SKIP()
|
2018-04-20 14:46:27 +01:00
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br10 phy0 -- set Interface phy0 type=dpdk options:dpdk-devargs=$(cat PCI_ADDR)], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br10 phy0], [], [stdout], [stderr])
|
2021-11-30 14:12:04 +00:00
|
|
|
OVS_VSWITCHD_STOP(["/does not exist. The Open vSwitch kernel module is probably not loaded./d
|
2018-04-20 14:46:27 +01:00
|
|
|
/Failed to enable flow control/d
|
2018-05-03 17:35:44 +01:00
|
|
|
/Global register is changed during/d
|
2018-09-14 10:11:59 -04:00
|
|
|
/EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !/d
|
2018-05-03 17:35:44 +01:00
|
|
|
/EAL: No free hugepages reported in hugepages-1048576kB/d
|
2021-11-30 14:12:04 +00:00
|
|
|
/TELEMETRY: No legacy callbacks, legacy socket not created/d"])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Add vhost-user-client port
|
2019-10-23 10:19:39 -07:00
|
|
|
AT_SETUP([OVS-DPDK - add vhost-user-client port])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_KEYWORDS([dpdk])
|
2018-09-14 10:11:58 -04:00
|
|
|
OVS_DPDK_PRE_CHECK()
|
2018-04-20 14:46:27 +01:00
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
|
2018-09-14 10:12:01 -04:00
|
|
|
AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient0 -- set Interface dpdkvhostuserclient0 type=dpdkvhostuserclient options:vhost-server-path=$OVS_RUNDIR/dpdkvhostclient0], [], [stdout], [stderr])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
sleep 2
|
|
|
|
|
|
|
|
dnl Parse log file
|
|
|
|
AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout])
|
2018-09-14 10:12:01 -04:00
|
|
|
AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout])
|
2018-04-20 14:46:27 +01:00
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
|
2018-09-14 10:12:00 -04:00
|
|
|
OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
|
|
|
|
\@Failed to enable flow control@d
|
2018-09-14 10:12:01 -04:00
|
|
|
\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory@d
|
2018-09-14 10:12:00 -04:00
|
|
|
\@Global register is changed during@d
|
|
|
|
\@EAL: Invalid NUMA socket, default to 0@d
|
|
|
|
\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
|
2021-11-30 14:12:04 +00:00
|
|
|
\@EAL: No free hugepages reported in hugepages-1048576kB@d
|
|
|
|
\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
|
2018-04-20 14:46:27 +01:00
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
2018-09-14 10:12:02 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Ping vhost-user port
|
2019-10-23 10:19:39 -07:00
|
|
|
AT_SETUP([OVS-DPDK - ping vhost-user ports])
|
2018-09-14 10:12:02 -04:00
|
|
|
AT_KEYWORDS([dpdk])
|
|
|
|
OVS_DPDK_PRE_CHECK()
|
2021-01-19 12:01:22 +00:00
|
|
|
AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null])
|
2018-09-14 10:12:02 -04:00
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Find number of sockets
|
|
|
|
AT_CHECK([lscpu], [], [stdout])
|
|
|
|
AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) {printf "512,"}; print "512"}' > NUMA_NODE])
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuser0 -- set Interface dpdkvhostuser0 \
|
|
|
|
type=dpdkvhostuser], [],
|
|
|
|
[stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
|
|
|
|
dnl Parse log file
|
|
|
|
AT_CHECK([grep "VHOST_CONFIG: vhost-user server: socket created" \
|
|
|
|
ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "Socket $OVS_RUNDIR/dpdkvhostuser0 created for vhost-user port dpdkvhostuser0" \
|
|
|
|
ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "VHOST_CONFIG: bind to $OVS_RUNDIR/dpdkvhostuser0" ovs-vswitchd.log], [],
|
|
|
|
[stdout])
|
|
|
|
|
|
|
|
dnl Set up namespaces
|
|
|
|
ADD_NAMESPACES(ns1, ns2)
|
|
|
|
|
|
|
|
dnl Add veth device
|
|
|
|
ADD_VETH(tap1, ns2, br10, "172.31.110.12/24")
|
|
|
|
|
|
|
|
dnl Execute testpmd in background
|
|
|
|
on_exit "pkill -f -x -9 'tail -f /dev/null'"
|
2021-01-19 12:01:22 +00:00
|
|
|
tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
|
2018-09-14 10:12:02 -04:00
|
|
|
--vdev="net_virtio_user,path=$OVS_RUNDIR/dpdkvhostuser0" \
|
|
|
|
--vdev="net_tap0,iface=tap0" --file-prefix page0 \
|
|
|
|
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuser0.log 2>&1 &
|
|
|
|
|
2021-11-25 11:01:27 +01:00
|
|
|
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
|
2021-12-14 21:42:56 +01:00
|
|
|
OVS_WAIT_UNTIL([ip link show dev tap0 | grep -qw LOWER_UP])
|
2018-09-14 10:12:02 -04:00
|
|
|
|
|
|
|
dnl Move the tap devices to the namespaces
|
|
|
|
AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip link set tap0 netns ns1], [], [stdout], [stderr])
|
|
|
|
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show | grep tap0], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link set tap0 up], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip addr add 172.31.110.11/24 dev tap0], [],
|
|
|
|
[stdout], [stderr])
|
|
|
|
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns2 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ping -c 4 -I tap0 172.31.110.12], [], [stdout],
|
|
|
|
[stderr])
|
|
|
|
|
|
|
|
dnl Clean up the testpmd now
|
|
|
|
pkill -f -x -9 'tail -f /dev/null'
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuser0], [], [stdout], [stderr])
|
|
|
|
OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
|
|
|
|
\@Failed to enable flow control@d
|
|
|
|
\@VHOST_CONFIG: recvmsg failed@d
|
|
|
|
\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostuser0: No such file or directory@d
|
|
|
|
\@Global register is changed during@d
|
|
|
|
\@dpdkvhostuser ports are considered deprecated; please migrate to dpdkvhostuserclient ports.@d
|
|
|
|
\@failed to enumerate system datapaths: No such file or directory@d
|
|
|
|
\@EAL: Invalid NUMA socket, default to 0@d
|
|
|
|
\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
|
2021-11-30 14:12:04 +00:00
|
|
|
\@EAL: No free hugepages reported in hugepages-1048576kB@d
|
|
|
|
\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
|
2018-09-14 10:12:02 -04:00
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Ping vhost-user-client port
|
2019-10-23 10:19:39 -07:00
|
|
|
AT_SETUP([OVS-DPDK - ping vhost-user-client ports])
|
2018-09-14 10:12:02 -04:00
|
|
|
AT_KEYWORDS([dpdk])
|
|
|
|
OVS_DPDK_PRE_CHECK()
|
2021-01-19 12:01:22 +00:00
|
|
|
AT_SKIP_IF([! which dpdk-testpmd >/dev/null 2>/dev/null])
|
2018-09-14 10:12:02 -04:00
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Find number of sockets
|
|
|
|
AT_CHECK([lscpu], [], [stdout])
|
|
|
|
AT_CHECK([cat stdout | grep "NUMA node(s)" | awk '{c=1; while (c++<$(3)) {printf "512,"}; print "512"}' > NUMA_NODE])
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br10 -- set bridge br10 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br10 dpdkvhostuserclient0 -- set Interface \
|
|
|
|
dpdkvhostuserclient0 \
|
|
|
|
type=dpdkvhostuserclient \
|
|
|
|
options:vhost-server-path=$OVS_RUNDIR/dpdkvhostclient0], [],
|
|
|
|
[stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
|
|
|
|
dnl Parse log file
|
|
|
|
AT_CHECK([grep "VHOST_CONFIG: vhost-user client: socket created" ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "vHost User device 'dpdkvhostuserclient0' created in 'client' mode, using client socket" ovs-vswitchd.log], [], [stdout])
|
|
|
|
AT_CHECK([grep "VHOST_CONFIG: $OVS_RUNDIR/dpdkvhostclient0: reconnecting..." ovs-vswitchd.log], [], [stdout])
|
|
|
|
|
|
|
|
dnl Set up namespaces
|
|
|
|
ADD_NAMESPACES(ns1, ns2)
|
|
|
|
|
|
|
|
dnl Add veth device
|
|
|
|
ADD_VETH(tap1, ns2, br10, "172.31.110.12/24")
|
|
|
|
|
|
|
|
dnl Execute testpmd in background
|
|
|
|
on_exit "pkill -f -x -9 'tail -f /dev/null'"
|
2021-01-19 12:01:22 +00:00
|
|
|
tail -f /dev/null | dpdk-testpmd --socket-mem="$(cat NUMA_NODE)" --no-pci\
|
2018-09-14 10:12:02 -04:00
|
|
|
--vdev="net_virtio_user,path=$OVS_RUNDIR/dpdkvhostclient0,server=1" \
|
|
|
|
--vdev="net_tap0,iface=tap0" --file-prefix page0 \
|
|
|
|
--single-file-segments -- -a >$OVS_RUNDIR/testpmd-dpdkvhostuserclient0.log 2>&1 &
|
|
|
|
|
2021-11-25 11:01:27 +01:00
|
|
|
OVS_WAIT_UNTIL([grep "virtio is now ready for processing" ovs-vswitchd.log])
|
2021-12-14 21:42:56 +01:00
|
|
|
OVS_WAIT_UNTIL([ip link show dev tap0 | grep -qw LOWER_UP])
|
2018-09-14 10:12:02 -04:00
|
|
|
|
|
|
|
dnl Move the tap devices to the namespaces
|
|
|
|
AT_CHECK([ps aux | grep testpmd], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip link set tap0 netns ns1], [], [stdout], [stderr])
|
|
|
|
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show | grep tap0], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link set tap0 up], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ip addr add 172.31.110.11/24 dev tap0], [],
|
|
|
|
[stdout], [stderr])
|
|
|
|
|
|
|
|
AT_CHECK([ip netns exec ns1 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns2 ip link show], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ip netns exec ns1 ping -c 4 -I tap0 172.31.110.12], [], [stdout],
|
|
|
|
[stderr])
|
|
|
|
|
|
|
|
dnl Clean up the testpmd now
|
|
|
|
pkill -f -x -9 'tail -f /dev/null'
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br10 dpdkvhostuserclient0], [], [stdout], [stderr])
|
|
|
|
OVS_VSWITCHD_STOP(["\@does not exist. The Open vSwitch kernel module is probably not loaded.@d
|
|
|
|
\@Failed to enable flow control@d
|
|
|
|
\@VHOST_CONFIG: recvmsg failed@d
|
|
|
|
\@VHOST_CONFIG: failed to connect to $OVS_RUNDIR/dpdkvhostclient0: No such file or directory@d
|
|
|
|
\@Global register is changed during@d
|
|
|
|
\@dpdkvhostuser ports are considered deprecated; please migrate to dpdkvhostuserclient ports.@d
|
|
|
|
\@failed to enumerate system datapaths: No such file or directory@d
|
|
|
|
\@EAL: Invalid NUMA socket, default to 0@d
|
|
|
|
\@EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles !@d
|
2021-11-30 14:12:04 +00:00
|
|
|
\@EAL: No free hugepages reported in hugepages-1048576kB@d
|
|
|
|
\@TELEMETRY: No legacy callbacks, legacy socket not created@d"])
|
2018-09-14 10:12:02 -04:00
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
2021-07-15 21:36:13 +05:30
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Add standard DPDK PHY port
|
|
|
|
AT_SETUP([OVS-DPDK - MFEX Autovalidator])
|
|
|
|
AT_KEYWORDS([dpdk])
|
|
|
|
|
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dpdk options:dpdk-devargs=net_pcap1,rx_pcap=$srcdir/pcap/mfex_test.pcap,infinite_rx=1], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
|
|
|
|
AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set autovalidator], [0], [dnl
|
|
|
|
Miniflow extract implementation set to autovalidator.
|
|
|
|
])
|
|
|
|
|
|
|
|
OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packets=\s*\K\d+'` -ge 1000])
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
|
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
dnl Add standard DPDK PHY port
|
|
|
|
AT_SETUP([OVS-DPDK - MFEX Autovalidator Fuzzy])
|
|
|
|
AT_KEYWORDS([dpdk])
|
2021-07-19 19:10:38 +05:30
|
|
|
AT_SKIP_IF([! $PYTHON3 -c "import scapy"], [], [])
|
2021-07-15 21:36:13 +05:30
|
|
|
AT_CHECK([$PYTHON3 $srcdir/mfex_fuzzy.py $srcdir], [], [stdout])
|
|
|
|
OVS_DPDK_START()
|
|
|
|
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dpdk options:dpdk-devargs=net_pcap1,rx_pcap=$srcdir/pcap/fuzzy.pcap,infinite_rx=1], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
|
|
|
|
AT_SKIP_IF([! ovs-appctl dpif-netdev/miniflow-parser-get | sed 1,4d | grep "True"], [], [dnl
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set autovalidator], [0], [dnl
|
|
|
|
Miniflow extract implementation set to autovalidator.
|
|
|
|
])
|
|
|
|
|
|
|
|
OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics | grep -oP 'rx_packets=\s*\K\d+'` -ge 100000])
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
|
|
|
|
AT_CLEANUP
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl --------------------------------------------------------------------------
|
|
|
|
AT_SETUP([OVS-DPDK - MFEX Configuration])
|
|
|
|
AT_KEYWORDS([dpdk])
|
|
|
|
OVS_DPDK_START()
|
|
|
|
AT_CHECK([ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0xC])
|
|
|
|
dnl Add userspace bridge and attach it to OVS
|
|
|
|
AT_CHECK([ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev])
|
|
|
|
AT_CHECK([ovs-vsctl add-port br0 p1 -- set Interface p1 type=dpdk options:dpdk-devargs=net_pcap1,rx_pcap=$srcdir/pcap/mfex_test.pcap,infinite_rx=1], [], [stdout], [stderr])
|
|
|
|
AT_CHECK([ovs-vsctl show], [], [stdout])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set scalar 1], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown argument 1.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 6 study 300 xyz], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: invalid study_pkt_cnt value: xyz.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set scalar abcd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown argument abcd.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 0 scalar abcd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown argument abcd.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: -pmd option requires a thread id argument.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set tudy abcd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown argument abcd.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 7 study abcd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: invalid study_pkt_cnt value: abcd.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 3 study], [0], [dnl
|
|
|
|
Miniflow extract implementation set to study, on pmd thread 3, studying 128 packets.
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 3 study 512], [0], [dnl
|
|
|
|
Miniflow extract implementation set to study, on pmd thread 3, studying 512 packets.
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set study 512], [0], [dnl
|
|
|
|
Miniflow extract implementation set to study, studying 512 packets.
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set study], [0], [dnl
|
|
|
|
Miniflow extract implementation set to study, studying 128 packets.
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 3 autovalidator], [0], [dnl
|
|
|
|
Miniflow extract implementation set to autovalidator, on pmd thread 3.
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd zero study], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: miniflow extract parser not changed, PMD thread passed is not valid: 'zero'. Pass a valid pmd thread ID.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 1], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: no miniflow extract name provided. Output of miniflow-parser-get shows implementation list.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 1 superstudy], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown miniflow extract implementation superstudy.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set superstudy], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: unknown miniflow extract implementation superstudy.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
AT_CHECK([ovs-appctl dpif-netdev/miniflow-parser-set -pmd 1 study -pmd], [2],
|
|
|
|
[], [dnl
|
|
|
|
Error: invalid study_pkt_cnt value: -pmd.
|
|
|
|
ovs-appctl: ovs-vswitchd: server returned an error
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Clean up
|
|
|
|
AT_CHECK([ovs-vsctl del-port br0 p1], [], [stdout], [stderr])
|
|
|
|
AT_CLEANUP dnl
|
|
|
|
dnl --------------------------------------------------------------------------
|