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
53 MTHCA_MLX_VL15 = 1 << 17,
\r
54 MTHCA_MLX_SLR = 1 << 16
\r
58 MTHCA_INLINE_SEG = 1 << 31
\r
62 MTHCA_INVAL_LKEY = 0x100,
\r
63 MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256,
\r
64 MTHCA_ARBEL_MAX_WQES_PER_SEND_DB = 255
\r
67 struct mthca_next_seg {
\r
68 ib_net32_t nda_op; /* [31:6] next WQE [4:0] next opcode */
\r
69 ib_net32_t ee_nds; /* [31:8] next EE [7] DBD [6] F [5:0] next WQE size */
\r
70 ib_net32_t flags; /* [3] CQ [2] Event [1] Solicit */
\r
71 ib_net32_t imm; /* immediate data */
\r
74 struct mthca_tavor_ud_seg {
\r
78 uint32_t reserved2[4];
\r
81 uint32_t reserved3[2];
\r
84 struct mthca_arbel_ud_seg {
\r
88 uint32_t reserved[2];
\r
91 struct mthca_bind_seg {
\r
92 ib_net32_t flags; /* [31] Atomic [30] rem write [29] rem read */
\r
94 ib_net32_t new_rkey;
\r
100 struct mthca_raddr_seg {
\r
106 struct mthca_atomic_seg {
\r
107 ib_net64_t swap_add;
\r
108 ib_net64_t compare;
\r
111 struct mthca_data_seg {
\r
112 ib_net32_t byte_count;
\r
117 struct mthca_mlx_seg {
\r
120 ib_net32_t flags; /* [17] VL15 [16] SLR [14:12] static rate
\r
121 [11:8] SL [3] C [2] E */
\r
126 struct mthca_inline_seg {
\r
127 uint32_t byte_count;
\r
131 static inline unsigned long align(unsigned long val, unsigned long align)
\r
133 return (val + align - 1) & ~(align - 1);
\r
136 #endif /* MTHCA_WQE_H */
\r