From: Hal Rosenstock <hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: "linux-rdma
(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH opensm] osm_[sm sa]_mad_ctrl.c: Improve unsupported attribute error messages
Date: Wed, 28 May 2014 09:06:45 -0400 [thread overview]
Message-ID: <5385DF65.10207@dev.mellanox.co.il> (raw)
Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
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;
--
1.7.8.2
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2014-05-28 13:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5385DF65.10207@dev.mellanox.co.il \
--to=hal-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.