From patchwork Mon Aug 19 06:58:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noa Osherovich X-Patchwork-Id: 11100337 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A8F89112C for ; Mon, 19 Aug 2019 06:58:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97DBE28590 for ; Mon, 19 Aug 2019 06:58:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B3EB285B8; Mon, 19 Aug 2019 06:58:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCC0628590 for ; Mon, 19 Aug 2019 06:58:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726810AbfHSG6f (ORCPT ); Mon, 19 Aug 2019 02:58:35 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:53174 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726464AbfHSG6e (ORCPT ); Mon, 19 Aug 2019 02:58:34 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from noaos@mellanox.com) with ESMTPS (AES256-SHA encrypted); 19 Aug 2019 09:58:31 +0300 Received: from reg-l-vrt-059-007.mtl.labs.mlnx (reg-l-vrt-059-007.mtl.labs.mlnx [10.135.59.7]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x7J6wUNN004602; Mon, 19 Aug 2019 09:58:31 +0300 From: Noa Osherovich To: dledford@redhat.com, jgg@mellanox.com, leonro@mellanox.com Cc: linux-rdma@vger.kernel.org, Maxim Chicherin Subject: [PATCH rdma-core 11/14] tests: Add ODP UD test Date: Mon, 19 Aug 2019 09:58:24 +0300 Message-Id: <20190819065827.26921-12-noaos@mellanox.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190819065827.26921-1-noaos@mellanox.com> References: <20190819065827.26921-1-noaos@mellanox.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Maxim Chicherin Add a TestCase for ODP/UD traffic. Signed-off-by: Maxim Chicherin --- 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)