# RE: \[PATCH 020/117\] Staging: hv: vmbus: Support the notion of id tables in vmbus\_match()

- From: KY Srinivasan \<hidden\>
- Date: 2011-07-16 12:54:50 
- List: virtualization
- Page: https://ratatoskr.run/virtualization/2011/07/3742044
- Thread: https://ratatoskr.run/lkml/2011/07/3741749/t/2.md

```text


> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org]
> Sent: Friday, July 15, 2011 10:03 PM
> To: KY Srinivasan
> Cc: gregkh@suse.de; <redacted>;
> devel@linuxdriverproject.org; virtualization@lists.osdl.org; Haiyang Zhang
> Subject: Re: [PATCH 020/117] Staging: hv: vmbus: Support the notion of id tables
> in vmbus_match()
> 
> On Fri, Jul 15, 2011 at 10:46:08AM -0700, K. Y. Srinivasan wrote:
> > +static bool is_not_null_guid(const __u8 *guid)
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < (sizeof(struct hv_vmbus_device_id)); i++)
> > +		if (guid[i] != 0)
> > +			return true;
> > +	return false;
> > +}
> 
> would be nice to add uuid_{le,be}_is_nil helpers to uuid.h.  I also
> think simply using a memcpy might be more efficient than the hand-rolled
> loop.
Having a helper function would be great. With regards to the efficiency of this loop,
this is not a performance critical path. If people feel strongly about this, I could 
change this; perhaps as a separate patch on top of this series; I don't want to send a large
patch-set like this again.

Regards,

K. Y
```
