svn commit: r302710 - head/sys/dev/hyperv/vmbus
Sepherosa Ziehau
sephe at FreeBSD.org
Wed Jul 13 06:55:23 UTC 2016
Author: sephe
Date: Wed Jul 13 06:55:21 2016
New Revision: 302710
URL: https://svnweb.freebsd.org/changeset/base/302710
Log:
hyperv/vmbus: Remove unnecessary callback check.
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7046
Modified:
head/sys/dev/hyperv/vmbus/hv_channel.c
Modified: head/sys/dev/hyperv/vmbus/hv_channel.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel.c Wed Jul 13 06:46:29 2016 (r302709)
+++ head/sys/dev/hyperv/vmbus/hv_channel.c Wed Jul 13 06:55:21 2016 (r302710)
@@ -861,31 +861,29 @@ VmbusProcessChannelEvent(void* context,
if (channel->ch_flags & VMBUS_CHAN_FLAG_BATCHREAD)
is_batched_reading = true;
- if (channel->on_channel_callback != NULL) {
- arg = channel->channel_callback_context;
- /*
- * Optimize host to guest signaling by ensuring:
- * 1. While reading the channel, we disable interrupts from
- * host.
- * 2. Ensure that we process all posted messages from the host
- * before returning from this callback.
- * 3. Once we return, enable signaling from the host. Once this
- * state is set we check to see if additional packets are
- * available to read. In this case we repeat the process.
- */
- do {
- if (is_batched_reading)
- hv_ring_buffer_read_begin(&channel->inbound);
-
- channel->on_channel_callback(arg);
-
- if (is_batched_reading)
- bytes_to_read =
- hv_ring_buffer_read_end(&channel->inbound);
- else
- bytes_to_read = 0;
- } while (is_batched_reading && (bytes_to_read != 0));
- }
+ arg = channel->channel_callback_context;
+ /*
+ * Optimize host to guest signaling by ensuring:
+ * 1. While reading the channel, we disable interrupts from
+ * host.
+ * 2. Ensure that we process all posted messages from the host
+ * before returning from this callback.
+ * 3. Once we return, enable signaling from the host. Once this
+ * state is set we check to see if additional packets are
+ * available to read. In this case we repeat the process.
+ */
+ do {
+ if (is_batched_reading)
+ hv_ring_buffer_read_begin(&channel->inbound);
+
+ channel->on_channel_callback(arg);
+
+ if (is_batched_reading)
+ bytes_to_read =
+ hv_ring_buffer_read_end(&channel->inbound);
+ else
+ bytes_to_read = 0;
+ } while (is_batched_reading && (bytes_to_read != 0));
}
static __inline void
More information about the svn-src-head
mailing list