[libvirt PATCH v6 1/2] news: mention vdpa support

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2fef3f706c..384ee94480 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -43,6 +43,12 @@ v6.9.0 (unreleased) Implement virito-9p shared filesystem using the ``<filesystem/>`` element. + * qemu: Add support for vDPA network devices. + + VMs using the QEMU hypervisor can now specify vDPA network devices using + ``<interface type='vdpa'>``. Host vDPA devices are also now included in the + node device APIs. + * **Improvements** * **Bug fixes** -- 2.26.2

Ensure that the directory is closed when opening chardev path for a vDPA device. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- src/node_device/node_device_udev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index b1b8427c05..eb4ae22151 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1150,6 +1150,7 @@ udevGetVDPACharDev(const char *sysfs_path, struct dirent *entry; DIR *dir = NULL; int direrr; + int ret = -1; if (virDirOpenIfExists(&dir, sysfs_path) <= 0) return -1; @@ -1162,7 +1163,7 @@ udevGetVDPACharDev(const char *sysfs_path, virReportError(VIR_ERR_INTERNAL_ERROR, _("vDPA chardev path '%s' does not exist"), chardev); - return -1; + goto cleanup; } VIR_DEBUG("vDPA chardev is at '%s'", chardev); @@ -1172,9 +1173,13 @@ udevGetVDPACharDev(const char *sysfs_path, } if (direrr < 0) - return -1; + goto cleanup; - return 0; + ret = 0; + + cleanup: + VIR_DIR_CLOSE(dir); + return ret; } static int -- 2.26.2

Oh shoot! I wrote/posted a patch for this (because I'd just finished making a long patch series to use g_autoptr for all DIR*, and wanted to update it to take this into account) on Tuesday or Wednesday, it was reviewed, and I pulled it into master of my local tree; I *thought* I had pushed it so it would be in rc2, but I just looked now and I forgot to push :-( https://www.redhat.com/archives/libvir-list/2020-October/msg01467.html Anyway, if it's okay with you, I'd prefer to push my patch (which doesn't create a cleanup label, since I would be removing it in my "use g_autoptr for DIR*" patches later. If I don't hear anything by sometime tomorrow (Saturday), I'll push my version of the patch. On 10/30/20 4:01 PM, Jonathon Jongsma wrote:
Ensure that the directory is closed when opening chardev path for a vDPA device.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- src/node_device/node_device_udev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index b1b8427c05..eb4ae22151 100644 --- a/src/node_device/node_device_udev.c +++ b/src/node_device/node_device_udev.c @@ -1150,6 +1150,7 @@ udevGetVDPACharDev(const char *sysfs_path, struct dirent *entry; DIR *dir = NULL; int direrr; + int ret = -1;
if (virDirOpenIfExists(&dir, sysfs_path) <= 0) return -1; @@ -1162,7 +1163,7 @@ udevGetVDPACharDev(const char *sysfs_path, virReportError(VIR_ERR_INTERNAL_ERROR, _("vDPA chardev path '%s' does not exist"), chardev); - return -1; + goto cleanup; } VIR_DEBUG("vDPA chardev is at '%s'", chardev);
@@ -1172,9 +1173,13 @@ udevGetVDPACharDev(const char *sysfs_path, }
if (direrr < 0) - return -1; + goto cleanup;
- return 0; + ret = 0; + + cleanup: + VIR_DIR_CLOSE(dir); + return ret; }
static int

On 10/30/20 4:01 PM, Jonathon Jongsma wrote:
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst index 2fef3f706c..384ee94480 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -43,6 +43,12 @@ v6.9.0 (unreleased)
Implement virito-9p shared filesystem using the ``<filesystem/>`` element.
+ * qemu: Add support for vDPA network devices. + + VMs using the QEMU hypervisor can now specify vDPA network devices using + ``<interface type='vdpa'>``. Host vDPA devices are also now included in the + node device APIs.
How about "The node device APIs also now list and provide XML descriptions for vDPA devices." ? Reviewed by: Laine Stump <laine@redhat.com> Let me know if that change is okay with you, and I'll push it.
participants (2)
-
Jonathon Jongsma
-
Laine Stump