All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yishai Hadas <yishaih@nvidia.com>
To: <linux-rdma@vger.kernel.org>
Cc: <jgg@mellanox.com>, <yishaih@mellanox.com>, <maorg@mellanox.com>,
	<phaddad@nvidia.com>, Shachar Kagan <skagan@nvidia.com>,
	Ido Kalir <idok@nvidia.com>, Edward Srouji <edwards@nvidia.com>
Subject: [PATCH rdma-core 4/4] tests: Add query QP data in order coverage
Date: Wed, 9 Jun 2021 18:59:32 +0300	[thread overview]
Message-ID: <20210609155932.218005-5-yishaih@nvidia.com> (raw)
In-Reply-To: <20210609155932.218005-1-yishaih@nvidia.com>

From: Shachar Kagan <skagan@nvidia.com>

Add a test which queries a QP in RTS state and check if data is
guaranteed to be in order.

Signed-off-by: Shachar Kagan <skagan@nvidia.com>
Reviewed-by: Ido Kalir <idok@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
---
 tests/test_qp.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/test_qp.py b/tests/test_qp.py
index 53b1d32..a623cb3 100644
--- a/tests/test_qp.py
+++ b/tests/test_qp.py
@@ -228,6 +228,19 @@ class QPTest(PyverbsAPITestCase):
         """
         self.query_qp_common_test(e.IBV_QPT_RAW_PACKET)
 
+    def test_query_data_in_order(self):
+        """
+        Queries an UD QP data in order after moving it to RTS state.
+        Verifies that the result from the query is valid.
+        """
+        with PD(self.ctx) as pd:
+            with CQ(self.ctx, 100, None, None, 0) as cq:
+                qia = u.get_qp_init_attr(cq, self.attr)
+                qia.qp_type = e.IBV_QPT_UD
+                qp = self.create_qp(pd, qia, False, True, self.ib_port)
+                is_data_in_order = qp.query_data_in_order(e.IBV_WR_SEND)
+                self.assertIn(is_data_in_order, [0, 1], 'Data in order result is not valid')
+
     def test_modify_ud_qp(self):
         """
         Queries a UD QP after calling modify(). Verifies that its properties are
-- 
1.8.3.1


      parent reply	other threads:[~2021-06-09 16:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 15:59 [PATCH rdma-core 0/4] verbs: Introduce ibv_query_qp_data_in_order() verb Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 1/4] " Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 2/4] mlx5: Implement " Yishai Hadas
2021-06-10  5:50   ` Leon Romanovsky
2021-06-10 11:42     ` Jason Gunthorpe
2021-06-10 11:50       ` Leon Romanovsky
2021-06-10 12:51         ` Yishai Hadas
2021-06-16  8:03           ` Yishai Hadas
2021-06-09 15:59 ` [PATCH rdma-core 3/4] pyverbs: Add query QP data in order support Yishai Hadas
2021-06-09 15:59 ` Yishai Hadas [this message]

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=20210609155932.218005-5-yishaih@nvidia.com \
    --to=yishaih@nvidia.com \
    --cc=edwards@nvidia.com \
    --cc=idok@nvidia.com \
    --cc=jgg@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maorg@mellanox.com \
    --cc=phaddad@nvidia.com \
    --cc=skagan@nvidia.com \
    --cc=yishaih@mellanox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.