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

Re: [Xen-devel] [PATCH v12 5/9] x86: dynamically attach/detach QoS monitoring service for a guest



>>> On 15.07.14 at 07:31, <dongxiao.xu@xxxxxxxxx> wrote:
>> From: Jan Beulich [mailto:JBeulich@xxxxxxxx]
>> Sent: Friday, July 04, 2014 8:06 PM
>> >>> On 04.07.14 at 10:34, <dongxiao.xu@xxxxxxxxx> wrote:
>> > +    case XEN_DOMCTL_pqos_monitor_op:
>> > +        if ( !pqos_monitor_enabled() )
>> > +        {
>> > +            ret = -ENODEV;
>> > +            break;
>> > +        }
>> > +
>> > +        switch ( domctl->u.pqos_monitor_op.cmd )
>> > +        {
>> > +        case XEN_DOMCTL_PQOS_MONITOR_OP_ATTACH:
>> > +            ret = pqos_monitor_alloc_rmid(d);
>> > +            break;
>> 
>> Wouldn't it make sense to return the allocated rmid from this operation?
> 
> The current return type for this function is int, where 0 stands correct, 
> and -EXXX stands for error.
> However rmid is "unsigned int" type, which leads to type conflict.

Only if full 32 bits would ever be used for RMID. But anyway, if the
caller doesn't really care, or if the extra hypercall is no problem, just
leave it the way it is.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.