From: Stefano Stabellini <sstabellini@kernel.org>
To: xen-devel@lists.xenproject.org
Cc: jgross@suse.com, sstabellini@kernel.org, wei.liu2@citrix.com,
George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
ian.jackson@eu.citrix.com, tim@xen.org, jbeulich@suse.com
Subject: [PATCH v2 2/2] vscsiif.h: replace PAGE_SIZE with VSCSIIF_PAGE_SIZE
Date: Wed, 19 Oct 2016 12:22:35 -0700 [thread overview]
Message-ID: <1476904955-16003-2-git-send-email-sstabellini@kernel.org> (raw)
In-Reply-To: <1476904955-16003-1-git-send-email-sstabellini@kernel.org>
Do not reference PAGE_SIZE directly: it could be undefined, or it could
have different values in the frontend or in the backend.
Define VSCSIIF_PAGE_SIZE as 4096, assuming all users of vscsiif.h have
4K page granularity. Replace PAGE_SIZE with VSCSIIF_PAGE_SIZE.
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
xen/include/public/io/vscsiif.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/xen/include/public/io/vscsiif.h b/xen/include/public/io/vscsiif.h
index 0a4709f..d0bd3b5 100644
--- a/xen/include/public/io/vscsiif.h
+++ b/xen/include/public/io/vscsiif.h
@@ -248,6 +248,7 @@
*/
#define VSCSIIF_MAX_COMMAND_SIZE 16
#define VSCSIIF_SENSE_BUFFERSIZE 96
+#define VSCSIIF_PAGE_SIZE 4096
struct scsiif_request_segment {
grant_ref_t gref;
@@ -256,7 +257,7 @@ struct scsiif_request_segment {
};
typedef struct scsiif_request_segment vscsiif_segment_t;
-#define VSCSIIF_SG_PER_PAGE (PAGE_SIZE / sizeof(struct scsiif_request_segment))
+#define VSCSIIF_SG_PER_PAGE (VSCSIIF_PAGE_SIZE / sizeof(struct scsiif_request_segment))
/* Size of one request is 252 bytes */
struct vscsiif_request {
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-10-19 19:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 19:21 [PATCH v2 0/2] Remove PAGE_SIZE from public headers stefano
2016-10-19 19:22 ` [PATCH v2 1/2] usbif.h: replace PAGE_SIZE with USBIF_RING_SIZE Stefano Stabellini
2016-10-19 19:22 ` Stefano Stabellini [this message]
2016-10-20 5:10 ` [PATCH v2 0/2] Remove PAGE_SIZE from public headers Juergen Gross
2016-10-20 19:09 ` Stefano Stabellini
2016-10-20 19:42 ` Andrew Cooper
2016-10-20 20:04 ` Stefano Stabellini
2016-10-20 20:05 ` Andrew Cooper
2016-10-20 20:38 ` Stefano Stabellini
2016-10-21 9:00 ` Wei Liu
2016-10-21 20:28 ` Stefano Stabellini
2016-10-21 8:59 ` Wei Liu
2016-10-21 20:08 ` Stefano Stabellini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1476904955-16003-2-git-send-email-sstabellini@kernel.org \
--to=sstabellini@kernel.org \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=tim@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).