Page MenuHomeFreeBSD

D6333.id16365.diff
No OneTemporary

D6333.id16365.diff

Index: head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
+++ head/sys/dev/hyperv/vmbus/hv_channel_mgmt.c
@@ -183,7 +183,14 @@
* Make sure this is a new offer
*/
mtx_lock(&hv_vmbus_g_connection.channel_lock);
- hv_vmbus_g_connection.channels[relid] = new_channel;
+ 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;
+ }
TAILQ_FOREACH(channel, &hv_vmbus_g_connection.channel_anchor,
list_entry) {
Index: head/sys/dev/hyperv/vmbus/hv_connection.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_connection.c
+++ head/sys/dev/hyperv/vmbus/hv_connection.c
@@ -337,15 +337,11 @@
for (bit = 0; bit < HV_CHANNEL_DWORD_LEN; bit++) {
if (synch_test_and_clear_bit(bit,
(uint32_t *) &recv_interrupt_page[dword])) {
- rel_id = (dword << 5) + bit;
- if (rel_id == 0) {
- /*
- * Special case -
- * vmbus channel protocol msg.
- */
- continue;
- } else {
- hv_vmbus_channel * channel = hv_vmbus_g_connection.channels[rel_id];
+ struct hv_vmbus_channel *channel;
+
+ rel_id = (dword << 5) + bit;
+ channel = hv_vmbus_g_connection.channels[rel_id];
+
/* if channel is closed or closing */
if (channel == NULL || channel->rxq == NULL)
continue;
@@ -353,7 +349,6 @@
if (channel->batched_reading)
hv_ring_buffer_read_begin(&channel->inbound);
taskqueue_enqueue(channel->rxq, &channel->channel_task);
- }
}
}
}

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 15, 12:08 PM (11 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31423258
Default Alt Text
D6333.id16365.diff (1 KB)

Event Timeline