From patchwork Wed Feb 7 17:05:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 10205669 X-Patchwork-Delegate: ira.weiny@intel.com 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 63CE66020F for ; Wed, 7 Feb 2018 17:05:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 521D028A51 for ; Wed, 7 Feb 2018 17:05:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44EF728E2D; Wed, 7 Feb 2018 17:05:46 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 B9E9E28A51 for ; Wed, 7 Feb 2018 17:05:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754677AbeBGRFo (ORCPT ); Wed, 7 Feb 2018 12:05:44 -0500 Received: from mail-qk0-f196.google.com ([209.85.220.196]:43786 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754528AbeBGRFo (ORCPT ); Wed, 7 Feb 2018 12:05:44 -0500 Received: by mail-qk0-f196.google.com with SMTP id y204so1982379qkb.10 for ; Wed, 07 Feb 2018 09:05:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=WTCg08K3QlTpXKXvfuAh6GICOLgN5ABH4FUpGLX20us=; b=RM2Azq4zUNcCFnqpA/0WBn2hGDr3DtmYx/P+dfXHoSfxdqf0KztXPgopx02hwOLGpl 5ds+WDNPoIsSoiTA1NJPmY44l6gecQQnPoj+hCORuCZh5/Ox6Sjg0wkYBQIzmYgIavIK VK84LM+xUgTTE+YcEeuQ+zX5gctif2LH8ZD9i48ksPtzWVxx4h+nCVTWGNWKaIYKPCr+ JnkSj/ieA+8MH8S23ZgOtKV35SNvSceQZ1OBo6prZXk8STT5TIczpX/L4sLV7cMbd6e9 Ix7dSwZBQ7SrdwYcwIVTQ4+A7dDbiGwfRQZ/7bCFJnMp+2IfT8fIJhdkAzqWGJym6aLh UNIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=WTCg08K3QlTpXKXvfuAh6GICOLgN5ABH4FUpGLX20us=; b=rdv7iIM8vVP7YnDjFE2DZ0zVqhK+m8l/OWC5zGxCpAwQOhk+oMxc5dZDL0b5xKuRjh SbxX7pMrmC+GU7sFWqYhQSBWU5qaewSFYFP83j8fqsGM4shFzxhOWYvae3L/tXNzfMwj Luq/QXTFadpP5CjxdF2kkWqH9R0EE0ANrX6baoKGnmNDLm6K93Rxo9Y3Z+kUcpAXU3Cq K6bjXLgjfh3DLy/LsInrIQlY5JhQCnVUh6Am2uAkcEBCqBC3A2CoNqQevspAB/XYonB9 sRZL1yxBAUDUk2KddtC+HbDEJXZdgp6rLtx0GsQdOws4A+xE76b3TfHPaZSLpyAIMTzC UeJg== X-Gm-Message-State: APf1xPBd+gETSIMyHns0lcJ0LdsU5KlVmvhv5XljkaNm4Xw7owjxdYNn IeooA19SRLkyTW7wimZTD5sGMC1p X-Google-Smtp-Source: AH8x2260mQdmdtEUjc0sEASzMlpcLC7O2Mwzt+vEpX0AGnvKAELZpABBGWTNsR/IIy0v7gzY1W7ifw== X-Received: by 10.55.20.228 with SMTP id 97mr10238591qku.158.1518023143249; Wed, 07 Feb 2018 09:05:43 -0800 (PST) Received: from [192.168.1.183] (c-73-182-207-166.hsd1.ma.comcast.net. [73.182.207.166]) by smtp.googlemail.com with ESMTPSA id e26sm1005457qkm.26.2018.02.07.09.05.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Feb 2018 09:05:42 -0800 (PST) To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCHv2 infiniband-diags] smpdump.c: Print number of bytes returned by umad_recv Message-ID: Date: Wed, 7 Feb 2018 12:05:40 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Language: en-US 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 when debug is set Signed-off-by: Hal Rosenstock --- Change from v1: Only print when debug is set src/smpdump.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/smpdump.c b/src/smpdump.c index bc8559a..efc522f 100644 --- a/src/smpdump.c +++ b/src/smpdump.c @@ -281,6 +281,9 @@ int main(int argc, char *argv[]) if (umad_recv(portid, umad, &length, -1) != mad_agent) IBPANIC("recv error: %s", strerror(errno)); + if (ibdebug) + fprintf(stdout, "%d bytes received\n", length); + if (!dump_char) { xdump(stdout, 0, smp->data, 64); if (smp->status)