[ovs-dev] [PATCH 2/2] system-dpdk: Use dummy-pmd port for packet injection.

David Marchand david.marchand at redhat.com
Tue Nov 23 13:16:25 UTC 2021


Hello Ilya,

On Fri, Nov 19, 2021 at 4:45 PM Ilya Maximets <i.maximets at ovn.org> wrote:
>
> On 11/18/21 10:16, Maxime Coquelin wrote:
> > Hi David,
> >
> > On 9/27/21 15:57, David Marchand wrote:
> >> net_pcap is not always available in DPDK (like, in a dev
> >> environment when you forgot to install the libpcap-devel).
> >> On the other hand, OVS already has its own way to inject packets into a
> >> bridge. Let's make use of it.
> >>
> >> While at it, convert "known" packets from pcap to scapy so that the
> >> injected packets can be updated without having to read/write a pcap file.
> >>
> >> Note: this change also (avoids) fixes a python exception in PcapWriter
> >> with scapy 2.4.3 that comes from EPEL.
> >>
> >> Suggested-by: Ilya Maximets <i.maximets at ovn.org>
> >> Signed-off-by: David Marchand <david.marchand at redhat.com>
> >> ---
> >>   tests/automake.mk           |   5 ++--
> >>   tests/mfex_fuzzy.py         |  32 ---------------------
> >>   tests/mfex_pkts.py          |  56 ++++++++++++++++++++++++++++++++++++
> >>   tests/pcap/mfex_test.pcap   | Bin 416 -> 0 bytes
> >>   tests/system-dpdk-macros.at |   4 +--
> >>   tests/system-dpdk.at        |  26 ++++++++++++++---
> >>   6 files changed, 82 insertions(+), 41 deletions(-)
> >>   delete mode 100755 tests/mfex_fuzzy.py
> >>   create mode 100755 tests/mfex_pkts.py
> >>   delete mode 100644 tests/pcap/mfex_test.pcap
> >>
> >
> > Thanks for the patch, I overall agree with it.
> >
> > I plan to reuse the fuzz feature of tests/mfex_pkts.py script for a new
> > test. As discussed off-list, we may want to rename it with a more
> > generic name.
> >
> > What about gen_pkts.py?
> >
> > Maxime
> >
>
> FYI, there is also ./tests/flowgen.py that is kind of similar.
> It generates some common packet types to actually test the
> flow extractor.  So, the purpose is also kind of the same.
> It's not fuzzy though, but that might be a plus for some cases.
> Another upside of it is that it also generates IEEE 802.3 frames
> in addition to Ethernet II.

Thanks, I was not aware of this other script.


Did you have a chance to look at my patch?

Now that I tested it with sse4.2 enabled, I can see the "fuzzy" test
fails because of a timeout: the test expects 100k packet in 30s.
I wonder why 100k random data is better than 1k like for fixed packets...

In any case, I am not sure this patch goes in the right direction,
passing packets as strings and invoking netdev-dummy/receive is rather
ugly.


-- 
David Marchand



More information about the dev mailing list