svn commit: r303945 - head/sys/dev/hyperv/include
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Aug 11 03:20:39 UTC 2016
Author: sephe
Date: Thu Aug 11 03:20:38 2016
New Revision: 303945
URL: https://svnweb.freebsd.org/changeset/base/303945
Log:
hyperv/vmbus: Add macro to get channel packet data length.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7455
Modified:
head/sys/dev/hyperv/include/vmbus.h
Modified: head/sys/dev/hyperv/include/vmbus.h
==============================================================================
--- head/sys/dev/hyperv/include/vmbus.h Thu Aug 11 03:12:56 2016 (r303944)
+++ head/sys/dev/hyperv/include/vmbus.h Thu Aug 11 03:20:38 2016 (r303945)
@@ -89,6 +89,11 @@ struct vmbus_chanpkt_hdr {
(const void *)((const uint8_t *)(pkt) + \
VMBUS_CHANPKT_GETLEN((pkt)->cph_hlen))
+/* Include padding */
+#define VMBUS_CHANPKT_DATALEN(pkt) \
+ (VMBUS_CHANPKT_GETLEN((pkt)->cph_tlen) -\
+ VMBUS_CHANPKT_GETLEN((pkt)->cph_hlen))
+
struct vmbus_rxbuf_desc {
uint32_t rb_len;
uint32_t rb_ofs;
More information about the svn-src-head
mailing list