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

Re: [Xen-devel] [PATCH v16 2/7] remus: introduce remus device



On Fri, 2014-07-18 at 18:06 +0800, Hongyang Yang wrote:

> > My proposal above would do away with the need for match to look at the
> > kind at all.  It would only iterate over the subkinds which are
> > relevant to that kind.
> >
> > What are the other purposes you mention ?  I didn't notice them.
> 
> I intend to keep this *kind* because I will use them for filter out
> what kind of device the remus abstract layer need to handle.
> 
> take the code v17.6(refer to above link) as an example:
> 
> typedef enum libxl__remus_device_kind {
>      LIBXL__REMUS_DEVICE_NIC  = (1 << 0),
>      LIBXL__REMUS_DEVICE_DISK = (1 << 1),
> } libxl__remus_device_kind;

I've not been following closely so I make no comment on whether you
actually should or shouldn't need a kind in this code (I'll leave that
to Ian) but if you do need it then this is needlessly duplicating
libxl__device_kind AFAICT.

If you really do need a bit field then you can use
1<<LIBXL__DEVICE_KIND_FOO.

Ian.


_______________________________________________
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®.