Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103223300
D8044.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
D8044.diff
View Options
Index: head/sys/dev/hyperv/include/vmbus.h
===================================================================
--- head/sys/dev/hyperv/include/vmbus.h
+++ head/sys/dev/hyperv/include/vmbus.h
@@ -173,5 +173,7 @@
vmbus_chan_guid_inst(const struct vmbus_channel *chan);
int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max,
int dlen_max);
+bool vmbus_chan_rx_empty(const struct vmbus_channel *chan);
+bool vmbus_chan_tx_empty(const struct vmbus_channel *chan);
#endif /* !_VMBUS_H_ */
Index: head/sys/dev/hyperv/vmbus/vmbus_brvar.h
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_brvar.h
+++ head/sys/dev/hyperv/vmbus/vmbus_brvar.h
@@ -83,6 +83,20 @@
return (tbr->txbr_dsize - sizeof(uint64_t) - 1);
}
+static __inline bool
+vmbus_txbr_empty(const struct vmbus_txbr *tbr)
+{
+
+ return (tbr->txbr_windex == tbr->txbr_rindex ? true : false);
+}
+
+static __inline bool
+vmbus_rxbr_empty(const struct vmbus_rxbr *rbr)
+{
+
+ return (rbr->rxbr_windex == rbr->rxbr_rindex ? true : false);
+}
+
static __inline int
vmbus_br_nelem(int br_size, int elem_size)
{
Index: head/sys/dev/hyperv/vmbus/vmbus_chan.c
===================================================================
--- head/sys/dev/hyperv/vmbus/vmbus_chan.c
+++ head/sys/dev/hyperv/vmbus/vmbus_chan.c
@@ -1692,3 +1692,17 @@
return (vmbus_br_nelem(br_size, elem_size));
}
+
+bool
+vmbus_chan_tx_empty(const struct vmbus_channel *chan)
+{
+
+ return (vmbus_txbr_empty(&chan->ch_txbr));
+}
+
+bool
+vmbus_chan_rx_empty(const struct vmbus_channel *chan)
+{
+
+ return (vmbus_rxbr_empty(&chan->ch_rxbr));
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:37 AM (12 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14796537
Default Alt Text
D8044.diff (1 KB)
Attached To
Mode
D8044: hyperv/vmbus: Add functions to test RX/TX bufring emptiness
Attached
Detach File
Event Timeline
Log In to Comment