WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-4.0-testing] blktap2: make protocol specific usage

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] blktap2: make protocol specific usage of shared sring explicit
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 25 Aug 2010 01:30:35 -0700
Delivery-date: Wed, 25 Aug 2010 01:32:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1281905286 -3600
# Node ID 08735667ed62b31236845b8e14d739143403f68d
# Parent  5e8df2d2ef6fd17be339d5a2febe1576be8bab82
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@xxxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Cc: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Cc: Dongxiao Xu <dongxiao.xu@xxxxxxxxx>
xen-unstable changeset:   feee0abed6aa
xen-unstable date:        Fri Jul 02 18:58:02 2010 +0100
---
 tools/blktap2/drivers/tapdisk-vbd.c |    2 +-
 xen/include/public/io/ring.h        |   12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff -r 5e8df2d2ef6f -r 08735667ed62 tools/blktap2/drivers/tapdisk-vbd.c
--- a/tools/blktap2/drivers/tapdisk-vbd.c       Fri Aug 13 15:06:24 2010 +0100
+++ b/tools/blktap2/drivers/tapdisk-vbd.c       Sun Aug 15 21:48:06 2010 +0100
@@ -1937,7 +1937,7 @@ tapdisk_vbd_check_ring_message(td_vbd_t 
        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 -r 5e8df2d2ef6f -r 08735667ed62 xen/include/public/io/ring.h
--- a/xen/include/public/io/ring.h      Fri Aug 13 15:06:24 2010 +0100
+++ b/xen/include/public/io/ring.h      Sun Aug 15 21:48:06 2010 +0100
@@ -103,8 +103,16 @@ struct __name##_sring {                 
 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 */           \
 };                                                                      \
                                                                         \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] blktap2: make protocol specific usage of shared sring explicit, Xen patchbot-4.0-testing <=