diff options
author | Or Gerlitz <ogerlitz@mellanox.com> | 2012-09-20 20:30:32 +0000 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-05-06 11:50:50 -0700 |
commit | 4b6307d82df6dac77406d98c4e580ed0e14c2b68 (patch) | |
tree | 4925c9cddbba68d590a72b5a23ffe59c9d10b38c | |
parent | aab19b7f4ad85cc9b4a0e0e0c47ab50f688a84a5 (diff) | |
download | libibverbs-4b6307d82df6dac77406d98c4e580ed0e14c2b68.tar.gz |
Add raw packet QP type
IB_QPT_RAW_PACKET allows applications to build a complete packet,
including L2 headers, when sending; on the receive side, the HW will
not strip any headers.
This QP type is designed for userspace direct access to Ethernet; for
example, by applications that do TCP/IP themselves. Only processes
with the NET_RAW capability are allowed to create raw packet QPs (the
name "raw packet QP" is supposed to suggest an analogy to AF_PACKET /
SOL_RAW sockets).
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
-rw-r--r-- | include/infiniband/verbs.h | 3 | ||||
-rw-r--r-- | man/ibv_create_qp.3 | 2 | ||||
-rw-r--r-- | man/ibv_modify_qp.3 | 10 |
3 files changed, 13 insertions, 2 deletions
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 6acfc81..8ed8a66 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -399,7 +399,8 @@ struct ibv_srq_init_attr { enum ibv_qp_type { IBV_QPT_RC = 2, IBV_QPT_UC, - IBV_QPT_UD + IBV_QPT_UD, + IBV_QPT_RAW_PACKET = 8 }; struct ibv_qp_cap { diff --git a/man/ibv_create_qp.3 b/man/ibv_create_qp.3 index 5301ad8..7feeab2 100644 --- a/man/ibv_create_qp.3 +++ b/man/ibv_create_qp.3 @@ -28,7 +28,7 @@ struct ibv_cq *send_cq; /* CQ to be associated with the Send Que struct ibv_cq *recv_cq; /* CQ to be associated with the Receive Queue (RQ) */ struct ibv_srq *srq; /* SRQ handle if QP is to be associated with an SRQ, otherwise NULL */ struct ibv_qp_cap cap; /* QP capabilities */ -enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, or IBV_QPT_UD */ +enum ibv_qp_type qp_type; /* QP Transport Service Type: IBV_QPT_RC, IBV_QPT_UC, IBV_QPT_UD or IBV_QPT_RAW_PACKET */ int sq_sig_all; /* If set, each Work Request (WR) submitted to the SQ generates a completion entry */ .in -8 }; diff --git a/man/ibv_modify_qp.3 b/man/ibv_modify_qp.3 index 9eabcdf..cb3faaa 100644 --- a/man/ibv_modify_qp.3 +++ b/man/ibv_modify_qp.3 @@ -159,6 +159,16 @@ RTR \fB IBV_QP_STATE, IBV_QP_AV, IBV_QP_PATH_MTU, \fR RTS \fB IBV_QP_STATE, IBV_QP_SQ_PSN, IBV_QP_MAX_QP_RD_ATOMIC, \fR \fB IBV_QP_RETRY_CNT, IBV_QP_RNR_RETRY, IBV_QP_TIMEOUT \fR .fi +.PP +.nf +For QP Transport Service Type \fB IBV_QPT_RAW_PACKET\fR: +.sp +Next state Required attributes +\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- +Init \fB IBV_QP_STATE, IBV_QP_PORT\fR +RTR \fB IBV_QP_STATE\fR +RTS \fB IBV_QP_STATE\fR +.fi .SH "SEE ALSO" .BR ibv_create_qp (3), .BR ibv_destroy_qp (3), |