xref: /openbmc/linux/drivers/infiniband/sw/rdmavt/srq.h (revision aad9158b)
1aad9158bSDennis Dalessandro #ifndef DEF_RVTSRQ_H
2aad9158bSDennis Dalessandro #define DEF_RVTSRQ_H
3aad9158bSDennis Dalessandro 
4aad9158bSDennis Dalessandro /*
5aad9158bSDennis Dalessandro  * Copyright(c) 2015 Intel Corporation.
6aad9158bSDennis Dalessandro  *
7aad9158bSDennis Dalessandro  * This file is provided under a dual BSD/GPLv2 license.  When using or
8aad9158bSDennis Dalessandro  * redistributing this file, you may do so under either license.
9aad9158bSDennis Dalessandro  *
10aad9158bSDennis Dalessandro  * GPL LICENSE SUMMARY
11aad9158bSDennis Dalessandro  *
12aad9158bSDennis Dalessandro  * This program is free software; you can redistribute it and/or modify
13aad9158bSDennis Dalessandro  * it under the terms of version 2 of the GNU General Public License as
14aad9158bSDennis Dalessandro  * published by the Free Software Foundation.
15aad9158bSDennis Dalessandro  *
16aad9158bSDennis Dalessandro  * This program is distributed in the hope that it will be useful, but
17aad9158bSDennis Dalessandro  * WITHOUT ANY WARRANTY; without even the implied warranty of
18aad9158bSDennis Dalessandro  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19aad9158bSDennis Dalessandro  * General Public License for more details.
20aad9158bSDennis Dalessandro  *
21aad9158bSDennis Dalessandro  * BSD LICENSE
22aad9158bSDennis Dalessandro  *
23aad9158bSDennis Dalessandro  * Redistribution and use in source and binary forms, with or without
24aad9158bSDennis Dalessandro  * modification, are permitted provided that the following conditions
25aad9158bSDennis Dalessandro  * are met:
26aad9158bSDennis Dalessandro  *
27aad9158bSDennis Dalessandro  *  - Redistributions of source code must retain the above copyright
28aad9158bSDennis Dalessandro  *    notice, this list of conditions and the following disclaimer.
29aad9158bSDennis Dalessandro  *  - Redistributions in binary form must reproduce the above copyright
30aad9158bSDennis Dalessandro  *    notice, this list of conditions and the following disclaimer in
31aad9158bSDennis Dalessandro  *    the documentation and/or other materials provided with the
32aad9158bSDennis Dalessandro  *    distribution.
33aad9158bSDennis Dalessandro  *  - Neither the name of Intel Corporation nor the names of its
34aad9158bSDennis Dalessandro  *    contributors may be used to endorse or promote products derived
35aad9158bSDennis Dalessandro  *    from this software without specific prior written permission.
36aad9158bSDennis Dalessandro  *
37aad9158bSDennis Dalessandro  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
38aad9158bSDennis Dalessandro  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
39aad9158bSDennis Dalessandro  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
40aad9158bSDennis Dalessandro  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
41aad9158bSDennis Dalessandro  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42aad9158bSDennis Dalessandro  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43aad9158bSDennis Dalessandro  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
44aad9158bSDennis Dalessandro  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
45aad9158bSDennis Dalessandro  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
46aad9158bSDennis Dalessandro  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
47aad9158bSDennis Dalessandro  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48aad9158bSDennis Dalessandro  *
49aad9158bSDennis Dalessandro  */
50aad9158bSDennis Dalessandro 
51aad9158bSDennis Dalessandro #include <rdma/rdma_vt.h>
52aad9158bSDennis Dalessandro struct ib_srq *rvt_create_srq(struct ib_pd *ibpd,
53aad9158bSDennis Dalessandro 			      struct ib_srq_init_attr *srq_init_attr,
54aad9158bSDennis Dalessandro 			      struct ib_udata *udata);
55aad9158bSDennis Dalessandro int rvt_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
56aad9158bSDennis Dalessandro 		   enum ib_srq_attr_mask attr_mask,
57aad9158bSDennis Dalessandro 		   struct ib_udata *udata);
58aad9158bSDennis Dalessandro int rvt_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr);
59aad9158bSDennis Dalessandro int rvt_destroy_srq(struct ib_srq *ibsrq);
60aad9158bSDennis Dalessandro 
61aad9158bSDennis Dalessandro #endif          /* DEF_RVTSRQ_H */
62