From: Hal Rosenstock <hnrose-Wuw85uim5zDR7s880joybQ@public.gmane.org>
To: sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] opensm/osm_mcast_tbl: Fix size of port mask table array
Date: Mon, 2 Nov 2009 14:06:54 -0500 [thread overview]
Message-ID: <20091102190654.GA18937@comcast.net> (raw)
Should be IB_MCAST_POSITION_MAX + 1 rather than just IB_MCAST_POSITION_MAX
Signed-off-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
diff --git a/opensm/include/opensm/osm_mcast_tbl.h b/opensm/include/opensm/osm_mcast_tbl.h
index 6d3f083..0745b5b 100644
--- a/opensm/include/opensm/osm_mcast_tbl.h
+++ b/opensm/include/opensm/osm_mcast_tbl.h
@@ -76,7 +76,7 @@ typedef struct osm_mcast_fwdbl {
uint16_t num_entries;
uint16_t max_mlid_ho;
uint16_t mft_depth;
- uint16_t(*p_mask_tbl)[][IB_MCAST_POSITION_MAX];
+ uint16_t(*p_mask_tbl)[][IB_MCAST_POSITION_MAX + 1];
} osm_mcast_tbl_t;
/*
* FIELDS
@@ -106,7 +106,7 @@ typedef struct osm_mcast_fwdbl {
*
* p_mask_tbl
* Pointer to a two dimensional array of port_masks for this switch.
-* The first dimension is MLID, the second dimension is mask position.
+* The first dimension is MLID offset, second dimension is mask position.
* This pointer is null for switches that do not support multicast.
*
* SEE ALSO
diff --git a/opensm/opensm/osm_mcast_tbl.c b/opensm/opensm/osm_mcast_tbl.c
index 818f2e0..c2c5395 100644
--- a/opensm/opensm/osm_mcast_tbl.c
+++ b/opensm/opensm/osm_mcast_tbl.c
@@ -119,7 +119,7 @@ void osm_mcast_tbl_set(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho,
int osm_mcast_tbl_realloc(IN osm_mcast_tbl_t * p_tbl, IN uintn_t mlid_offset)
{
size_t mft_depth, size;
- uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX];
+ uint16_t (*p_mask_tbl)[][IB_MCAST_POSITION_MAX + 1];
if (mlid_offset < p_tbl->mft_depth)
goto done;
--
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-11-02 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-02 19:06 Hal Rosenstock [this message]
[not found] ` <20091102190654.GA18937-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-11-02 23:51 ` [PATCH] opensm/osm_mcast_tbl: Fix size of port mask table array 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=20091102190654.GA18937@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox