From patchwork Thu May 6 18:27:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Heinz X-Patchwork-Id: 97423 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o46IRHdA009070 for ; Thu, 6 May 2010 18:27:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753577Ab0EFS1R (ORCPT ); Thu, 6 May 2010 14:27:17 -0400 Received: from avexcashub1.qlogic.com ([198.70.193.61]:29713 "EHLO avexcashub1.qlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699Ab0EFS1Q (ORCPT ); Thu, 6 May 2010 14:27:16 -0400 Received: from MNEXCASHUB2.qlogic.org (10.33.2.104) by avexcashub1.qlogic.org (10.1.4.161) with Microsoft SMTP Server (TLS) id 8.1.375.2; Thu, 6 May 2010 11:27:15 -0700 Received: from MNEXMB1.qlogic.org ([fe80::c6b:fda:afec:79a1]) by MNEXCASHUB2.qlogic.org ([::1]) with mapi; Thu, 6 May 2010 13:27:14 -0500 From: Mike Heinz To: Sasha Khapyorsky , "linux-rdma@vger.kernel.org" , "ewg@openfabrics.org" Date: Thu, 6 May 2010 13:27:13 -0500 Subject: [PATCH] management: adding mad_dump_fields to libibmad Thread-Topic: [PATCH] management: adding mad_dump_fields to libibmad Thread-Index: AcrtSb9AJN60kNkbS62MpePZ8Rjs7Q== Message-ID: <4C2744E8AD2982428C5BFE523DF8CDCB49A4740CD8@MNEXMB1.qlogic.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 06 May 2010 18:27:18 +0000 (UTC) diff --git a/libibmad/include/infiniband/mad.h b/libibmad/include/infiniband/mad.h index 02ef551..0478c2b 100644 --- a/libibmad/include/infiniband/mad.h +++ b/libibmad/include/infiniband/mad.h @@ -1031,6 +1031,9 @@ MAD_EXPORT ib_mad_dump_fn mad_dump_perfcounters_xmt_disc, mad_dump_perfcounters_rcv_err, mad_dump_portsamples_control; +MAD_EXPORT void mad_dump_fields(char *buf, int bufsz, void *val, int valsz, + int start, int end); + MAD_EXPORT int ibdebug; #if __BYTE_ORDER == __LITTLE_ENDIAN diff --git a/libibmad/src/dump.c b/libibmad/src/dump.c index 335e190..cc9c10f 100644 --- a/libibmad/src/dump.c +++ b/libibmad/src/dump.c @@ -671,6 +671,11 @@ static int _dump_fields(char *buf, int bufsz, void *data, int start, int end) return (int)(s - buf); } +void mad_dump_fields(char *buf, int bufsz, void *val, int valsz, int start, int end) +{ + return _dump_fields(buf, bufsz, val, start, end); +} + void mad_dump_nodedesc(char *buf, int bufsz, void *val, int valsz) { strncpy(buf, val, bufsz); diff --git a/libibmad/src/libibmad.map b/libibmad/src/libibmad.map index e2d0b05..5778e3e 100644 --- a/libibmad/src/libibmad.map +++ b/libibmad/src/libibmad.map @@ -20,6 +20,7 @@ IBMAD_1.3 { mad_dump_nodedesc; mad_dump_nodeinfo; mad_dump_opervls; + mad_dump_fields; mad_dump_perfcounters; mad_dump_perfcounters_ext; mad_dump_perfcounters_xmt_sl;