/* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
/* Authors: Bernard Metzler <bmt@zurich.ibm.com> */
/* Copyright (c) 2008-2019, IBM Corporation */
#define SIW_NODE_DESC_COMMON "Software iWARP stack"
#define SIW_ABI_VERSION 1
#define SIW_UOBJ_MAX_KEY 0x08FFFF
#define SIW_INVAL_UOBJ_KEY (SIW_UOBJ_MAX_KEY + 1)
struct siw_uresp_create_cq {
struct siw_uresp_create_qp {
struct siw_uresp_reg_mr {
struct siw_uresp_create_srq {
struct siw_uresp_alloc_ctx {
/* provider internal SQE */
* below opcodes valid for
/* Keep it same as ibv_sge to allow for memcpy */
* Inline data are kept within the work request itself occupying
* the space of sge[1] .. sge[n]. Therefore, __inline__ data cannot be
* supported if SIW_MAX_SGE is below 2 elements.
#define SIW_MAX_INLINE (sizeof(struct siw_sge) * (SIW_MAX_SGE - 1))
#error "SIW_MAX_SGE must be at least 2"
SIW_WQE_INLINE = (1 << 1),
SIW_WQE_SIGNALLED = (1 << 2),
SIW_WQE_SOLICITED = (1 << 3),
SIW_WQE_READ_FENCE = (1 << 4),
SIW_WQE_REM_INVAL = (1 << 5),
SIW_WQE_COMPLETED = (1 << 6)
/* Contains enum siw_opcode values */
struct siw_sge sge[SIW_MAX_SGE];
/* Receive Queue Element */
* only used by kernel driver,
struct siw_sge sge[SIW_MAX_SGE];
SIW_NOTIFY_SOLICITED = (1 << 0),
SIW_NOTIFY_NEXT_COMPLETION = (1 << 1),
SIW_NOTIFY_MISSED_EVENTS = (1 << 2),
SIW_NOTIFY_ALL = SIW_NOTIFY_SOLICITED | SIW_NOTIFY_NEXT_COMPLETION |
/* QP number or QP pointer */
* Shared structure between user and kernel