wqe.h revision 219820
1145326Snyan/* 2145326Snyan * Copyright (c) 2007 Cisco, Inc. All rights reserved. 3145326Snyan * 4145326Snyan * This software is available to you under a choice of one of two 5145326Snyan * licenses. You may choose to be licensed under the terms of the GNU 6145326Snyan * General Public License (GPL) Version 2, available from the file 7145326Snyan * COPYING in the main directory of this source tree, or the 8145326Snyan * OpenIB.org BSD license below: 9145326Snyan * 10145326Snyan * Redistribution and use in source and binary forms, with or 11145326Snyan * without modification, are permitted provided that the following 12145326Snyan * conditions are met: 13145326Snyan * 14145326Snyan * - Redistributions of source code must retain the above 15145326Snyan * copyright notice, this list of conditions and the following 16145326Snyan * disclaimer. 17145326Snyan * 18145326Snyan * - Redistributions in binary form must reproduce the above 19145326Snyan * copyright notice, this list of conditions and the following 20145326Snyan * disclaimer in the documentation and/or other materials 21145326Snyan * provided with the distribution. 22145326Snyan * 23145326Snyan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24145326Snyan * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25145326Snyan * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26145326Snyan * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 27145326Snyan * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 28145326Snyan * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 29145326Snyan * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 30145326Snyan * SOFTWARE. 31145326Snyan */ 32145326Snyan 33145326Snyan#ifndef WQE_H 34145326Snyan#define WQE_H 35145326Snyan 36145326Snyanenum { 37145326Snyan MLX4_SEND_DOORBELL = 0x14, 38145326Snyan}; 39145326Snyan 40145326Snyanenum { 41145326Snyan MLX4_WQE_CTRL_FENCE = 1 << 6, 42145326Snyan MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2, 43145326Snyan MLX4_WQE_CTRL_SOLICIT = 1 << 1, 44145326Snyan}; 45145326Snyan 46145326Snyanenum { 47145326Snyan MLX4_INLINE_SEG = 1 << 31, 48145326Snyan MLX4_INLINE_ALIGN = 64, 49145326Snyan}; 50145326Snyan 51145326Snyanenum { 52145326Snyan MLX4_INVALID_LKEY = 0x100, 53145326Snyan}; 54145326Snyan 55145326Snyanstruct mlx4_wqe_ctrl_seg { 56145326Snyan uint32_t owner_opcode; 57145326Snyan uint16_t vlan_tag; 58145326Snyan uint8_t ins_vlan; 59145326Snyan uint8_t fence_size; 60145326Snyan /* 61145326Snyan * High 24 bits are SRC remote buffer; low 8 bits are flags: 62145326Snyan * [7] SO (strong ordering) 63145326Snyan * [5] TCP/UDP checksum 64145326Snyan * [4] IP checksum 65145326Snyan * [3:2] C (generate completion queue entry) 66145326Snyan * [1] SE (solicited event) 67145326Snyan * [0] FL (force loopback) 68145326Snyan */ 69145326Snyan uint32_t xrcrb_flags; 70145326Snyan /* 71145326Snyan * imm is immediate data for send/RDMA write w/ immediate; 72145326Snyan * also invalidation key for send with invalidate; input 73145326Snyan * modifier for WQEs on CCQs. 74145326Snyan */ 75145326Snyan uint32_t imm; 76145326Snyan}; 77145326Snyan 78145326Snyanstruct mlx4_wqe_datagram_seg { 79145326Snyan uint32_t av[8]; 80145326Snyan uint32_t dqpn; 81145326Snyan uint32_t qkey; 82145326Snyan uint16_t vlan; 83145326Snyan uint8_t mac[6]; 84145326Snyan}; 85145326Snyan 86145326Snyanstruct mlx4_wqe_data_seg { 87145326Snyan uint32_t byte_count; 88 uint32_t lkey; 89 uint64_t addr; 90}; 91 92struct mlx4_wqe_inline_seg { 93 uint32_t byte_count; 94}; 95 96struct mlx4_wqe_srq_next_seg { 97 uint16_t reserved1; 98 uint16_t next_wqe_index; 99 uint32_t reserved2[3]; 100}; 101 102struct mlx4_wqe_raddr_seg { 103 uint64_t raddr; 104 uint32_t rkey; 105 uint32_t reserved; 106}; 107 108struct mlx4_wqe_atomic_seg { 109 uint64_t swap_add; 110 uint64_t compare; 111}; 112 113struct mlx4_wqe_bind_seg { 114 uint32_t flags1; 115 uint32_t flags2; 116 uint32_t new_rkey; 117 uint32_t lkey; 118 uint64_t addr; 119 uint64_t length; 120}; 121 122#endif /* WQE_H */ 123