All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/2] Packed ring for virtio
@ 2018-02-23 11:17 ` Tiwei Bie
  0 siblings, 0 replies; 40+ messages in thread
From: Tiwei Bie @ 2018-02-23 11:17 UTC (permalink / raw)
  To: mst, virtualization, linux-kernel, netdev
  Cc: jasowang, wexu, jfreimann, tiwei.bie

Hello everyone,

This RFC implements a subset of packed ring which is described at
https://github.com/oasis-tcs/virtio-docs/blob/master/virtio-v1.1-packed-wd08.pdf

The code was tested with DPDK vhost (testpmd/vhost-PMD) implemented
by Jens at http://dpdk.org/ml/archives/dev/2018-January/089417.html
Minor changes are needed for the vhost code, e.g. to kick the guest.

It's not a complete implementation, here is what's missing:

- Device area and driver area
- VIRTIO_RING_F_INDIRECT_DESC
- VIRTIO_F_NOTIFICATION_DATA
- Virtio devices except net are not tested
- See FIXME in the code for more details

Thanks!

Best regards,
Tiwei Bie

Tiwei Bie (2):
  virtio: introduce packed ring defines
  virtio_ring: support packed ring

 drivers/virtio/virtio_ring.c       | 699 ++++++++++++++++++++++++++++++++-----
 include/linux/virtio_ring.h        |   8 +-
 include/uapi/linux/virtio_config.h |  18 +-
 include/uapi/linux/virtio_ring.h   |  68 ++++
 4 files changed, 703 insertions(+), 90 deletions(-)

-- 
2.14.1

^ permalink raw reply	[flat|nested] 40+ messages in thread
* [PATCH RFC 0/2] Packed ring for vhost
@ 2018-02-14  2:37 Jason Wang
  2018-02-14  2:37   ` Jason Wang
  0 siblings, 1 reply; 40+ messages in thread
From: Jason Wang @ 2018-02-14  2:37 UTC (permalink / raw)
  To: mst, virtualization, linux-kernel, netdev
  Cc: wexu, jfreimann, tiwei.bie, Jason Wang

Hi all:

This RFC implement a subset of packed ring which was described at
https://github.com/oasis-tcs/virtio-docs/blob/master/virtio-v1.1-packed-wd07.pdf
. The code were tested with pmd implement by Jens at
http://dpdk.org/ml/archives/dev/2018-January/089417.html. Minor
change was needed for pmd codes to kick virtqueue since it assumes a
busy polling backend.

Test were done between localhost and guest. Testpmd (rxonly) in guest
reports 2.4Mpps. Testpmd (txonly) repots about 2.1Mpps.

It's not a complete implemention, here's what were missed:

- Device Area
- Driver Area
- Descriptor indirection
- Zerocopy may not be functional
- Migration path is not tested
- Vhost devices except for net
- vIOMMU can not work (mainly because the metadata prefetch is not
  implemented).
- See FIXME/TODO in the codes for more details
- No batching or other optimizations were implemented

For a quick prototype, this series open code the tracking of warp
counter and descriptor index at net device. This will be addressed in
the future by:

- Move get_rx_bufs() from net.c to vhost.c
- Let vhost_get_vq_desc() returns vring_used_elem instad of head id

With the above, we can hide the internal (at least part of) vring
layout from specific device.

Please review.

Thanks

Jason Wang (2):
  virtio: introduce packed ring defines
  vhost: packed ring support

 drivers/vhost/net.c                |  14 +-
 drivers/vhost/vhost.c              | 351 ++++++++++++++++++++++++++++++++++---
 drivers/vhost/vhost.h              |   6 +-
 include/uapi/linux/virtio_config.h |   9 +
 include/uapi/linux/virtio_ring.h   |  17 ++
 5 files changed, 369 insertions(+), 28 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2018-03-21  7:37 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-23 11:17 [PATCH RFC 0/2] Packed ring for virtio Tiwei Bie
2018-02-23 11:17 ` Tiwei Bie
2018-02-23 11:18 ` [PATCH RFC 1/2] virtio: introduce packed ring defines Tiwei Bie
2018-02-23 11:18   ` Tiwei Bie
2018-02-27  8:54   ` Jens Freimann
2018-02-27  8:54   ` Jens Freimann
2018-02-27  9:18     ` Jens Freimann
2018-02-27  9:18     ` Jens Freimann
2018-02-27 12:01     ` Tiwei Bie
2018-02-27 12:01     ` Tiwei Bie
2018-02-27 20:28     ` Michael S. Tsirkin
2018-02-27 20:28     ` Michael S. Tsirkin
2018-02-27  9:26   ` David Laight
2018-02-27  9:26   ` David Laight
2018-02-27 11:31     ` Tiwei Bie
2018-02-27 11:31       ` Tiwei Bie
2018-02-23 11:18 ` [PATCH RFC 2/2] virtio_ring: support packed ring Tiwei Bie
2018-02-23 11:18   ` Tiwei Bie
2018-03-16  4:03   ` Jason Wang
2018-03-16  4:03     ` Jason Wang
2018-03-16  6:10     ` Tiwei Bie
2018-03-16  6:10       ` Tiwei Bie
2018-03-16  6:44       ` Jason Wang
2018-03-16  6:44       ` Jason Wang
2018-03-16  7:40         ` Tiwei Bie
2018-03-16  7:40         ` Tiwei Bie
2018-03-16  8:34           ` Jason Wang
2018-03-16  8:34             ` Jason Wang
2018-03-16 10:04             ` Tiwei Bie
2018-03-16 11:36               ` Jason Wang
2018-03-16 11:36                 ` Jason Wang
2018-03-16 14:30                 ` Michael S. Tsirkin
2018-03-16 14:30                   ` Michael S. Tsirkin
2018-03-21  7:35                   ` Tiwei Bie
2018-03-21  7:35                     ` Tiwei Bie
2018-03-21  7:30                 ` Tiwei Bie
2018-03-21  7:30                   ` Tiwei Bie
2018-03-16 10:04             ` Tiwei Bie
  -- strict thread matches above, loose matches on Subject: below --
2018-02-14  2:37 [PATCH RFC 0/2] Packed ring for vhost Jason Wang
2018-02-14  2:37 ` [PATCH RFC 1/2] virtio: introduce packed ring defines Jason Wang
2018-02-14  2:37   ` Jason Wang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.