xref: /illumos-gate/usr/src/uts/common/io/qede/579xx/drivers/ecore/hsi_repository/roce_common.h (revision 14b24e2b79293068c8e016a69ef1d872fb5e2fd5)
1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, v.1,  (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21 
22 /*
23 * Copyright 2014-2017 Cavium, Inc.
24 * The contents of this file are subject to the terms of the Common Development
25 * and Distribution License, v.1,  (the "License").
26 
27 * You may not use this file except in compliance with the License.
28 
29 * You can obtain a copy of the License at available
30 * at http://opensource.org/licenses/CDDL-1.0
31 
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
34 */
35 
36 #ifndef __ROCE_COMMON__
37 #define __ROCE_COMMON__
38 /************************************************************************/
39 /* Add include to common rdma target for both eCore and protocol rdma driver */
40 /************************************************************************/
41 #include "rdma_common.h"
42 /************************/
43 /* ROCE FW CONSTANTS */
44 /************************/
45 
46 #define ROCE_REQ_MAX_INLINE_DATA_SIZE (256)	//max size of inline data in single request
47 #define ROCE_REQ_MAX_SINGLE_SQ_WQE_SIZE	(288)	//Maximum size of single SQ WQE (rdma wqe and inline data)
48 
49 #define ROCE_MAX_QPS				(32*1024)
50 #define ROCE_DCQCN_NP_MAX_QPS  (64)	/* notification point max QPs*/
51 #define ROCE_DCQCN_RP_MAX_QPS  (64)		/* reaction point max QPs*/
52 
53 
54 /*
55  * Affiliated asynchronous events / errors enumeration
56  */
57 enum roce_async_events_type
58 {
59 	ROCE_ASYNC_EVENT_NONE=0,
60 	ROCE_ASYNC_EVENT_COMM_EST=1,
61 	ROCE_ASYNC_EVENT_SQ_DRAINED,
62 	ROCE_ASYNC_EVENT_SRQ_LIMIT,
63 	ROCE_ASYNC_EVENT_LAST_WQE_REACHED,
64 	ROCE_ASYNC_EVENT_CQ_ERR,
65 	ROCE_ASYNC_EVENT_LOCAL_INVALID_REQUEST_ERR,
66 	ROCE_ASYNC_EVENT_LOCAL_CATASTROPHIC_ERR,
67 	ROCE_ASYNC_EVENT_LOCAL_ACCESS_ERR,
68 	ROCE_ASYNC_EVENT_QP_CATASTROPHIC_ERR,
69 	ROCE_ASYNC_EVENT_CQ_OVERFLOW_ERR,
70 	ROCE_ASYNC_EVENT_SRQ_EMPTY,
71 	ROCE_ASYNC_EVENT_DESTROY_QP_DONE,
72 	MAX_ROCE_ASYNC_EVENTS_TYPE
73 };
74 
75 #endif /* __ROCE_COMMON__ */
76