linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OpenSM: LFT update breaks if IB_SMP_DATA_SIZE changes
@ 2015-10-13 13:25 Jens Domke
       [not found] ` <1444742750-23875-1-git-send-email-jens.domke-PZVgAJowwIsUtdQbppsyvg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Jens Domke @ 2015-10-13 13:25 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA; +Cc: Hal Rosenstock

This is only a precautionary patch for a theoretical
bug which would arise if someone redefines IB_SMP_DATA_SIZE
to a values !=64.

ucast_mgr_pipeline_fwd_tbl() calculates the max. number of
blocks to update using 64 explicitly, while set_lft_block()
uses IB_SMP_DATA_SIZE.
If IB_SMP_DATA_SIZE != 64 then switches would receive too few
or too many blocks.

Signed-off-by: Jens Domke <jens.domke-PZVgAJowwIsUtdQbppsyvg@public.gmane.org>
---
 opensm/osm_ucast_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/opensm/osm_ucast_mgr.c b/opensm/osm_ucast_mgr.c
index 7ccaa77..893a70b 100644
--- a/opensm/osm_ucast_mgr.c
+++ b/opensm/osm_ucast_mgr.c
@@ -1036,7 +1036,7 @@ static void ucast_mgr_pipeline_fwd_tbl(osm_ucast_mgr_t * p_mgr)
 {
 	cl_qmap_t *tbl;
 	cl_map_item_t *item;
-	unsigned i, max_block = p_mgr->max_lid / 64 + 1;
+	unsigned i, max_block = p_mgr->max_lid / IB_SMP_DATA_SIZE + 1;
 
 	tbl = &p_mgr->p_subn->sw_guid_tbl;
 	for (i = 0; i < max_block; i++)
-- 
1.9.1

--
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] 2+ messages in thread

* Re: [PATCH] OpenSM: LFT update breaks if IB_SMP_DATA_SIZE changes
       [not found] ` <1444742750-23875-1-git-send-email-jens.domke-PZVgAJowwIsUtdQbppsyvg@public.gmane.org>
@ 2015-10-13 14:25   ` Hal Rosenstock
  0 siblings, 0 replies; 2+ messages in thread
From: Hal Rosenstock @ 2015-10-13 14:25 UTC (permalink / raw)
  To: Jens Domke, linux-rdma-u79uwXL29TY76Z2rM5mHXA

On 10/13/2015 9:25 AM, Jens Domke wrote:
> This is only a precautionary patch for a theoretical
> bug which would arise if someone redefines IB_SMP_DATA_SIZE
> to a values !=64.
> 
> ucast_mgr_pipeline_fwd_tbl() calculates the max. number of
> blocks to update using 64 explicitly, while set_lft_block()
> uses IB_SMP_DATA_SIZE.
> If IB_SMP_DATA_SIZE != 64 then switches would receive too few
> or too many blocks.
> 
> Signed-off-by: Jens Domke <jens.domke-PZVgAJowwIsUtdQbppsyvg@public.gmane.org>

Thanks. Applied.

-- Hal
--
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	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-13 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-13 13:25 [PATCH] OpenSM: LFT update breaks if IB_SMP_DATA_SIZE changes Jens Domke
     [not found] ` <1444742750-23875-1-git-send-email-jens.domke-PZVgAJowwIsUtdQbppsyvg@public.gmane.org>
2015-10-13 14:25   ` Hal Rosenstock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).