Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1451096
| From | "Levy, Amir (Jer)" <amir.jer.levy@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v4 5/7] thunderbolt: Networking state machine |
| Date | 2016-07-27 09:40 +0200 |
| Message-ID | <rZrBE-4PS-37@gated-at.bofh.it> (permalink) |
| References | <rWdES-4PX-5@gated-at.bofh.it> <rWdES-4PX-11@gated-at.bofh.it> <rYAdX-54g-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 25 2016, 01:36 AM, Lukas Wunner wrote:
> On Mon, Jul 18, 2016 at 01:00:38PM +0300, Amir Levy wrote:
> > + const unique_id_be proto_uuid =
> APPLE_THUNDERBOLT_IP_PROTOCOL_UUID;
> > +
> > + if (memcmp(proto_uuid, hdr->apple_tbt_ip_proto_uuid,
> > + sizeof(proto_uuid)) != 0) {
>
> You may want to use the uuid_be data type provided by <linux/uuid.h>
> instead of rolling your own, as well as the helper uuid_be_cmp() defined
> ibidem.
>
All the messages in Thunderbolt consist BE DWORDs.
I didn't find uuid definition in the kernel that accurately describes the uuid structure in the messages, which is 4 BE DWORDs.
But on the other hand, all the driver does is copy/compare of uuids, and it can treat uuids as byte array (i.e. uuid_be).
I'll change it in the next patches.
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
RE: [PATCH v4 5/7] thunderbolt: Networking state machine "Levy, Amir (Jer)" <amir.jer.levy@intel.com> - 2016-07-27 09:40 +0200
csiph-web