From patchwork Fri Aug 19 19:06:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 9290785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A89586077B for ; Fri, 19 Aug 2016 19:17:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C68129540 for ; Fri, 19 Aug 2016 19:17:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FE0629543; Fri, 19 Aug 2016 19:17:09 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 299FA29540 for ; Fri, 19 Aug 2016 19:17:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754103AbcHSTRI (ORCPT ); Fri, 19 Aug 2016 15:17:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59562 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbcHSTRH (ORCPT ); Fri, 19 Aug 2016 15:17:07 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4E69581129; Fri, 19 Aug 2016 19:06:55 +0000 (UTC) Received: from hp-dl360pgen8-07.khw.lab.eng.bos.redhat.com (hp-dl360pgen8-07.khw.lab.eng.bos.redhat.com [10.16.184.47]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7JJ6sIN008019; Fri, 19 Aug 2016 15:06:54 -0400 From: Jarod Wilson To: linux-rdma@vger.kernel.org Cc: Jarod Wilson , Gil Rockah Subject: [PATCH perftest] perftest: make inline send on ocrdma work better Date: Fri, 19 Aug 2016 15:06:51 -0400 Message-Id: <1471633611-41155-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 19 Aug 2016 19:06:55 +0000 (UTC) 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 The ocrdma driver supports a maximum inline send size of 224, while the current code sets this size to 236. Add an ocrdma-specific check when setting max inline size to eliminate the need to always pass -I 224 when running ib_send_lat on ocrdma hardware. CC: Gil Rockah Signed-off-by: Jarod Wilson --- src/perftest_parameters.c | 8 ++++++++ src/perftest_parameters.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/perftest_parameters.c b/src/perftest_parameters.c index 3ffddd7..65ce731 100755 --- a/src/perftest_parameters.c +++ b/src/perftest_parameters.c @@ -1465,6 +1465,14 @@ static void ctx_set_max_inline(struct ibv_context *context,struct perftest_param } } + if (strncmp("ocrdma", user_param->ib_devname, 6) == 0) { + if (user_param->inline_size > DEF_INLINE_SEND_MAX_OCRDMA) { + fprintf(stdout, "lowering inline size to ocrdma supported maximum of %d\n", + DEF_INLINE_SEND_MAX_OCRDMA); + user_param->inline_size = DEF_INLINE_SEND_MAX_OCRDMA; + } + } + return; } /****************************************************************************** diff --git a/src/perftest_parameters.h b/src/perftest_parameters.h index 1122792..a566f42 100755 --- a/src/perftest_parameters.h +++ b/src/perftest_parameters.h @@ -133,6 +133,9 @@ #define DEF_INLINE_SEND_UD (188) #define DEF_INLINE_DC (150) +/* OCRDMA has an inline max of 224 */ +#define DEF_INLINE_SEND_MAX_OCRDMA (224) + /* Max and Min allowed values for perftest parameters. */ #define MIN_TOS (0) #define MAX_TOS (256)