All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/19] vdpa net devices Rx filter change notification with Shadow VQ
@ 2022-07-14 16:31 Eugenio Pérez
  2022-07-14 16:31 ` [PATCH v2 01/19] vhost: move descriptor translation to vhost_svq_vring_write_descs Eugenio Pérez
                   ` (18 more replies)
  0 siblings, 19 replies; 42+ messages in thread
From: Eugenio Pérez @ 2022-07-14 16:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Gautam Dawar, Paolo Bonzini, Michael S. Tsirkin,
	Stefano Garzarella, Eric Blake, Zhu Lingshan, Stefan Hajnoczi,
	Markus Armbruster, Cornelia Huck, Parav Pandit, Laurent Vivier,
	Liuxiangdong, Eli Cohen, Cindy Lu, Harpreet Singh Anand,
	Jason Wang, Gonglei (Arei)

Control virtqueue is used by networking device for accepting various
commands from the driver. It's a must to support advanced configurations.

Rx filtering event is issues by qemu when device's MAC address changed once and
the previous one has not been queried by external agents.

Shadow VirtQueue (SVQ) already makes possible tracking the state of virtqueues,
effectively intercepting them so qemu can track what regions of memory are
dirty because device action and needs migration. However, this does not solve
networking device state seen by the driver because CVQ messages, like changes
on MAC addresses from the driver.

This series uses SVQ infrastructure to intercept networking control messages
used by the device. This way, qemu is able to update VirtIONet device model and
react to them. In particular, this series enables rx filter change
notification.

This is a prerequisite to achieve net vdpa device with CVQ live migration.
It's a stripped down version of [1], with error paths checked and no migration
enabled.

First nine patches reorder and clean code base so its easier to apply later
ones. No functional change should be noticed from these changes.

Patches from 11 to 14 enable SVQ API to make other parts of qemu to interact
with it. In particular, they will be used by vhost-vdpa net to handle CVQ
messages.

Patches 15 to 17 enable the update of the virtio-net device model for each
CVQ message acknowledged by the device.

Last patches enable x-svq parameter, forbidding device migration since it is
not restored in the destination's vdpa device yet. This will be added in later
series, using this work.

Comments are welcome.

v2:
- (Comments from series [1]).
- Active poll for CVQ answer instead of relay on async used callback
- Do not offer a new buffer to device but reuse qemu's
- Use vhost_svq_add instead of not needed vhost_svq_inject
- Delete used and detach callbacks, not needed anymore
- Embed members of SVQElement in VirtQueueElement
- Reuse the same buffers for all CVQ commands

[1] https://patchwork.kernel.org/project/qemu-devel/cover/20220706184008.1649478-1-eperezma@redhat.com/

Eugenio Pérez (19):
  vhost: move descriptor translation to vhost_svq_vring_write_descs
  virtio-net: Expose MAC_TABLE_ENTRIES
  virtio-net: Expose ctrl virtqueue logic
  vhost: Reorder vhost_svq_kick
  vhost: Move vhost_svq_kick call to vhost_svq_add
  vhost: Check for queue full at vhost_svq_add
  vhost: Decouple vhost_svq_add from VirtQueueElement
  vhost: Add SVQElement
  vhost: Track number of descs in SVQElement
  vhost: add vhost_svq_push_elem
  vhost: Expose vhost_svq_add
  vhost: add vhost_svq_poll
  vhost: Add svq avail_handler callback
  vdpa: Export vhost_vdpa_dma_map and unmap calls
  vdpa: manual forward CVQ buffers
  vdpa: Buffer CVQ support on shadow virtqueue
  vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs
  vdpa: Add device migration blocker
  vdpa: Add x-svq to NetdevVhostVDPAOptions

 qapi/net.json                      |   9 +-
 hw/virtio/vhost-shadow-virtqueue.h |  52 ++++-
 include/hw/virtio/vhost-vdpa.h     |   8 +
 include/hw/virtio/virtio-net.h     |   7 +
 hw/net/virtio-net.c                |  85 ++++---
 hw/virtio/vhost-shadow-virtqueue.c | 216 +++++++++++------
 hw/virtio/vhost-vdpa.c             |  25 +-
 net/vhost-vdpa.c                   | 357 +++++++++++++++++++++++++++--
 8 files changed, 635 insertions(+), 124 deletions(-)

-- 
2.31.1




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

end of thread, other threads:[~2022-07-22 13:33 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-14 16:31 [PATCH v2 00/19] vdpa net devices Rx filter change notification with Shadow VQ Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 01/19] vhost: move descriptor translation to vhost_svq_vring_write_descs Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 02/19] virtio-net: Expose MAC_TABLE_ENTRIES Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 03/19] virtio-net: Expose ctrl virtqueue logic Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 04/19] vhost: Reorder vhost_svq_kick Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 05/19] vhost: Move vhost_svq_kick call to vhost_svq_add Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 06/19] vhost: Check for queue full at vhost_svq_add Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 07/19] vhost: Decouple vhost_svq_add from VirtQueueElement Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 08/19] vhost: Add SVQElement Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 09/19] vhost: Track number of descs in SVQElement Eugenio Pérez
2022-07-15  4:10   ` Jason Wang
2022-07-15  5:41     ` Eugenio Perez Martin
2022-07-14 16:31 ` [PATCH v2 10/19] vhost: add vhost_svq_push_elem Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 11/19] vhost: Expose vhost_svq_add Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 12/19] vhost: add vhost_svq_poll Eugenio Pérez
2022-07-15  3:58   ` Jason Wang
2022-07-15  5:38     ` Eugenio Perez Martin
2022-07-15  8:47       ` Jason Wang
2022-07-15 17:05         ` Eugenio Perez Martin
2022-07-19  7:38           ` Jason Wang
2022-07-19  8:42             ` Eugenio Perez Martin
2022-07-19  8:48               ` Jason Wang
2022-07-19  9:09                 ` Eugenio Perez Martin
2022-07-14 16:31 ` [PATCH v2 13/19] vhost: Add svq avail_handler callback Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 14/19] vdpa: Export vhost_vdpa_dma_map and unmap calls Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 15/19] vdpa: manual forward CVQ buffers Eugenio Pérez
2022-07-15  4:08   ` Jason Wang
2022-07-15  5:33     ` Eugenio Perez Martin
2022-07-15  8:44       ` Jason Wang
2022-07-15  9:01         ` Eugenio Perez Martin
2022-07-14 16:31 ` [PATCH v2 16/19] vdpa: Buffer CVQ support on shadow virtqueue Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 17/19] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs Eugenio Pérez
2022-07-14 16:31 ` [PATCH v2 18/19] vdpa: Add device migration blocker Eugenio Pérez
2022-07-15  4:03   ` Jason Wang
2022-07-15  5:39     ` Eugenio Perez Martin
2022-07-15  8:50       ` Jason Wang
2022-07-15  9:05         ` Eugenio Perez Martin
2022-07-15 16:13           ` Eugenio Perez Martin
2022-07-22 13:29         ` Eugenio Perez Martin
2022-07-14 16:31 ` [PATCH v2 19/19] vdpa: Add x-svq to NetdevVhostVDPAOptions Eugenio Pérez
2022-07-15  4:13   ` Jason Wang
2022-07-15  6:09     ` Eugenio Perez Martin

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.