On Tue, Nov 16, 2021 at 1:40 PM Daniel P. Berrangé <berra...@redhat.com> wrote: > > On Tue, Nov 16, 2021 at 05:34:50PM +0100, Juan Quintela wrote: > > Daniel P. Berrangé <berra...@redhat.com> wrote: > > > > >> > > >> if (params->zerocopy && > > >> (params->parameters.multifd_compression != > > >> MULTIFD_COMPRESSION_NONE || > > >> migrate_use_tls())) { > > >> error_setg(&err, > > >> "Zerocopy only available for non-compressed non-TLS > > >> multifd migration"); > > >> return false; > > >> } > > >> > > >> You have to do the equivalent of multifd_compression and tls enablement, > > >> to see that zerocopy is not enabled, of course. > > >> > > >> I would prefer to check for QIO_CHANNEL_FEATUR_WRITE_ZEROCPY there, but > > >> I can't see a way of doing that without a qio. > > > > > > I don't think you need to check that feature flag. > > > > Oh, I mean other thing. > > > > When you set "zerocopy" capability, you don't know if the kernel support > > it. My understanding is that the only way to check if it supported is > > here. > > If you reqest it and it isn't supported you'll get an error back from > qio_channel_writev_zerocopy(). That's a bit too late though. > > Ideally we should report an error straight after the migration code > creates the I/O channel, by querying for the feature. > >
Agree. I suggested checking the feature presence where the test is happening in v5, and the other combinations of migration parameters at migrate_params_check() as Juan suggested. What do you think? > Regards, > Daniel > -- > |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| > |: https://libvirt.org -o- https://fstop138.berrange.com :| > |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| > Best regards, Leo