[PATCH] ch: Report VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER as supported

Michal Privoznik posted 1 patch 2 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cbc615cf9760317e12ca89ca021f4388c2ff396a.1644411487.git.mprivozn@redhat.com
src/ch/ch_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] ch: Report VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER as supported
Posted by Michal Privoznik 2 years, 2 months ago
Even though the CH driver doesn't implement virNetworkUpdate()
API, when it does it will see the arguments in correct order.
This is similar to other drivers that don't implement the API,
like ESX, libxl, LXC, etc. Enabling this driver feature stops
clients from swapping the arguments (see comment in the API for
more info).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/ch/ch_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ch/ch_driver.c b/src/ch/ch_driver.c
index e751ddba19..bb2959d108 100644
--- a/src/ch/ch_driver.c
+++ b/src/ch/ch_driver.c
@@ -934,6 +934,7 @@ chConnectSupportsFeature(virConnectPtr conn,
 
     switch ((virDrvFeature) feature) {
         case VIR_DRV_FEATURE_TYPED_PARAM_STRING:
+        case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
             return 1;
         case VIR_DRV_FEATURE_MIGRATION_V2:
         case VIR_DRV_FEATURE_MIGRATION_V3:
@@ -949,7 +950,6 @@ chConnectSupportsFeature(virConnectPtr conn,
         case VIR_DRV_FEATURE_REMOTE:
         case VIR_DRV_FEATURE_REMOTE_CLOSE_CALLBACK:
         case VIR_DRV_FEATURE_REMOTE_EVENT_CALLBACK:
-        case VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER:
         default:
             return 0;
     }
-- 
2.34.1

Re: [PATCH] ch: Report VIR_DRV_FEATURE_NETWORK_UPDATE_HAS_CORRECT_ORDER as supported
Posted by Andrea Bolognani 2 years, 2 months ago
On Wed, Feb 09, 2022 at 01:58:07PM +0100, Michal Privoznik wrote:
> Even though the CH driver doesn't implement virNetworkUpdate()
> API, when it does it will see the arguments in correct order.
> This is similar to other drivers that don't implement the API,
> like ESX, libxl, LXC, etc. Enabling this driver feature stops
> clients from swapping the arguments (see comment in the API for
> more info).
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
> ---
>  src/ch/ch_driver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization