PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / infiniband / hw / usnic / usnic_abi.h
blob04a66229584e0089ef72e027f986d3d71a574b0d
1 /*
2 * Copyright (c) 2013, Cisco Systems, Inc. All rights reserved.
4 * This program is free software; you may redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 2 of the License.
8 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
9 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
11 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
12 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
13 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
14 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
15 * SOFTWARE.
20 #ifndef USNIC_ABI_H
21 #define USNIC_ABI_H
23 /* ABI between userspace and kernel */
24 #define USNIC_UVERBS_ABI_VERSION 4
26 #define USNIC_QP_GRP_MAX_WQS 8
27 #define USNIC_QP_GRP_MAX_RQS 8
28 #define USNIC_QP_GRP_MAX_CQS 16
30 enum usnic_transport_type {
31 USNIC_TRANSPORT_UNKNOWN = 0,
32 USNIC_TRANSPORT_ROCE_CUSTOM = 1,
33 USNIC_TRANSPORT_IPV4_UDP = 2,
34 USNIC_TRANSPORT_MAX = 3,
37 struct usnic_transport_spec {
38 enum usnic_transport_type trans_type;
39 union {
40 struct {
41 uint16_t port_num;
42 } usnic_roce;
43 struct {
44 uint32_t sock_fd;
45 } udp;
49 struct usnic_ib_create_qp_cmd {
50 struct usnic_transport_spec spec;
53 /*TODO: Future - usnic_modify_qp needs to pass in generic filters */
54 struct usnic_ib_create_qp_resp {
55 u32 vfid;
56 u32 qp_grp_id;
57 u64 bar_bus_addr;
58 u32 bar_len;
60 * WQ, RQ, CQ are explicity specified bc exposing a generic resources inteface
61 * expands the scope of ABI to many files.
63 u32 wq_cnt;
64 u32 rq_cnt;
65 u32 cq_cnt;
66 u32 wq_idx[USNIC_QP_GRP_MAX_WQS];
67 u32 rq_idx[USNIC_QP_GRP_MAX_RQS];
68 u32 cq_idx[USNIC_QP_GRP_MAX_CQS];
69 u32 transport;
70 u32 reserved[9];
73 #endif /* USNIC_ABI_H */