* [PATCH] opensm: fix LFT allocation size
[not found] ` <20091016105811.GM20210@me>
@ 2009-10-16 11:53 ` Sasha Khapyorsky
0 siblings, 0 replies; only message in thread
From: Sasha Khapyorsky @ 2009-10-16 11:53 UTC (permalink / raw)
To: linux-rdma; +Cc: Dale Purdy, Hal Rosenstock
Fix LFT allocation size - count zero entry as well.
Signed-off-by: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/opensm/osm_switch.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_switch.c b/opensm/opensm/osm_switch.c
index ed0bc66..67e3ede 100644
--- a/opensm/opensm/osm_switch.c
+++ b/opensm/opensm/osm_switch.c
@@ -497,8 +497,7 @@ static int alloc_lft(IN osm_switch_t * p_sw, uint16_t lids)
uint16_t lft_size;
/* Ensure LFT is in units of LFT block size */
- lft_size = (lids + IB_SMP_DATA_SIZE - 1) / IB_SMP_DATA_SIZE * IB_SMP_DATA_SIZE;
-
+ lft_size = (lids / IB_SMP_DATA_SIZE + 1) * IB_SMP_DATA_SIZE;
if (lft_size > p_sw->lft_size) {
uint8_t *new_lft = realloc(p_sw->lft, lft_size);
if (!new_lft)
--
1.6.5
--
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-16 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20091016002810.GA16243@sgi.com>
[not found] ` <20091016105811.GM20210@me>
2009-10-16 11:53 ` [PATCH] opensm: fix LFT allocation size Sasha Khapyorsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox