blob: dd3e4c6c474f6e92fb8ecc6b55f0f7104d3c9b3e [file] [log] [blame]
Upinder Malhie3cf00d2013-09-10 03:38:16 +00001/*
2 * Copyright (c) 2013, Cisco Systems, Inc. All rights reserved.
3 *
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.
7 *
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.
16 *
17 */
18
19
20#ifndef USNIC_ABI_H
21#define USNIC_ABI_H
22
23/* ABI between userspace and kernel */
24#define USNIC_UVERBS_ABI_VERSION 2
25
26#define USNIC_QP_GRP_MAX_WQS 8
27#define USNIC_QP_GRP_MAX_RQS 8
28#define USNIC_QP_GRP_MAX_CQS 16
29
30enum usnic_transport_type {
31 USNIC_TRANSPORT_UNKNOWN = 0,
32 USNIC_TRANSPORT_ROCE_CUSTOM = 1,
33 USNIC_TRANSPORT_MAX = 2,
34};
35
Upinder Malhi301a0dd2014-01-09 14:48:06 -080036struct usnic_transport_spec {
37 enum usnic_transport_type trans_type;
38 union {
39 struct {
40 uint16_t port_num;
41 } usnic_roce;
42 };
43};
44
Upinder Malhie3cf00d2013-09-10 03:38:16 +000045/*TODO: Future - usnic_modify_qp needs to pass in generic filters */
46struct usnic_ib_create_qp_resp {
47 u32 vfid;
48 u32 qp_grp_id;
49 u64 bar_bus_addr;
50 u32 bar_len;
51/*
52 * WQ, RQ, CQ are explicity specified bc exposing a generic resources inteface
53 * expands the scope of ABI to many files.
54 */
55 u32 wq_cnt;
56 u32 rq_cnt;
57 u32 cq_cnt;
58 u32 wq_idx[USNIC_QP_GRP_MAX_WQS];
59 u32 rq_idx[USNIC_QP_GRP_MAX_RQS];
60 u32 cq_idx[USNIC_QP_GRP_MAX_CQS];
61 u32 transport;
62 u32 reserved[9];
63};
64
65#endif /* USNIC_ABI_H */