Support virtqueue creation(enablement) after DRIVER_OK stage
paravmellanox opened this issue · comments
Currently, a virtqueue must be enabled before driver has set the
DRIVER_OK status bit.
spec citation to section "Driver Requirements: Device Initialization"
"Perform device-specific setup, including discovery of virtqueues
for the device, optional per-bus setup, reading and possibly writing
the deviceâs virtio configuration space, and population of virtqueues."
This implies that a virtqueue must be enabled before reaching the
DRIVER_OK stage. There was no explicit mention about ability to
enable the virtqueue after DRIVER_OK stage.
In following use cases, creating a virtqueue after DRIVER_OK phase is
desired.
Use cases:
- Dynamically create aq when administrative commands to be used.
- Dynamically create the net device tx/rxq when device is
opened when deploying for a container.
In a container, number of virtqueues to be used may be <= max queues. - Dynamically create flow filter queues of netdevice when
ARFS or ethtool filters are enabled as listed in [1]. - Dynamically create rtc functionality related read virtqueue only
when net device when time stamping to be used. - When XDP program is set, one can create additional XDP specific
queues without affecting existing queues.
Solution:
https://lists.oasis-open.org/archives/virtio-comment/202310/msg00183.html
Patches link for automation:
https://lore.kernel.org/virtio-comment/20231017143135.758523-1-parav@nvidia.com/T/#t