Re: [PATCH 2/4] event: introduce new event for cputune

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/04/2014 05:28 AM, Eric Blake wrote:
> On 08/28/2014 12:38 PM, Pavel Hrdina wrote:
>> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
>> ---
> 
>> @@ -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?]
> 

Thanks, I didn't know that the difference is only for backward
compatibility. I'm not planning to backport it to older libvirt so I'll
drop the old-style event code.

Pavel

> 
>> +
>> +    /**
>> +     * @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.
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]