Deleted Added
full compact
block.h (225705) block.h (231743)
1/*
2 * XenBSD block device driver
3 *
4 * Copyright (c) 2009 Scott Long, Yahoo!
5 * Copyright (c) 2009 Frank Suchomel, Citrix
6 * Copyright (c) 2009 Doug F. Rabson, Citrix
7 * Copyright (c) 2005 Kip Macy
8 * Copyright (c) 2003-2004, Keir Fraser & Steve Hand

--- 12 unchanged lines hidden (view full) ---

21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 *
1/*
2 * XenBSD block device driver
3 *
4 * Copyright (c) 2009 Scott Long, Yahoo!
5 * Copyright (c) 2009 Frank Suchomel, Citrix
6 * Copyright (c) 2009 Doug F. Rabson, Citrix
7 * Copyright (c) 2005 Kip Macy
8 * Copyright (c) 2003-2004, Keir Fraser & Steve Hand

--- 12 unchanged lines hidden (view full) ---

21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27 * DEALINGS IN THE SOFTWARE.
28 *
29 * $FreeBSD: head/sys/dev/xen/blkfront/block.h 225705 2011-09-21 00:02:44Z gibbs $
29 * $FreeBSD: head/sys/dev/xen/blkfront/block.h 231743 2012-02-15 06:45:49Z gibbs $
30 */
31
32
33#ifndef __XEN_DRIVERS_BLOCK_H__
34#define __XEN_DRIVERS_BLOCK_H__
35#include <xen/blkif.h>
36
37/**

--- 6 unchanged lines hidden (view full) ---

44/**
45 * The maximum mapped region size per request we will allow in a negotiated
46 * block-front/back communication channel.
47 *
48 * \note We reserve a segement from the maximum supported by the transport to
49 * guarantee we can handle an unaligned transfer without the need to
50 * use a bounce buffer..
51 */
30 */
31
32
33#ifndef __XEN_DRIVERS_BLOCK_H__
34#define __XEN_DRIVERS_BLOCK_H__
35#include <xen/blkif.h>
36
37/**

--- 6 unchanged lines hidden (view full) ---

44/**
45 * The maximum mapped region size per request we will allow in a negotiated
46 * block-front/back communication channel.
47 *
48 * \note We reserve a segement from the maximum supported by the transport to
49 * guarantee we can handle an unaligned transfer without the need to
50 * use a bounce buffer..
51 */
52#define XBF_MAX_REQUEST_SIZE \
52#define XBF_MAX_REQUEST_SIZE \
53 MIN(MAXPHYS, (BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * PAGE_SIZE)
54
55/**
56 * The maximum number of segments (within a request header and accompanying
57 * segment blocks) per request we will allow in a negotiated block-front/back
58 * communication channel.
59 */
53 MIN(MAXPHYS, (BLKIF_MAX_SEGMENTS_PER_REQUEST - 1) * PAGE_SIZE)
54
55/**
56 * The maximum number of segments (within a request header and accompanying
57 * segment blocks) per request we will allow in a negotiated block-front/back
58 * communication channel.
59 */
60#define XBF_MAX_SEGMENTS_PER_REQUEST \
61 (MIN(BLKIF_MAX_SEGMENTS_PER_REQUEST, \
60#define XBF_MAX_SEGMENTS_PER_REQUEST \
61 (MIN(BLKIF_MAX_SEGMENTS_PER_REQUEST, \
62 (XBF_MAX_REQUEST_SIZE / PAGE_SIZE) + 1))
63
64/**
65 * The maximum number of shared memory ring pages we will allow in a
66 * negotiated block-front/back communication channel. Allow enough
67 * ring space for all requests to be XBF_MAX_REQUEST_SIZE'd.
68 */
69#define XBF_MAX_RING_PAGES \

--- 229 unchanged lines hidden ---
62 (XBF_MAX_REQUEST_SIZE / PAGE_SIZE) + 1))
63
64/**
65 * The maximum number of shared memory ring pages we will allow in a
66 * negotiated block-front/back communication channel. Allow enough
67 * ring space for all requests to be XBF_MAX_REQUEST_SIZE'd.
68 */
69#define XBF_MAX_RING_PAGES \

--- 229 unchanged lines hidden ---