2 * Copyright (c) 2005 Cisco Systems. All rights reserved.
\r
4 * This software is available to you under a choice of one of two
\r
5 * licenses. You may choose to be licensed under the terms of the GNU
\r
6 * General Public License (GPL) Version 2, available from the file
\r
7 * COPYING in the main directory of this source tree, or the
\r
8 * OpenIB.org BSD license below:
\r
10 * Redistribution and use in source and binary forms, with or
\r
11 * without modification, are permitted provided that the following
\r
12 * conditions are met:
\r
14 * - Redistributions of source code must retain the above
\r
15 * copyright notice, this list of conditions and the following
\r
18 * - Redistributions in binary form must reproduce the above
\r
19 * copyright notice, this list of conditions and the following
\r
20 * disclaimer in the documentation and/or other materials
\r
21 * provided with the distribution.
\r
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
\r
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
\r
32 * $Id: mthca_wqe.h 1611 2006-08-20 14:48:55Z sleybo $
\r
39 MTHCA_RD_DOORBELL = 0x00,
\r
40 MTHCA_SEND_DOORBELL = 0x10,
\r
41 MTHCA_RECV_DOORBELL = 0x18,
\r
42 MTHCA_CQ_DOORBELL = 0x20,
\r
43 MTHCA_EQ_DOORBELL = 0x28
\r
47 MTHCA_NEXT_DBD = 1 << 7,
\r
48 MTHCA_NEXT_FENCE = 1 << 6,
\r
49 MTHCA_NEXT_CQ_UPDATE = 1 << 3,
\r
50 MTHCA_NEXT_EVENT_GEN = 1 << 2,
\r
51 MTHCA_NEXT_SOLICIT = 1 << 1,
\r
52 MTHCA_NEXT_IP_CSUM = 1 << 4,
\r
53 MTHCA_NEXT_TCP_UDP_CSUM = 1 << 5,
\r
55 MTHCA_MLX_VL15 = 1 << 17,
\r
56 MTHCA_MLX_SLR = 1 << 16
\r
60 MTHCA_INLINE_SEG = 1 << 31
\r
64 MTHCA_INVAL_LKEY = 0x100,
\r
65 MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256,
\r
66 MTHCA_ARBEL_MAX_WQES_PER_SEND_DB = 255
\r
69 struct mthca_next_seg {
\r
70 ib_net32_t nda_op; /* [31:6] next WQE [4:0] next opcode */
\r
71 ib_net32_t ee_nds; /* [31:8] next EE [7] DBD [6] F [5:0] next WQE size */
\r
72 ib_net32_t flags; /* [3] CQ [2] Event [1] Solicit */
\r
73 ib_net32_t imm; /* immediate data */
\r
76 struct mthca_tavor_ud_seg {
\r
80 uint32_t reserved2[4];
\r
83 uint32_t reserved3[2];
\r
86 struct mthca_arbel_ud_seg {
\r
90 uint32_t reserved[2];
\r
93 struct mthca_bind_seg {
\r
94 ib_net32_t flags; /* [31] Atomic [30] rem write [29] rem read */
\r
96 ib_net32_t new_rkey;
\r
102 struct mthca_raddr_seg {
\r
108 struct mthca_atomic_seg {
\r
109 ib_net64_t swap_add;
\r
110 ib_net64_t compare;
\r
113 struct mthca_data_seg {
\r
114 ib_net32_t byte_count;
\r
119 struct mthca_mlx_seg {
\r
122 ib_net32_t flags; /* [17] VL15 [16] SLR [14:12] static rate
\r
123 [11:8] SL [3] C [2] E */
\r
128 struct mthca_inline_seg {
\r
129 uint32_t byte_count;
\r
133 static inline unsigned long align(unsigned long val, unsigned long align)
\r
135 return (val + align - 1) & ~(align - 1);
\r
138 #endif /* MTHCA_WQE_H */
\r