Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146060070
D7019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D7019.diff
View Options
Index: head/sys/dev/hyperv/include/hyperv.h
===================================================================
--- head/sys/dev/hyperv/include/hyperv.h
+++ head/sys/dev/hyperv/include/hyperv.h
@@ -538,6 +538,7 @@
struct vmbus_softc *vmbus_sc;
hv_vmbus_channel_state state;
hv_vmbus_channel_offer_channel offer_msg;
+ uint32_t ch_flags; /* VMBUS_CHAN_FLAG_ */
uint32_t ch_id; /* channel id */
/*
* These are based on the offer_msg.monitor_id.
@@ -636,6 +637,8 @@
#define HV_VMBUS_CHAN_ISPRIMARY(chan) ((chan)->primary_channel == NULL)
+#define VMBUS_CHAN_FLAG_HASMNF 0x0001
+
static inline void
hv_set_channel_read_state(hv_vmbus_channel* channel, boolean_t state)
{
Index: head/sys/dev/hyperv/vmbus/hv_channel.c
===================================================================
--- head/sys/dev/hyperv/vmbus/hv_channel.c
+++ head/sys/dev/hyperv/vmbus/hv_channel.c
@@ -67,7 +67,7 @@
atomic_set_long(&sc->vmbus_tx_evtflags[chanid >> VMBUS_EVTFLAG_SHIFT],
1UL << (chanid & VMBUS_EVTFLAG_MASK));
- if (channel->offer_msg.monitor_allocated) {
+ if (channel->ch_flags & VMBUS_CHAN_FLAG_HASMNF) {
hv_vmbus_monitor_page *monitor_page;
monitor_page = sc->vmbus_mnf2;
@@ -86,7 +86,7 @@
struct hv_vmbus_channel *chan = arg1;
int alloc = 0;
- if (chan->offer_msg.monitor_allocated)
+ if (chan->ch_flags & VMBUS_CHAN_FLAG_HASMNF)
alloc = 1;
return sysctl_handle_int(oidp, &alloc, 0, req);
}
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
@@ -294,6 +294,8 @@
new_channel = hv_vmbus_allocate_channel(sc);
new_channel->ch_id = offer->child_rel_id;
new_channel->ch_subidx = offer->offer.sub_channel_index;
+ if (offer->monitor_allocated)
+ new_channel->ch_flags |= VMBUS_CHAN_FLAG_HASMNF;
/*
* By default we setup state to enable batched
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 28, 11:17 AM (19 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29065740
Default Alt Text
D7019.diff (1 KB)
Attached To
Mode
D7019: hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
Attached
Detach File
Event Timeline
Log In to Comment