[openib-general] [PATCH] opensm: prevent ports duplication in partition config
Sasha Khapyorsky
sashak at voltaire.com
Wed May 3 17:05:39 PDT 2006
Hello Hal,
There is fix for case when port is repeatedly configured as member of
the same partition. If membership is different this may broke pkey tables
update code.
Sasha.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
osm/opensm/osm_prtn.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/osm/opensm/osm_prtn.c b/osm/opensm/osm_prtn.c
index d2ed77b..1ebecb7 100644
--- a/osm/opensm/osm_prtn.c
+++ b/osm/opensm/osm_prtn.c
@@ -127,7 +127,8 @@ ib_api_status_t osm_prtn_add_port(osm_lo
return status;
}
- if (osm_prtn_is_guid(p, guid)) {
+ if (cl_map_remove(&p->part_guid_tbl, guid) ||
+ cl_map_remove(&p->full_guid_tbl, guid)) {
osm_log(p_log, OSM_LOG_VERBOSE, "osm_prtn_add_port: "
"port 0x%" PRIx64 " already in "
"partition \'%s\' (0x%04x). Will overwrite\n",
More information about the general
mailing list