From: Noa Osherovich <noaos@mellanox.com>
To: "dledford@redhat.com" <dledford@redhat.com>,
Jason Gunthorpe <jgg@mellanox.com>,
Leon Romanovsky <leonro@mellanox.com>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Noa Osherovich <noaos@mellanox.com>,
Edward Srouji <edwards@mellanox.com>
Subject: [PATCH rdma-core 7/8] Documentation: Add extended QP to pyverbs's doc
Date: Tue, 31 Dec 2019 09:19:34 +0000 [thread overview]
Message-ID: <20191231091915.23874-8-noaos@mellanox.com> (raw)
In-Reply-To: <20191231091915.23874-1-noaos@mellanox.com>
Add a code snippet to demonstrate an extended QP creation using
pyverbs.
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
Reviewed-by: Edward Srouji <edwards@mellanox.com>
---
Documentation/pyverbs.md | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Documentation/pyverbs.md b/Documentation/pyverbs.md
index c7dddd598303..325e214fca0e 100755
--- a/Documentation/pyverbs.md
+++ b/Documentation/pyverbs.md
@@ -339,6 +339,30 @@ wr = pwr.SendWR()
wr.set_wr_ud(ah, 0x1101, 0) # in real life, use real values
udqp.post_send(wr)
```
+###### Extended QP
+An extended QP exposes a new set of QP send operations to the user -
+extensibility for new send opcodes, vendor specific send opcodes and even vendor
+specific QP types.
+Pyverbs now exposes the needed interface to create such a QP.
+Note that the IBV_QP_INIT_ATTR_SEND_OPS_FLAGS in the `comp_mask` is mandatory
+when using the extended QP's new post send mechanism.
+```python
+from pyverbs.qp import QPCap, QPInitAttrEx, QPAttr, QPEx
+import pyverbs.device as d
+import pyverbs.enums as e
+from pyverbs.pd import PD
+from pyverbs.cq import CQ
+
+
+ctx = d.Context(name='mlx5_0')
+pd = PD(ctx)
+cq = CQ(ctx, 100)
+cap = QPCap(100, 10, 1, 1, 0)
+qia = QPInitAttrEx(qp_type=e.IBV_QPT_UD, scq=cq, rcq=cq, cap=cap, pd=pd,
+ comp_mask=e.IBV_QP_INIT_ATTR_SEND_OPS_FLAGS| \
+ e.IBV_QP_INIT_ATTR_PD)
+qp = QPEx(ctx, qia)
+```
##### XRCD
The following code demonstrates creation of an XRCD object.
--
2.21.0
next prev parent reply other threads:[~2019-12-31 9:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-31 9:19 [PATCH rdma-core 0/8] pyverbs: Add support for the new post send API Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 1/8] pyverbs: Add support for memory window Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 2/8] pyverbs: Add TSO support Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 3/8] tests: Decrease maximal TSO header size Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 4/8] tests: Use post_recv in the right place Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 5/8] pyverbs: Expose MR's length property Noa Osherovich
2019-12-31 9:19 ` [PATCH rdma-core 6/8] pyverbs: Introduce extended QP and new post send Noa Osherovich
2019-12-31 9:19 ` Noa Osherovich [this message]
2019-12-31 9:19 ` [PATCH rdma-core 8/8] tests: Add test using the new post send API Noa Osherovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191231091915.23874-8-noaos@mellanox.com \
--to=noaos@mellanox.com \
--cc=dledford@redhat.com \
--cc=edwards@mellanox.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).