virtio_net / netmap RX dropping frames

Joe Buehler aspam at cox.net
Thu Oct 26 18:05:07 UTC 2017


Vincenzo Maffione wrote:

> You can have how many threads and processes you want. The constraint is
> that there must not be two threads accessing the same ring at the same
> time. In this case each pktgen is accessing different rings.

Thanks that was very useful info.  I had run this before and got large
frame drop so assumed it was a violation of threading constraints.  So
now I can remove a mutex from my app, which has an RX and TX thread.

Running the two pkt-gen instances, I am getting a lot of RX frame drop.
 Based on counters, the TX frames are making it to the external loopback
device, about 1 million frames/sec, which is looping them all back, but
the macvtap interface on the host that feeds into the
ixgbe/vhost/virtio_net/netmap interface in the VM shows about 80-90% of
them as dropped.  CPU usage is low in the VM, very roughly 25% for the
TX thread and 5% for the RX thread.  The frame rate displayed by pkt-gen
and the CPU displayed by top is bouncing around.

Joe Buehler


More information about the freebsd-net mailing list