From: Hal Rosenstock <hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org>
To: sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCHv2] opensm/osm_vendor_ibumad: Use OSM_UMAD_MAX_AGENTS rather than UMAD_CA_MAX_AGENTS
Date: Thu, 22 Oct 2009 09:43:00 -0400 [thread overview]
Message-ID: <20091022134300.GA28208@comcast.net> (raw)
This define controls an array in the OpenSM umad vendor layer. Moving
this define to the vendor layer aids in Windows porting. See thread
which "ends" with:
http://lists.openfabrics.org/pipermail/ofw/2009-October/005819.html
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Changes since v1:
Added patch description
diff --git a/opensm/include/vendor/osm_vendor_ibumad.h b/opensm/include/vendor/osm_vendor_ibumad.h
index e346a2e..f3a48e5 100644
--- a/opensm/include/vendor/osm_vendor_ibumad.h
+++ b/opensm/include/vendor/osm_vendor_ibumad.h
@@ -66,6 +66,8 @@ BEGIN_C_DECLS
#define OSM_DEFAULT_RETRY_COUNT 3
#define OSM_UMAD_MAX_CAS 32
#define OSM_UMAD_MAX_PORTS_PER_CA 2
+#define OSM_UMAD_MAX_AGENTS 32
+
/****s* OpenSM: Vendor UMAD/osm_ca_info_t
* NAME
* osm_ca_info_t
@@ -154,7 +156,7 @@ typedef struct _osm_vendor {
osm_ca_info_t *p_ca_info;
uint32_t timeout;
int max_retries;
- osm_bind_handle_t agents[UMAD_CA_MAX_AGENTS];
+ osm_bind_handle_t agents[OSM_UMAD_MAX_AGENTS];
char ca_names[OSM_UMAD_MAX_CAS][UMAD_CA_NAME_LEN];
vendor_match_tbl_t mtbl;
umad_port_t umad_port;
diff --git a/opensm/libvendor/osm_vendor_ibumad.c b/opensm/libvendor/osm_vendor_ibumad.c
index 8d3c680..b221335 100644
--- a/opensm/libvendor/osm_vendor_ibumad.c
+++ b/opensm/libvendor/osm_vendor_ibumad.c
@@ -288,7 +288,7 @@ static void *umad_receiver(void *p_ptr)
}
}
- if (mad_agent >= UMAD_CA_MAX_AGENTS ||
+ if (mad_agent >= OSM_UMAD_MAX_AGENTS ||
!(p_bind = p_vend->agents[mad_agent])) {
OSM_LOG(p_ur->p_log, OSM_LOG_ERROR, "ERR 5407: "
"invalid mad agent %d - dropping\n", mad_agent);
@@ -738,7 +738,7 @@ static void osm_vendor_close_port(osm_vendor_t * const p_vend)
}
if (p_vend->umad_port_id >= 0) {
- for (i = 0; i < UMAD_CA_MAX_AGENTS; i++)
+ for (i = 0; i < OSM_UMAD_MAX_AGENTS; i++)
if (p_vend->agents[i])
umad_unregister(p_vend->umad_port_id, i);
umad_close_port(p_vend->umad_port_id);
@@ -862,7 +862,7 @@ osm_vendor_bind(IN osm_vendor_t * const p_vend,
goto Exit;
}
- if (p_bind->agent_id >= UMAD_CA_MAX_AGENTS ||
+ if (p_bind->agent_id >= OSM_UMAD_MAX_AGENTS ||
p_vend->agents[p_bind->agent_id]) {
OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5427: "
"bad agent id %u or duplicate agent for class %u vers %u\n",
@@ -890,7 +890,7 @@ osm_vendor_bind(IN osm_vendor_t * const p_vend,
goto Exit;
}
- if (p_bind->agent_id1 >= UMAD_CA_MAX_AGENTS ||
+ if (p_bind->agent_id1 >= OSM_UMAD_MAX_AGENTS ||
p_vend->agents[p_bind->agent_id1]) {
OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5429: "
"bad agent id %u or duplicate agent for class 1 vers %u\n",
--
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
next reply other threads:[~2009-10-22 13:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-22 13:43 Hal Rosenstock [this message]
[not found] ` <20091022134300.GA28208-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-30 2:58 ` [PATCHv2] opensm/osm_vendor_ibumad: Use OSM_UMAD_MAX_AGENTS rather than UMAD_CA_MAX_AGENTS Sasha Khapyorsky
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=20091022134300.GA28208@comcast.net \
--to=hnrose-wuw85uim5zdr7s880joybq@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sashak-smomgflXvOZWk0Htik3J/w@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.