HomeFreeBSD

MFC r354552, r354864

Description

MFC r354552, r354864

bhyve: add support for virtio-net mergeable rx buffers

Mergeable rx buffers is a virtio-net feature that allows the hypervisor
to use multiple RX descriptor chains to receive a single receive packet.
Without this feature, a TSO-enabled guest is compelled to publish only
64K (or 32K) long chains, and each of these large buffers is consumed
to receive a single packet, even a very short one. This is a waste of
memory, as a RX queue has room for 256 chains, which means up to 16MB
of buffer memory for each (single-queue) vtnet device.
With the feature on, the guest can publish 2K long chains, and the
hypervisor will merge them as needed.

This change also enables the feature in the netmap backend, which
supports virtio-net offloads. We plan to add support for the
tap backend too.
Note that differently from QEMU/KVM, here we implement one-copy receive,
while QEMU uses two copies.

Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D21007

Details

Provenance
vmaffioneAuthored on
Reviewer
jhb
Differential Revision
D21007: bhyve: add support for virtio-net mergeable rx buffers
Parents
rS355115: Finish implementation of RK3299 clocks.
Branches
Unknown
Tags
Unknown