Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2017 09:41:23 +0200
From:      Vincenzo Maffione <v.maffione@gmail.com>
To:        Joe Buehler <aspam@cox.net>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: virtio_net / netmap RX dropping frames
Message-ID:  <CA%2B_eA9ho3rJih5hwW%2Bcg9KmmNcnm6csMtLESvNMEpkK7AjvkGQ@mail.gmail.com>
In-Reply-To: <59F0FBEE.6030008@cox.net>
References:  <59F0FBEE.6030008@cox.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
>



-- 
Vincenzo Maffione



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B_eA9ho3rJih5hwW%2Bcg9KmmNcnm6csMtLESvNMEpkK7AjvkGQ>