vdpa net devices Rx filter change notification with Shadow VQ
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest21 patches 0 repliesNew
- v520 patches 1 replySuperseded
- v419 patches 4 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 19 patches | 3 replies | Superseded | |
| v2 | 19 patches | 22 replies | Superseded | |
| v1 | 22 patches | 2 replies | Superseded |
Changes in v6 from the cover letter
- Add vhost-vdpa-stub.c in case qemu is compiled with no virtio-net support
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | vhost: move descriptor translation to vhost_svq_vring_write_descshw/ | +27 | 0 replies | |
| 2/21 | virtio-net: Expose MAC_TABLE_ENTRIEShw/ include/ | +3 | 0 replies | |
| 3/21 | virtio-net: Expose ctrl virtqueue logichw/ include/ | +53 | 0 replies | |
| 4/21 | vdpa: Avoid compiler to squash reads to used idxhw/ | +2 | 0 replies | |
| 5/21 | vhost: Reorder vhost_svq_kickhw/ | +14 | 0 replies | |
| 6/21 | vhost: Move vhost_svq_kick call to vhost_svq_addhw/ | +1 | 0 replies | |
| 7/21 | vhost: Check for queue full at vhost_svq_addhw/ | +33 | 0 replies | |
| 8/21 | vhost: Decouple vhost_svq_add from VirtQueueElementhw/ | +22 | 0 replies | |
| 9/21 | vhost: Add SVQDescStatehw/ hw/ | +14 | 0 replies | |
| 10/21 | vhost: Track number of descs in SVQDescStatehw/ hw/ | +8 | 0 replies | |
| 11/21 | vhost: add vhost_svq_push_elemhw/ hw/ | +19 | 0 replies | |
| 12/21 | vhost: Expose vhost_svq_addhw/ hw/ | +6 | 0 replies | |
| 13/21 | vhost: add vhost_svq_pollhw/ hw/ | +28 | 0 replies | |
| 14/21 | vhost: Add svq avail_handler callbackhw/ hw/ hw/ | +44 | 0 replies | |
| 15/21 | vdpa: Export vhost_vdpa_dma_map and unmap callshw/ include/ | +7 | 0 replies | |
| 16/21 | vhost-net-vdpa: add stubs for when no virtio-net device is presentnet/ net/ | +23 | 0 replies | |
| 17/21 | vdpa: manual forward CVQ buffershw/ include/ net/ | +63 | 0 replies | |
| 18/21 | vdpa: Buffer CVQ support on shadow virtqueuenet/ | +205 | 0 replies | |
| 19/21 | vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairsnet/ | +20 | 0 replies | |
| 20/21 | vdpa: Add device migration blockerhw/ include/ | +16 | 0 replies | |
| 21/21 | vdpa: Add x-svq to NetdevVhostVDPAOptionsnet/ qapi/ | +77 | 0 replies |
Reviews trailers per patch
5 of 21 patches have a Reviewed-by or Acked-by.
| Patch | Jason Wang | Markus Armbruster |
|---|---|---|
| 1/21 | A-b | |
| 2/21 | ||
| 3/21 | ||
| 4/21 | ||
| 5/21 | ||
| 6/21 | ||
| 7/21 | ||
| 8/21 | A-b | |
| 9/21 | ||
| 10/21 | ||
| 11/21 | ||
| 12/21 | ||
| 13/21 | ||
| 14/21 | ||
| 15/21 | A-b | |
| 16/21 | ||
| 17/21 | ||
| 18/21 | ||
| 19/21 | A-b | |
| 20/21 | ||
| 21/21 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 00/21] vdpa net devices Rx filter change notification with Shadow VQ
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 ten 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 15 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 16 to 18 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.
They could conflict trivially with series [2].
Comments are welcome.
v6:
- Add vhost-vdpa-stub.c in case qemu is compiled with no virtio-net support
v5:
- Add a volatile access modifier to force compiler to emit the read instruction
- Fix use of undefined variable
v4:
- Add a timeout to vhost_svq_poll to not hold BQL forever
v3:
- Replace SVQElement with SVQDescState
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/[email protected]/
[2] https://lists.nongnu.org/archive/html/qemu-devel/2022-07/msg02984.html
Eugenio Pérez (21):
vhost: move descriptor translation to vhost_svq_vring_write_descs
virtio-net: Expose MAC_TABLE_ENTRIES
virtio-net: Expose ctrl virtqueue logic
vdpa: Avoid compiler to squash reads to used idx
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 SVQDescState
vhost: Track number of descs in SVQDescState
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
vhost-net-vdpa: add stubs for when no virtio-net device is present
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 | 210 ++++++++++++----- hw/virtio/vhost-vdpa.c | 26 ++- net/vhost-vdpa-stub.c | 21 ++ net/vhost-vdpa.c | 357 +++++++++++++++++++++++++++-- net/meson.build | 3 +- 10 files changed, 658 insertions(+), 120 deletions(-) create mode 100644 net/vhost-vdpa-stub.c
Signature · 1 line
2.31.1