On 08/28/2014 12:38 PM, Pavel Hrdina wrote: > Signed-off-by: Pavel Hrdina <[email protected]> > ---
> @@ -395,6 +405,10 @@ static virNetClientProgramEvent remoteEvents[] = {
> remoteDomainBuildEventDeviceRemoved,
> sizeof(remote_domain_event_device_removed_msg),
> (xdrproc_t)xdr_remote_domain_event_device_removed_msg },
> + { REMOTE_PROC_DOMAIN_EVENT_CPUTUNE,
> + remoteDomainBuildEventCputune,
> + sizeof(remote_domain_event_cputune_msg),
> + (xdrproc_t)xdr_remote_domain_event_cputune_msg },
> /* All events above here are legacy events, missing the callback
> * ID, which means the server has a single global registration and
> * we do full filtering in the client. If the server lacks
This hunk is wrong. Per the comment, you do NOT want an old-style event.
> @@ -476,6 +490,10 @@ static virNetClientProgramEvent remoteEvents[] = {
> remoteDomainBuildEventBlockJob2,
> sizeof(remote_domain_event_block_job_2_msg),
> (xdrproc_t)xdr_remote_domain_event_block_job_2_msg },
> + { REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CPUTUNE,
> + remoteDomainBuildEventCallbackCputune,
> + sizeof(remote_domain_event_callback_cputune_msg),
> + (xdrproc_t)xdr_remote_domain_event_callback_cputune_msg },
because the new-style is sufficient. [Or are you planning on backporting
this to an earlier version of libvirt that didn't support new-style events?]
> +
> + /**
> + * @generate: both
> + * @acl: none
> + */
> + REMOTE_PROC_DOMAIN_EVENT_CPUTUNE = 345,
Likewise, this RPC should not be needed.
> +
> + /**
> + * @generate: both
> + * @acl: none
> + */
> + REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CPUTUNE = 346
and this one should be 345, and is sufficient.
Look at commit 1bfe73a126e; that covers the bare minimum that you need
to add a new-style event without worrying about back-compat to old libvirt.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
