virtio_net / netmap RX dropping frames

Vincenzo Maffione v.maffione at gmail.com
Thu Oct 26 07:41:25 UTC 2017


I guess you are using a FreeBSD guest. Is this the case? If you have the
chance, try a linux guest to check if virtio-net works better there (I've
used netmap on the netmap-patched virtio-net in Linux guests, never tried
on FreeBSD).
The netmap ring size is just the NIC ring size. If you change the
virtio-net NIC ring size (sysctl on FreeBSD, I guess).

Anyway, for your specific use-case (VM accessing the physical 10G NIC)
there is a way better solution, which is the netmap passthrough.
Check out the virtualization.pdf in this tutorial
https://github.com/vmaffione/netmap-tutorial.
You basically need to run QEMU (with KVM enabled), saying that you want to
pass through a netmap port (e.g. netmap:ethX in your case) to a VM. Then in
the FreeBSD VM you will see a "ptnet0" interface, where you can use pkt-gen.
You should get a 10x improvement if properly configured.

Cheers,
  Vincenzo

2017-10-25 23:02 GMT+02:00 Joe Buehler <aspam at cox.net>:

> I am running virtio_net (netmap-modified) on top of netmap (latest) in a
> KVM virtual machine.  The host adapter is Intel 82599ES 10G and the VM
> is connected to it via macvtap.
>
> My test setup is a small program in the VM sending frames out to an
> external loopback device and watching what comes back.
>
> I am running at fairly low frame rates (200k frames / sec) and seeing RX
> frame drops and high latency (a few milliseconds).  The TX frames are
> all making it to the external loopback device (based on device counters)
> but the macvtap device in the RX path is reporting dropped frames, the
> count agreeing with what the test program observes.
>
> I guess my first question has to do with ring sizes.  The netmap API is
> reporting 255 buffers in the RX and TX rings.  How do I increase this
> substantially?
>
> Joe
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>



-- 
Vincenzo Maffione


More information about the freebsd-net mailing list