Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
0002 /*
0003  * Copyright (c) 2003-2007 Network Appliance, Inc. All rights reserved.
0004  *
0005  * This software is available to you under a choice of one of two
0006  * licenses.  You may choose to be licensed under the terms of the GNU
0007  * General Public License (GPL) Version 2, available from the file
0008  * COPYING in the main directory of this source tree, or the BSD-type
0009  * license below:
0010  *
0011  * Redistribution and use in source and binary forms, with or without
0012  * modification, are permitted provided that the following conditions
0013  * are met:
0014  *
0015  *      Redistributions of source code must retain the above copyright
0016  *      notice, this list of conditions and the following disclaimer.
0017  *
0018  *      Redistributions in binary form must reproduce the above
0019  *      copyright notice, this list of conditions and the following
0020  *      disclaimer in the documentation and/or other materials provided
0021  *      with the distribution.
0022  *
0023  *      Neither the name of the Network Appliance, Inc. nor the names of
0024  *      its contributors may be used to endorse or promote products
0025  *      derived from this software without specific prior written
0026  *      permission.
0027  *
0028  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
0029  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
0030  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
0031  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0032  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
0033  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
0034  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
0035  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
0036  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0037  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
0038  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0039  */
0040 
0041 #ifndef _LINUX_SUNRPC_XPRTRDMA_H
0042 #define _LINUX_SUNRPC_XPRTRDMA_H
0043 
0044 /*
0045  * Constants. Max RPC/NFS header is big enough to account for
0046  * additional marshaling buffers passed down by Linux client.
0047  *
0048  * RDMA header is currently fixed max size, and is big enough for a
0049  * fully-chunked NFS message (read chunks are the largest). Note only
0050  * a single chunk type per message is supported currently.
0051  */
0052 #define RPCRDMA_MIN_SLOT_TABLE  (4U)
0053 #define RPCRDMA_DEF_SLOT_TABLE  (128U)
0054 #define RPCRDMA_MAX_SLOT_TABLE  (16384U)
0055 
0056 #define RPCRDMA_MIN_INLINE  (1024)  /* min inline thresh */
0057 #define RPCRDMA_DEF_INLINE  (4096)  /* default inline thresh */
0058 #define RPCRDMA_MAX_INLINE  (65536) /* max inline thresh */
0059 
0060 /* Memory registration strategies, by number.
0061  * This is part of a kernel / user space API. Do not remove. */
0062 enum rpcrdma_memreg {
0063     RPCRDMA_BOUNCEBUFFERS = 0,
0064     RPCRDMA_REGISTER,
0065     RPCRDMA_MEMWINDOWS,
0066     RPCRDMA_MEMWINDOWS_ASYNC,
0067     RPCRDMA_MTHCAFMR,
0068     RPCRDMA_FRWR,
0069     RPCRDMA_ALLPHYSICAL,
0070     RPCRDMA_LAST
0071 };
0072 
0073 #endif /* _LINUX_SUNRPC_XPRTRDMA_H */