I confirm the changes in v2 match the cover letter description.
For the whole series, +1. I will follow up with a patch on background
execution of fmt_pkt.
Reviewed-By: Ihar Hrachyshka <[email protected] <mailto:[email protected]>>
On Tue, Nov 14, 2023 at 3:54 PM Mark Michelson <[email protected]
<mailto:[email protected]>> wrote:
Note: v1 and v2 differences are listed at the bottom of this cover
leter.
The introduction of fmt_pkt has made construction of new tests easier
since we no longer need to input packet data manually. fmt_pkt can also
be applied to existing tests to improve their readability and
debuggability. This set of patches converts some old tests to use
fmt_pkt. In the author's opinion, all of these tests are now easier to
read and understand.
The following tests are converted in this series:
* ovn -- allows ACLs to match against vlan-transparent double tagged
traffic L3 fields
* 3 HVs, 1 LS, 3 lports/HV
* VLAN transparency, passthru=true, ARP responder disabled
* VLAN transparency, passthru=true, ND/NA responder disabled
* vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS
* 3 HVs, 3 LS, 3 lports/LS
* portsecurity : 3 HVs, 1 LS, 3 lports/HV
* 1 HV, 1 LS, 2 lport/LS, 1 LR
* 1 HV, 2 LSs, 1 lport/LS, 1 LR
* 2 HVs, 3 LS, 1 lport/LS, 2 peer LRs, static routes
* 2 HVs, 3 LRs connected via LS, static routes
* 2 HVs, 2 LRs connected via LS, gateway router
* icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR
These tests were chosen by opening tests/ovn.at <http://ovn.at>, and
then searching for
hand-constructed packets from the top of the file. These were the first
13 tests that I encountered that
* Were not constructing trivial L2 packets.
* Did not make my brain hurt (I'm looking at you, DHCPv4 test).
Many more tests are potential candidates. These were what I could get
done in the period of time I had to work on them.
There is a drawback to using fmt_pkt: the execution times of all but one
test have become longer. For some reason "vtep: 3 HVs, 1 VIFs/HV, 1 GW,
1 LS" runs faster when converted to use fmt_pkt.
If all of these tests are run together, then we see the following total
execution time:
with fmt_pkt: 1m33.325s
on main branch: 51.591s
Two tests in particular, "3 HVs, 3 LS, 3 lports/LS" and "portsecurity :
3 HVs, 1 LS, 3 lports/HV" are much slower with fmt_pkt when compared to
main. If we eliminate these two tests and run the other 11 together,
then the execution time is:
with fmt_pkt: 39.124s
on main branch: 34.496s
---
Changes between v1 and v2:
* All patches now check for HAVE_SCAPY on the tests they alter.
* Patch 3 in v1 mistranslated an IP address. It is now back to its
intended value.
* Patch 4 now includes the requisite 2 spaces before "# noqa" in
scapy_server.py .
* Patch 6 has had an extra debug line removed.
---
Mark Michelson (13):
tests: Use fmt_pkt in ovn -- allows ACLs to match ...
tests: Use fmt_pkt in 3 HVs, 1 LS, 3 lports/HV.
tests: Use fmt_pkt in VLAN transparency, ...
tests: Use fmt_pkt in VLAN transparency, ...
tests: Use fmt_pkt in vtep: 3 HVs, 1 VIFs/HV, 1 GW, 1 LS.
tests: Use fmt_pkt in 3 HVs, 3 LS, 3 lports/LS.
tests: Use fmt_pkt in portsecurity : 3 HVs, 1 LS, 3 lports/HV.
tests: Use fmt_pkt in 1 HV, 1 LS, 2 lport/LS, 1 LR.
tests: Use fmt_pkt in 1 HV, 2 LSs, 1 lport/LS, 1 LR.
tests: Use fmt_pkt in 2 HVs, 3 LS, 1 lport/LS, ...
tests: Use fmt_pkt in 2 HVs, 3 LRs connected via LS, static routes.
tests: Use fmt_pkt in 2 HVs, 2 LRs connected via LS, gateway router.
tests: Use fmt_pkt in icmp_reply: 1 HVs, 2 LSs, 1 lport/LS, 1 LR.
tests/ovn.at <http://ovn.at> | 711
+++++++++++++++++++++++-------------------
tests/scapy-server.py | 1 +
2 files changed, 386 insertions(+), 326 deletions(-)
--
2.40.1
_______________________________________________
dev mailing list
[email protected] <mailto:[email protected]>
https://mail.openvswitch.org/mailman/listinfo/ovs-dev
<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>