linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Noa Osherovich <noaos@mellanox.com>
To: dledford@redhat.com, jgg@mellanox.com, leonro@mellanox.com
Cc: linux-rdma@vger.kernel.org, Maxim Chicherin <maximc@mellanox.com>
Subject: [PATCH rdma-core 11/14] tests: Add ODP UD test
Date: Mon, 19 Aug 2019 09:58:24 +0300	[thread overview]
Message-ID: <20190819065827.26921-12-noaos@mellanox.com> (raw)
In-Reply-To: <20190819065827.26921-1-noaos@mellanox.com>

From: Maxim Chicherin <maximc@mellanox.com>

Add a TestCase for ODP/UD traffic.

Signed-off-by: Maxim Chicherin <maximc@mellanox.com>
---
 tests/test_odp.py | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/tests/test_odp.py b/tests/test_odp.py
index a9f3bf4573a5..922cd0d9aad5 100644
--- a/tests/test_odp.py
+++ b/tests/test_odp.py
@@ -1,10 +1,17 @@
 from tests.base import RDMATestCase
 from tests.utils import requires_odp, traffic
-from tests.base import RCResources
+from tests.base import RCResources, UDResources
 from pyverbs.mr import MR
 import pyverbs.enums as e
 
 
+class OdpUD(UDResources):
+    @requires_odp('ud')
+    def create_mr(self):
+        self.mr = MR(self.pd, self.msg_size + self.GRH_SIZE ,
+                     e.IBV_ACCESS_LOCAL_WRITE | e.IBV_ACCESS_ON_DEMAND)
+
+
 class OdpRC(RCResources):
     @requires_odp('rc')
     def create_mr(self):
@@ -16,7 +23,7 @@ class OdpTestCase(RDMATestCase):
     def setUp(self):
         super(OdpTestCase, self).setUp()
         self.iters = 100
-        self.qp_dict = {'rc': OdpRC}
+        self.qp_dict = {'rc': OdpRC, 'ud': OdpUD}
 
     def create_players(self, qp_type):
         client = self.qp_dict[qp_type](self.dev_name, self.ib_port, self.gid_index)
@@ -28,3 +35,7 @@ class OdpTestCase(RDMATestCase):
     def test_odp_rc_traffic(self):
         client, server = self.create_players('rc')
         traffic(client, server, self.iters, self.gid_index, self.ib_port)
+
+    def test_odp_ud_traffic(self):
+        client, server = self.create_players('ud')
+        traffic(client, server, self.iters, self.gid_index, self.ib_port)
-- 
2.21.0


  parent reply	other threads:[~2019-08-19  6:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19  6:58 [PATCH rdma-core 00/14] rdma-core tests infrastructure Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 01/14] pyverbs/tests: Rename base class Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 02/14] pyverbs: Move tests to a stand-alone directory Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 03/14] build: Add pyverbs-based test to the build Noa Osherovich
2019-08-19 13:50   ` Jason Gunthorpe
2019-08-20 13:00     ` Noa Osherovich
2019-08-22 16:18       ` Leon Romanovsky
2019-08-22 16:52         ` Jason Gunthorpe
2019-09-01 13:30           ` Noa Osherovich
2019-09-09 10:29             ` Leon Romanovsky
2019-09-09 10:39               ` Noa Osherovich
2019-09-09 11:26                 ` Leon Romanovsky
2019-09-09 11:30                   ` Noa Osherovich
2019-09-09 11:38                     ` Leon Romanovsky
2019-09-09 11:34                   ` Leon Romanovsky
2019-08-19  6:58 ` [PATCH rdma-core 04/14] tests: BaseResources Class Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 05/14] tests: RDMATestCase Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 06/14] tests: TrafficResources class Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 07/14] tests: RCResources and UDResources classes Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 08/14] tests: ODP requires decorator Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 09/14] tests: Add traffic helper methods Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 10/14] tests: Add ODP RC test Noa Osherovich
2019-08-19  6:58 ` Noa Osherovich [this message]
2019-08-19  6:58 ` [PATCH rdma-core 12/14] tests: Fix test locating process Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 13/14] Documentation: Add background for rdma-core tests Noa Osherovich
2019-08-19  6:58 ` [PATCH rdma-core 14/14] tests: Unify API tests' output 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=20190819065827.26921-12-noaos@mellanox.com \
    --to=noaos@mellanox.com \
    --cc=dledford@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=maximc@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 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).