Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Lines | vmbus_channel_process_offer(hv_vmbus_channel *new_channel) | ||||
int ret; | int ret; | ||||
uint32_t relid; | uint32_t relid; | ||||
relid = new_channel->offer_msg.child_rel_id; | relid = new_channel->offer_msg.child_rel_id; | ||||
/* | /* | ||||
* Make sure this is a new offer | * Make sure this is a new offer | ||||
*/ | */ | ||||
mtx_lock(&hv_vmbus_g_connection.channel_lock); | mtx_lock(&hv_vmbus_g_connection.channel_lock); | ||||
if (relid == 0) { | |||||
/* | |||||
* XXX channel0 will not be processed; skip it. | |||||
*/ | |||||
printf("VMBUS: got channel0 offer\n"); | |||||
} else { | |||||
hv_vmbus_g_connection.channels[relid] = new_channel; | hv_vmbus_g_connection.channels[relid] = new_channel; | ||||
} | |||||
TAILQ_FOREACH(channel, &hv_vmbus_g_connection.channel_anchor, | TAILQ_FOREACH(channel, &hv_vmbus_g_connection.channel_anchor, | ||||
list_entry) { | list_entry) { | ||||
if (memcmp(&channel->offer_msg.offer.interface_type, | if (memcmp(&channel->offer_msg.offer.interface_type, | ||||
&new_channel->offer_msg.offer.interface_type, | &new_channel->offer_msg.offer.interface_type, | ||||
sizeof(hv_guid)) == 0 && | sizeof(hv_guid)) == 0 && | ||||
memcmp(&channel->offer_msg.offer.interface_instance, | memcmp(&channel->offer_msg.offer.interface_instance, | ||||
&new_channel->offer_msg.offer.interface_instance, | &new_channel->offer_msg.offer.interface_instance, | ||||
▲ Show 20 Lines • Show All 626 Lines • Show Last 20 Lines |