1219820Sjeff/* 2219820Sjeff * Copyright (c) 2004, 2005 Topspin Communications. All rights reserved. 3219820Sjeff * Copyright (c) 2005 Cisco Systems. All rights reserved. 4219820Sjeff * 5219820Sjeff * This software is available to you under a choice of one of two 6219820Sjeff * licenses. You may choose to be licensed under the terms of the GNU 7219820Sjeff * General Public License (GPL) Version 2, available from the file 8219820Sjeff * COPYING in the main directory of this source tree, or the 9219820Sjeff * OpenIB.org BSD license below: 10219820Sjeff * 11219820Sjeff * Redistribution and use in source and binary forms, with or 12219820Sjeff * without modification, are permitted provided that the following 13219820Sjeff * conditions are met: 14219820Sjeff * 15219820Sjeff * - Redistributions of source code must retain the above 16219820Sjeff * copyright notice, this list of conditions and the following 17219820Sjeff * disclaimer. 18219820Sjeff * 19219820Sjeff * - Redistributions in binary form must reproduce the above 20219820Sjeff * copyright notice, this list of conditions and the following 21219820Sjeff * disclaimer in the documentation and/or other materials 22219820Sjeff * provided with the distribution. 23219820Sjeff * 24219820Sjeff * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 25219820Sjeff * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 26219820Sjeff * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 27219820Sjeff * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 28219820Sjeff * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 29219820Sjeff * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 30219820Sjeff * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31219820Sjeff * SOFTWARE. 32219820Sjeff */ 33219820Sjeff 34219820Sjeff#ifndef WQE_H 35219820Sjeff#define WQE_H 36219820Sjeff 37219820Sjeffenum { 38219820Sjeff MTHCA_SEND_DOORBELL = 0x10, 39219820Sjeff MTHCA_RECV_DOORBELL = 0x18 40219820Sjeff}; 41219820Sjeff 42219820Sjeffenum { 43219820Sjeff MTHCA_NEXT_DBD = 1 << 7, 44219820Sjeff MTHCA_NEXT_FENCE = 1 << 6, 45219820Sjeff MTHCA_NEXT_CQ_UPDATE = 1 << 3, 46219820Sjeff MTHCA_NEXT_EVENT_GEN = 1 << 2, 47219820Sjeff MTHCA_NEXT_SOLICIT = 1 << 1, 48219820Sjeff}; 49219820Sjeff 50219820Sjeffenum { 51219820Sjeff MTHCA_INLINE_SEG = 1 << 31 52219820Sjeff}; 53219820Sjeff 54219820Sjeffenum { 55219820Sjeff MTHCA_INVAL_LKEY = 0x100, 56219820Sjeff MTHCA_TAVOR_MAX_WQES_PER_RECV_DB = 256, 57219820Sjeff MTHCA_ARBEL_MAX_WQES_PER_SEND_DB = 255 58219820Sjeff}; 59219820Sjeff 60219820Sjeffstruct mthca_next_seg { 61219820Sjeff uint32_t nda_op; /* [31:6] next WQE [4:0] next opcode */ 62219820Sjeff uint32_t ee_nds; /* [31:8] next EE [7] DBD [6] F [5:0] next WQE size */ 63219820Sjeff uint32_t flags; /* [3] CQ [2] Event [1] Solicit */ 64219820Sjeff uint32_t imm; /* immediate data */ 65219820Sjeff}; 66219820Sjeff 67219820Sjeffstruct mthca_tavor_ud_seg { 68219820Sjeff uint32_t reserved1; 69219820Sjeff uint32_t lkey; 70219820Sjeff uint64_t av_addr; 71219820Sjeff uint32_t reserved2[4]; 72219820Sjeff uint32_t dqpn; 73219820Sjeff uint32_t qkey; 74219820Sjeff uint32_t reserved3[2]; 75219820Sjeff}; 76219820Sjeff 77219820Sjeffstruct mthca_arbel_ud_seg { 78219820Sjeff uint32_t av[8]; 79219820Sjeff uint32_t dqpn; 80219820Sjeff uint32_t qkey; 81219820Sjeff uint32_t reserved[2]; 82219820Sjeff}; 83219820Sjeff 84219820Sjeffstruct mthca_bind_seg { 85219820Sjeff uint32_t flags; /* [31] Atomic [30] rem write [29] rem read */ 86219820Sjeff uint32_t reserved; 87219820Sjeff uint32_t new_rkey; 88219820Sjeff uint32_t lkey; 89219820Sjeff uint64_t addr; 90219820Sjeff uint64_t length; 91219820Sjeff}; 92219820Sjeff 93219820Sjeffstruct mthca_raddr_seg { 94219820Sjeff uint64_t raddr; 95219820Sjeff uint32_t rkey; 96219820Sjeff uint32_t reserved; 97219820Sjeff}; 98219820Sjeff 99219820Sjeffstruct mthca_atomic_seg { 100219820Sjeff uint64_t swap_add; 101219820Sjeff uint64_t compare; 102219820Sjeff}; 103219820Sjeff 104219820Sjeffstruct mthca_data_seg { 105219820Sjeff uint32_t byte_count; 106219820Sjeff uint32_t lkey; 107219820Sjeff uint64_t addr; 108219820Sjeff}; 109219820Sjeff 110219820Sjeffstruct mthca_inline_seg { 111219820Sjeff uint32_t byte_count; 112219820Sjeff}; 113219820Sjeff 114219820Sjeff#endif /* WQE_H */ 115