aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-08-15 21:48:06 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-08-15 21:48:06 +0100
commitf8eebecbe9895e31801f6aba6053823c35bb5f34 (patch)
tree23446b0c977fb740a63559611ccf02a22b733f68
parentdfd003b8a321b65535fdeb32f9db01a707aa62e2 (diff)
downloadxen-f8eebecbe9895e31801f6aba6053823c35bb5f34.tar.gz
xen-f8eebecbe9895e31801f6aba6053823c35bb5f34.tar.bz2
xen-f8eebecbe9895e31801f6aba6053823c35bb5f34.zip
blktap2: make protocol specific usage of shared sring explicit
I don't think protocol specific data really belongs in this header but since it is already there and we seem to be stuck with it let's at least make the users explicit lest people get caught out by future new fields moving the pad field around. This is the Xen portion of this change. The kernel portion will be sent separately. There is no dependency between the two. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Daniel Stodden <daniel.stodden@citrix.com> Cc: Dongxiao Xu <dongxiao.xu@intel.com> xen-unstable changeset: feee0abed6aa xen-unstable date: Fri Jul 02 18:58:02 2010 +0100
-rw-r--r--tools/blktap2/drivers/tapdisk-vbd.c2
-rw-r--r--xen/include/public/io/ring.h12
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/blktap2/drivers/tapdisk-vbd.c b/tools/blktap2/drivers/tapdisk-vbd.c
index c3321d5cc8..9d856d5927 100644
--- a/tools/blktap2/drivers/tapdisk-vbd.c
+++ b/tools/blktap2/drivers/tapdisk-vbd.c
@@ -1937,7 +1937,7 @@ tapdisk_vbd_check_ring_message(td_vbd_t *vbd)
if (!vbd->ring.sring)
return -EINVAL;
- switch (vbd->ring.sring->pad[0]) {
+ switch (vbd->ring.sring->private.tapif_user.msg) {
case 0:
return 0;
diff --git a/xen/include/public/io/ring.h b/xen/include/public/io/ring.h
index 0880b1c52e..0c01339722 100644
--- a/xen/include/public/io/ring.h
+++ b/xen/include/public/io/ring.h
@@ -103,8 +103,16 @@ union __name##_sring_entry { \
struct __name##_sring { \
RING_IDX req_prod, req_event; \
RING_IDX rsp_prod, rsp_event; \
- uint8_t netfront_smartpoll_active; \
- uint8_t pad[47]; \
+ union { \
+ struct { \
+ uint8_t smartpoll_active; \
+ } netif; \
+ struct { \
+ uint8_t msg; \
+ } tapif_user; \
+ uint8_t pvt_pad[4]; \
+ } private; \
+ uint8_t pad[44]; \
union __name##_sring_entry ring[1]; /* variable-length */ \
}; \
\