Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111628780
D7015.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D7015.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
@@ -629,6 +629,7 @@
struct task ch_detach_task;
TAILQ_ENTRY(hv_vmbus_channel) ch_link;
+ uint32_t ch_subidx; /* subchan index */
struct sysctl_ctx_list ch_sysctl_ctx;
} hv_vmbus_channel;
Index: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
===================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
@@ -518,9 +518,9 @@
*/
pri_chan = device_ctx->channel;
KASSERT(HV_VMBUS_CHAN_ISPRIMARY(pri_chan), ("not primary channel"));
- KASSERT(pri_chan->offer_msg.offer.sub_channel_index == 0,
+ KASSERT(pri_chan->ch_subidx == 0,
("primary channel subidx %u",
- pri_chan->offer_msg.offer.sub_channel_index));
+ pri_chan->ch_subidx));
hn_channel_attach(sc, pri_chan);
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
@@ -809,8 +809,8 @@
txr = txd->txr;
KASSERT(txr->hn_chan == chan,
("channel mismatch, on channel%u, should be channel%u",
- chan->offer_msg.offer.sub_channel_index,
- txr->hn_chan->offer_msg.offer.sub_channel_index));
+ chan->ch_subidx,
+ txr->hn_chan->ch_subidx));
txr->hn_has_txeof = 1;
hn_txdesc_put(txr, txd);
@@ -2940,7 +2940,7 @@
struct hn_rx_ring *rxr;
int idx;
- idx = chan->offer_msg.offer.sub_channel_index;
+ idx = chan->ch_subidx;
KASSERT(idx >= 0 && idx < sc->hn_rx_ring_inuse,
("invalid channel index %d, should > 0 && < %d",
@@ -2981,9 +2981,9 @@
KASSERT(!HV_VMBUS_CHAN_ISPRIMARY(chan),
("subchannel callback on primary channel"));
- KASSERT(chan->offer_msg.offer.sub_channel_index > 0,
+ KASSERT(chan->ch_subidx > 0,
("invalid channel subidx %u",
- chan->offer_msg.offer.sub_channel_index));
+ chan->ch_subidx));
hn_channel_attach(sc, chan);
}
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
@@ -111,7 +111,7 @@
} else {
dev = primary_ch->device->device;
ch_id = primary_ch->ch_id;
- sub_ch_id = channel->offer_msg.offer.sub_channel_index;
+ sub_ch_id = channel->ch_subidx;
}
ctx = &channel->ch_sysctl_ctx;
sysctl_ctx_init(ctx);
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
@@ -152,14 +152,14 @@
}
device_printf(sc->vmbus_dev, "chan%u subchanid%u offer%s\n",
new_channel->ch_id,
- new_channel->offer_msg.offer.sub_channel_index, logstr);
+ new_channel->ch_subidx, logstr);
}
if (channel != NULL) {
/*
* Check if this is a sub channel.
*/
- if (new_channel->offer_msg.offer.sub_channel_index != 0) {
+ if (new_channel->ch_subidx != 0) {
/*
* It is a sub channel offer, process it.
*/
@@ -293,6 +293,7 @@
/* Allocate the channel object and save this offer */
new_channel = hv_vmbus_allocate_channel(sc);
new_channel->ch_id = offer->child_rel_id;
+ new_channel->ch_subidx = offer->offer.sub_channel_index;
/*
* By default we setup state to enable batched
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 7, 5:51 AM (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17026124
Default Alt Text
D7015.diff (3 KB)
Attached To
Mode
D7015: hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
Attached
Detach File
Event Timeline
Log In to Comment