virtio: use indirect ring elements
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 4 Mar 2016 18:19:19 +0000 (10:19 -0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 16 Mar 2016 18:05:25 +0000 (19:05 +0100)
commit6dc5de3a6aefba3946fe04368d93994db3f7a5fd
tree02e64049bfafa14a3c261761ef06912d1df30710
parent64a7619ee82a8215db060bcf9b6e04fed51f794f
virtio: use indirect ring elements

The virtio ring in QEMU/KVM is usually limited to 256 entries
and the normal way that virtio driver was queuing mbufs required
nsegs + 1 ring elements. By using the indirect ring element feature
if available, each packet will take only one ring slot even for
multi-segment packets.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_rxtx.c
drivers/net/virtio/virtqueue.h