Thread (17 messages) 17 messages, 5 authors, 2016-07-27

RE: [PATCH v4 5/7] thunderbolt: Networking state machine

From: Levy, Amir (Jer) <hidden>
Date: 2016-07-27 07:31:27
Also in: linux-pci, lkml

On Mon, Jul 25 2016, 01:36 AM, Lukas Wunner wrote:
On Mon, Jul 18, 2016 at 01:00:38PM +0300, Amir Levy wrote:
quoted
+	const unique_id_be proto_uuid =
APPLE_THUNDERBOLT_IP_PROTOCOL_UUID;
quoted
+
+	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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help