Skip to content

Commit ce10320

Browse files
andy-shevdavem330
authored andcommitted
hv_sock: Use consistent types for UUIDs
The rest of Hyper-V code is using new types for UUID handling. Convert hv_sock as well. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Dexuan Cui <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 21e8a49 commit ce10320

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

net/vmw_vsock/hyperv_transport.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ struct hvs_send_buf {
7777
VMBUS_PKT_TRAILER_SIZE)
7878

7979
union hvs_service_id {
80-
uuid_le srv_id;
80+
guid_t srv_id;
8181

8282
struct {
8383
unsigned int svm_port;
84-
unsigned char b[sizeof(uuid_le) - sizeof(unsigned int)];
84+
unsigned char b[sizeof(guid_t) - sizeof(unsigned int)];
8585
};
8686
};
8787

8888
/* Per-socket state (accessed via vsk->trans) */
8989
struct hvsock {
9090
struct vsock_sock *vsk;
9191

92-
uuid_le vm_srv_id;
93-
uuid_le host_srv_id;
92+
guid_t vm_srv_id;
93+
guid_t host_srv_id;
9494

9595
struct vmbus_channel *chan;
9696
struct vmpacket_descriptor *recv_desc;
@@ -159,21 +159,21 @@ struct hvsock {
159159
#define MIN_HOST_EPHEMERAL_PORT (MAX_HOST_LISTEN_PORT + 1)
160160

161161
/* 00000000-facb-11e6-bd58-64006a7986d3 */
162-
static const uuid_le srv_id_template =
163-
UUID_LE(0x00000000, 0xfacb, 0x11e6, 0xbd, 0x58,
164-
0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3);
162+
static const guid_t srv_id_template =
163+
GUID_INIT(0x00000000, 0xfacb, 0x11e6, 0xbd, 0x58,
164+
0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3);
165165

166-
static bool is_valid_srv_id(const uuid_le *id)
166+
static bool is_valid_srv_id(const guid_t *id)
167167
{
168-
return !memcmp(&id->b[4], &srv_id_template.b[4], sizeof(uuid_le) - 4);
168+
return !memcmp(&id->b[4], &srv_id_template.b[4], sizeof(guid_t) - 4);
169169
}
170170

171-
static unsigned int get_port_by_srv_id(const uuid_le *svr_id)
171+
static unsigned int get_port_by_srv_id(const guid_t *svr_id)
172172
{
173173
return *((unsigned int *)svr_id);
174174
}
175175

176-
static void hvs_addr_init(struct sockaddr_vm *addr, const uuid_le *svr_id)
176+
static void hvs_addr_init(struct sockaddr_vm *addr, const guid_t *svr_id)
177177
{
178178
unsigned int port = get_port_by_srv_id(svr_id);
179179

@@ -316,7 +316,7 @@ static void hvs_close_connection(struct vmbus_channel *chan)
316316

317317
static void hvs_open_connection(struct vmbus_channel *chan)
318318
{
319-
uuid_le *if_instance, *if_type;
319+
guid_t *if_instance, *if_type;
320320
unsigned char conn_from_host;
321321

322322
struct sockaddr_vm addr;

0 commit comments

Comments
 (0)