From patchwork Wed May 28 13:06:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 4255001 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0B9999F32B for ; Wed, 28 May 2014 13:06:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06A1F20256 for ; Wed, 28 May 2014 13:06:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D71DA201C7 for ; Wed, 28 May 2014 13:06:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752787AbaE1NGv (ORCPT ); Wed, 28 May 2014 09:06:51 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:39532 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644AbaE1NGu (ORCPT ); Wed, 28 May 2014 09:06:50 -0400 Received: by mail-we0-f179.google.com with SMTP id q59so11415205wes.10 for ; Wed, 28 May 2014 06:06:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=nLI5VXvBucus9Rjpr68hVgErGs19i9ehA38vL+D4Ao8=; b=HLkuFCIiLEz1f3pVcm+kRbL/E3Tc+3+crNYBcyuo6TCqx7leQVJ/+QBBAt4nmcGez7 r4IO57iwQ+PRjcbPt0nn4+2qm79zwBp0YUo7o5nYxBoE/2ZZNC6fSel0dqFgI6E1TZ1K rirTV2MF2KHJFMkMeFXlTvwWR/PqGloUPd8eaC8idHr5siS68syY9UurqxbmV96jFuaM Lc/F6znUc1U5rsFvtl90H1C27DkPv/GoDluqJZZA7I70+y4PI5SppR+Gzw4UfRfRHFtk WNdhsqLflQd4f9EStVOjyaxVLOSJ+/B0MQkC9oqbQFqB5G8dhQ8eFawZQfy6B/A/EZkR zJ9A== X-Gm-Message-State: ALoCoQm6IGlohVneLRe5/B4IpDB16OFF7vuZkXEm/ClIsgbzn1ZK3WuquoOXHLxK4ZukdBJgXCi1 X-Received: by 10.180.108.106 with SMTP id hj10mr458245wib.53.1401282408238; Wed, 28 May 2014 06:06:48 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id vc2sm43144219wjc.2.2014.05.28.06.06.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 28 May 2014 06:06:47 -0700 (PDT) Message-ID: <5385DF65.10207@dev.mellanox.co.il> Date: Wed, 28 May 2014 09:06:45 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" Subject: [PATCH opensm] osm_[sm sa]_mad_ctrl.c: Improve unsupported attribute error messages Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hal Rosenstock --- opensm/osm_sa_mad_ctrl.c | 5 +++-- opensm/osm_sm_mad_ctrl.c | 20 ++++++++++++-------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/opensm/osm_sa_mad_ctrl.c b/opensm/osm_sa_mad_ctrl.c index 72ebe6a..b838787 100644 --- a/opensm/osm_sa_mad_ctrl.c +++ b/opensm/osm_sa_mad_ctrl.c @@ -242,8 +242,9 @@ static void sa_mad_ctrl_process(IN osm_sa_mad_ctrl_t * p_ctrl, default: OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 1A01: " - "Unsupported attribute 0x%X\n", - cl_ntoh16(p_sa_mad->attr_id)); + "Unsupported attribute 0x%X (%s)\n", + cl_ntoh16(p_sa_mad->attr_id), + ib_get_sa_attr_str(p_sa_mad->attr_id)); osm_dump_sa_mad_v2(p_ctrl->p_log, p_sa_mad, FILE_ID, OSM_LOG_ERROR); } diff --git a/opensm/osm_sm_mad_ctrl.c b/opensm/osm_sm_mad_ctrl.c index d166587..85ad088 100644 --- a/opensm/osm_sm_mad_ctrl.c +++ b/opensm/osm_sm_mad_ctrl.c @@ -262,8 +262,9 @@ static void sm_mad_ctrl_process_get_resp(IN osm_sm_mad_ctrl_t * p_ctrl, default: cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown); OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3103: " - "Unsupported attribute 0x%X\n", - cl_ntoh16(p_smp->attr_id)); + "Unsupported attribute 0x%X (%s)\n", + cl_ntoh16(p_smp->attr_id), + ib_get_sm_attr_str(p_smp->attr_id)); osm_dump_dr_smp_v2(p_ctrl->p_log, p_smp, FILE_ID, OSM_LOG_ERROR); osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); goto Exit; @@ -392,8 +393,9 @@ static void sm_mad_ctrl_process_set(IN osm_sm_mad_ctrl_t * p_ctrl, default: cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown); OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3107: " - "Unsupported attribute 0x%X\n", - cl_ntoh16(p_smp->attr_id)); + "Unsupported attribute 0x%X (%s)\n", + cl_ntoh16(p_smp->attr_id), + ib_get_sm_attr_str(p_smp->attr_id)); osm_dump_dr_smp_v2(p_ctrl->p_log, p_smp, FILE_ID, OSM_LOG_ERROR); osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); goto Exit; @@ -471,8 +473,9 @@ static void sm_mad_ctrl_process_trap(IN osm_sm_mad_ctrl_t * p_ctrl, default: cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown); OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3109: " - "Unsupported attribute 0x%X\n", - cl_ntoh16(p_smp->attr_id)); + "Unsupported attribute 0x%X (%s)\n", + cl_ntoh16(p_smp->attr_id), + ib_get_sm_attr_str(p_smp->attr_id)); osm_dump_dr_smp_v2(p_ctrl->p_log, p_smp, FILE_ID, OSM_LOG_ERROR); osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); goto Exit; @@ -540,8 +543,9 @@ static void sm_mad_ctrl_process_trap_repress(IN osm_sm_mad_ctrl_t * p_ctrl, default: cl_atomic_inc(&p_ctrl->p_stats->qp0_mads_rcvd_unknown); OSM_LOG(p_ctrl->p_log, OSM_LOG_ERROR, "ERR 3105: " - "Unsupported attribute 0x%X\n", - cl_ntoh16(p_smp->attr_id)); + "Unsupported attribute 0x%X (%s)\n", + cl_ntoh16(p_smp->attr_id), + ib_get_sm_attr_str(p_smp->attr_id)); osm_dump_dr_smp_v2(p_ctrl->p_log, p_smp, FILE_ID, OSM_LOG_ERROR); osm_mad_pool_put(p_ctrl->p_mad_pool, p_madw); break;