From patchwork Thu Aug 18 17:31:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 9288817 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 0E6E46086A for ; Fri, 19 Aug 2016 01:07:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F11C329197 for ; Fri, 19 Aug 2016 01:07:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5C5F292A5; Fri, 19 Aug 2016 01:07:35 +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 6F635291EF for ; Fri, 19 Aug 2016 01:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753580AbcHSBHd (ORCPT ); Thu, 18 Aug 2016 21:07:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49200 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753897AbcHSBHc (ORCPT ); Thu, 18 Aug 2016 21:07:32 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 0A16D1556C; Thu, 18 Aug 2016 17:32:32 +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-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u7IHWUA4018884; Thu, 18 Aug 2016 13:32:31 -0400 From: Jarod Wilson To: linux-rdma@vger.kernel.org Cc: Jarod Wilson , Gil Rockah Subject: [PATCH perftest 02/23] perftest_resources: print error received for debug convenience Date: Thu, 18 Aug 2016 13:31:57 -0400 Message-Id: <1471541538-20270-3-git-send-email-jarod@redhat.com> In-Reply-To: <1471541538-20270-1-git-send-email-jarod@redhat.com> References: <1471541538-20270-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Thu, 18 Aug 2016 17:32:32 +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 CC: Gil Rockah Signed-off-by: Jarod Wilson --- src/perftest_resources.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/perftest_resources.c b/src/perftest_resources.c index f23dabb..4dc0705 100755 --- a/src/perftest_resources.c +++ b/src/perftest_resources.c @@ -1855,7 +1855,7 @@ int ctx_modify_dc_qp_to_init(struct ibv_qp *qp,struct perftest_parameters *user_ #endif if (err) { - fprintf(stderr, "Failed to modify QP to INIT\n"); + fprintf(stderr, "Failed to modify QP to INIT (%s)\n", strerror(err)); return 1; } return 0; @@ -1951,7 +1951,7 @@ int ctx_modify_qp_to_init(struct ibv_qp *qp,struct perftest_parameters *user_par ret = ibv_modify_qp(qp,&attr,flags); if (ret) { - fprintf(stderr, "Failed to modify QP to INIT, ret=%d\n",ret); + fprintf(stderr, "Failed to modify QP to INIT, (%s)\n",strerror(ret)); return 1; } return 0; @@ -2261,7 +2261,7 @@ int ctx_connect(struct pingpong_context *ctx, err = ibv_query_qp(ctx->qp[i], &qp_attr, IBV_QP_AV, &init_attr); if (err) - fprintf(stderr, "ibv_query_qp failed to get ah_attr\n"); + fprintf(stderr, "ibv_query_qp failed to get ah_attr (%s)\n", strerror(err)); else qp_static_rate = (int)(qp_attr.ah_attr.static_rate); @@ -2816,7 +2816,7 @@ int perform_warm_up(struct pingpong_context *ctx,struct perftest_parameters *use #endif if (err) { - fprintf(stderr,"Couldn't post send during warm up: qp %d scnt=%d \n",index,warmindex); + fprintf(stderr,"Couldn't post send during warm up: qp %d scnt=%d, err=%s\n",index,warmindex,strerror(err)); return_value = 1; goto cleaning; } @@ -4016,7 +4016,7 @@ int run_iter_lat_write(struct pingpong_context *ctx,struct perftest_parameters * err = ibv_post_send(ctx->qp[0],&ctx->wr[0],&bad_wr); #endif if (err) { - fprintf(stderr,"Couldn't post send: scnt=%lu\n",scnt); + fprintf(stderr,"%s: Couldn't post send: scnt=%lu, err=%s\n",__func__,scnt,strerror(err)); return 1; } } @@ -4110,7 +4110,7 @@ int run_iter_lat(struct pingpong_context *ctx,struct perftest_parameters *user_p err = ibv_post_send(ctx->qp[0],&ctx->wr[0],&bad_wr); #endif if (err) { - fprintf(stderr,"Couldn't post send: scnt=%lu\n",scnt); + fprintf(stderr,"%s: Couldn't post send: scnt=%lu, err=%s\n",__func__,scnt,strerror(err)); return 1; } @@ -4310,7 +4310,7 @@ int run_iter_lat_send(struct pingpong_context *ctx,struct perftest_parameters *u err = ibv_post_send(ctx->qp[0],&ctx->wr[0],&bad_wr); #endif if (err) { - fprintf(stderr,"Couldn't post send: scnt=%lu \n",scnt); + fprintf(stderr,"%s: Couldn't post send: scnt=%lu, err=%s \n",__func__,scnt,strerror(err)); return 1; }