diff options
author | Kumar Amber <kumar.amber@intel.com> | 2021-07-15 21:36:13 +0530 |
---|---|---|
committer | Ian Stokes <ian.stokes@intel.com> | 2021-07-16 11:30:31 +0100 |
commit | 50be6715c0835f11dadc03f1ca4f90777bad6843 (patch) | |
tree | b992df5f63da22746c0c573d1bb50ead7c10017d /Documentation/topics | |
parent | a395b132b7d7a84b9c683d051b118a12b4860c46 (diff) | |
download | openvswitch-50be6715c0835f11dadc03f1ca4f90777bad6843.tar.gz |
test/sytem-dpdk: Add unit test for mfex autovalidator
Tests:
6: OVS-DPDK - MFEX Autovalidator
7: OVS-DPDK - MFEX Autovalidator Fuzzy
8: OVS-DPDK - MFEX Configuration
Added a new directory to store the PCAP file used
in the tests and a script to generate the fuzzy traffic
type pcap to be used in fuzzy unit test.
Signed-off-by: Kumar Amber <kumar.amber@intel.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ian Stokes <ian.stokes@intel.com>
Diffstat (limited to 'Documentation/topics')
-rw-r--r-- | Documentation/topics/dpdk/bridge.rst | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Documentation/topics/dpdk/bridge.rst b/Documentation/topics/dpdk/bridge.rst index 8c500c504..913b3e6f6 100644 --- a/Documentation/topics/dpdk/bridge.rst +++ b/Documentation/topics/dpdk/bridge.rst @@ -346,3 +346,59 @@ A compile time option is available in order to test it with the OVS unit test suite. Use the following configure option :: $ ./configure --enable-mfex-default-autovalidator + +Unit Test Miniflow Extract +++++++++++++++++++++++++++ + +Unit test can also be used to test the workflow mentioned above by running +the following test-case in tests/system-dpdk.at :: + + make check-dpdk TESTSUITEFLAGS='-k MFEX' + OVS-DPDK - MFEX Autovalidator + +The unit test uses mulitple traffic type to test the correctness of the +implementaions. + +The MFEX commands can also be tested for negative and positive cases to +verify that the MFEX set command does not allow for incorrect parameters. +A user can directly run the following configuration test case in +tests/system-dpdk.at :: + + make check-dpdk TESTSUITEFLAGS='-k MFEX' + OVS-DPDK - MFEX Configuration + +Running Fuzzy test with Autovalidator ++++++++++++++++++++++++++++++++++++++ + +Fuzzy tests can also be done on miniflow extract with the help of +auto-validator and Scapy. The steps below describes the steps to +reproduce the setup with IP being fuzzed to generate packets. + +Scapy is used to create fuzzy IP packets and save them into a PCAP :: + + pkt = fuzz(Ether()/IP()/TCP()) + +Set the miniflow extract to autovalidator using :: + + $ ovs-appctl dpif-netdev/miniflow-parser-set autovalidator + +OVS is configured to receive the generated packets :: + + $ ovs-vsctl add-port br0 pcap0 -- \ + set Interface pcap0 type=dpdk options:dpdk-devargs=net_pcap0 + "rx_pcap=fuzzy.pcap" + +With this workflow, the autovalidator will ensure that all MFEX +implementations are classifying each packet in exactly the same way. +If an optimized MFEX implementation causes a different miniflow to be +generated, the autovalidator has ovs_assert and logging statements that +will inform about the issue. + +Unit Fuzzy test with Autovalidator ++++++++++++++++++++++++++++++++++++++ + +Unit test can also be used to test the workflow mentioned above by running +the following test-case in tests/system-dpdk.at :: + + make check-dpdk TESTSUITEFLAGS='-k MFEX' + OVS-DPDK - MFEX Autovalidator Fuzzy |