Internships/ProjectIdeas/SVQCVQSupport

From QEMU
Revision as of 00:55, 7 February 2023 by Stefanha (talk | contribs) (Created page with "=== Add virtio-net Control Virtqueue state restore support === '''Summary:''' Implement virtio-net Control Virtqueue state restore in Shadow Virtqueue mode The virtio-net de...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Add virtio-net Control Virtqueue state restore support

Summary: Implement virtio-net Control Virtqueue state restore in Shadow Virtqueue mode

The virtio-net device has a control virtqueue (CVQ) for changing device parameters like the Ethernet MAC address or the number of active queues. These parameter changes are inherently hard to track on vDPA net devices if the CVQ passed through, because QEMU is not aware of CVQ activity. In this situation, QEMU is not able to migrate these devices, as it is not able to tell the actual state of the device.

Shadow Virtqueue (SVQ) allows QEMU to offer an emulated queue to the device, effectively forwarding the descriptors of that communication, tracking the device internal state, and being able to migrate it to a new destination QEMU.

To restore that state in the destination, SVQ is able to send these messages as regular CVQ commands. The code to understand and parse virtio-net CVQ commands is already in QEMU as part of its emulated device, but the code to send some of the new state is not, and some features are missing. There is already code to restore basic commands like MAC [1] or multiqueue [2], and it is easy to use them as a template.

Your goal is to implement these missing virtio-net CVQ commands:

  • VIRTIO_NET_CTRL_RX family, to control receive mode.
  • VIRTIO_NET_CTRL_GUEST_OFFLOADS
  • VIRTIO_NET_CTRL_VLAN family
  • VIRTIO_NET_CTRL_MQ_HASH config
  • VIRTIO_NET_CTRL_MQ_RSS config

Links:

Details:

  • Project size: 175 hours (small)
  • Skill level: intermediate
  • Language: C
  • Mentor: Eugenio Perez Martin <eperezma@redhat.com> (eperezma on IRC)
  • Suggested by: Eugenio Perez Martin <eperezma@redhat.com>