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-devel

[Xen-devel] [PATCH] make shared ring pad field less enticing for users b

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] make shared ring pad field less enticing for users by adding a __ prefix
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Thu, 1 Jul 2010 11:23:12 +0100
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Ian Campbell <ian.campbell@xxxxxxxxxx>, Dongxiao Xu <dongxiao.xu@xxxxxxxxx>, Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Delivery-date: Thu, 01 Jul 2010 03:24:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1277976171-5785-1-git-send-email-ian.campbell@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1277976171-5785-1-git-send-email-ian.campbell@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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>
---
 include/xen/interface/io/ring.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/xen/interface/io/ring.h b/include/xen/interface/io/ring.h
index 7b301fa..fae3296 100644
--- a/include/xen/interface/io/ring.h
+++ b/include/xen/interface/io/ring.h
@@ -82,7 +82,7 @@ struct __name##_sring {                                       
                \
         } tapif_user;                                                  \
         uint8_t pvt_pad[4];                                            \
     } private;                                                         \
-    uint8_t pad[44];                                                   \
+    uint8_t __pad[44];                                                 \
     union __name##_sring_entry ring[1]; /* variable-length */          \
 };                                                                     \
                                                                        \
@@ -121,7 +121,8 @@ struct __name##_back_ring {                                 
        \
 #define SHARED_RING_INIT(_s) do {                                      \
     (_s)->req_prod  = (_s)->rsp_prod  = 0;                             \
     (_s)->req_event = (_s)->rsp_event = 1;                             \
-    memset((_s)->pad, 0, sizeof((_s)->pad));                           \
+    memset((_s)->private.pvt_pad, 0, sizeof((_s)->private.pvt_pad));   \
+    memset((_s)->__pad, 0, sizeof((_s)->__pad));                       \
 } while(0)
 
 #define FRONT_RING_INIT(_r, _s, __size) do {                           \
-- 
1.5.6.5


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