* [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned
@ 2010-06-29 13:49 Eli Dorfman (Voltaire)
[not found] ` <4C29F9E5.6030905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Eli Dorfman (Voltaire) @ 2010-06-29 13:49 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma, Vladimir Koushnir
Fixes a bug of failover between SM's that are running on a switch.
Both have lids below LMC start lid (equals to 2^LMC - 1)
In case of failover the LID range between 1 and start lid was considered not free
and their (switch's) lids were changed.
Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
opensm/opensm/osm_lid_mgr.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c
index 97b1de6..5d0247a 100644
--- a/opensm/opensm/osm_lid_mgr.c
+++ b/opensm/opensm/osm_lid_mgr.c
@@ -563,10 +563,6 @@ static boolean_t lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * p_mgr,
IN uint16_t num_lids)
{
uint16_t i;
- uint8_t start_lid = (uint8_t) (1 << p_mgr->p_subn->opt.lmc);
-
- if (lid < start_lid)
- return FALSE;
for (i = lid; i < lid + num_lids; i++)
if (p_mgr->used_lids[i])
--
1.5.3.6
--
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] 5+ messages in thread[parent not found: <4C29F9E5.6030905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned [not found] ` <4C29F9E5.6030905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2010-06-30 13:01 ` Hal Rosenstock [not found] ` <AANLkTinrGhtz0ZKCnvW4d4GmN18QQnEI8ewLZ-vc1PVD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2010-07-05 18:04 ` Sasha Khapyorsky 1 sibling, 1 reply; 5+ messages in thread From: Hal Rosenstock @ 2010-06-30 13:01 UTC (permalink / raw) To: Eli Dorfman (Voltaire); +Cc: Sasha Khapyorsky, linux-rdma, Vladimir Koushnir On Tue, Jun 29, 2010 at 9:49 AM, Eli Dorfman (Voltaire) <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Fixes a bug of failover between SM's that are running on a switch. > Both have lids below LMC start lid (equals to 2^LMC - 1) > In case of failover the LID range between 1 and start lid was considered not free > and their (switch's) lids were changed. Was the problem case for this when LMC > 0 but num_lids is 1 ? > Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org> > --- > opensm/opensm/osm_lid_mgr.c | 4 ---- > 1 files changed, 0 insertions(+), 4 deletions(-) > > diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c > index 97b1de6..5d0247a 100644 > --- a/opensm/opensm/osm_lid_mgr.c > +++ b/opensm/opensm/osm_lid_mgr.c > @@ -563,10 +563,6 @@ static boolean_t lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * p_mgr, > IN uint16_t num_lids) > { > uint16_t i; > - uint8_t start_lid = (uint8_t) (1 << p_mgr->p_subn->opt.lmc); > - > - if (lid < start_lid) > - return FALSE; I think eliminating this test can cause other breakage. Shouldn't it be the following: if (num_lids > 1 && lid < start_lid) return FALSE; -- Hal > for (i = lid; i < lid + num_lids; i++) > if (p_mgr->used_lids[i]) > -- > 1.5.3.6 > > -- > 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 > -- 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] 5+ messages in thread
[parent not found: <AANLkTinrGhtz0ZKCnvW4d4GmN18QQnEI8ewLZ-vc1PVD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned [not found] ` <AANLkTinrGhtz0ZKCnvW4d4GmN18QQnEI8ewLZ-vc1PVD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-06-30 14:44 ` Eli Dorfman (Voltaire) [not found] ` <4C2B5860.8020306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Eli Dorfman (Voltaire) @ 2010-06-30 14:44 UTC (permalink / raw) To: Hal Rosenstock; +Cc: Sasha Khapyorsky, linux-rdma, Vladimir Koushnir Hal Rosenstock wrote: > On Tue, Jun 29, 2010 at 9:49 AM, Eli Dorfman (Voltaire) > <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Fixes a bug of failover between SM's that are running on a switch. >> Both have lids below LMC start lid (equals to 2^LMC - 1) >> In case of failover the LID range between 1 and start lid was considered not free >> and their (switch's) lids were changed. > > Was the problem case for this when LMC > 0 but num_lids is 1 ? yes, it was for SM running on a switch. > >> Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org> >> --- >> opensm/opensm/osm_lid_mgr.c | 4 ---- >> 1 files changed, 0 insertions(+), 4 deletions(-) >> >> diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c >> index 97b1de6..5d0247a 100644 >> --- a/opensm/opensm/osm_lid_mgr.c >> +++ b/opensm/opensm/osm_lid_mgr.c >> @@ -563,10 +563,6 @@ static boolean_t lid_mgr_is_range_not_persistent(IN osm_lid_mgr_t * p_mgr, >> IN uint16_t num_lids) >> { >> uint16_t i; >> - uint8_t start_lid = (uint8_t) (1 << p_mgr->p_subn->opt.lmc); >> - >> - if (lid < start_lid) >> - return FALSE; > > I think eliminating this test can cause other breakage. > > Shouldn't it be the following: > > if (num_lids > 1 && lid < start_lid) > return FALSE; This could be ok, but even without this test it should work since this function is called only if ((min_lid & lmc_mask) == min_lid) So this would be false for any lid below start_lid. right? Eli > > -- Hal > >> for (i = lid; i < lid + num_lids; i++) >> if (p_mgr->used_lids[i]) >> -- >> 1.5.3.6 >> >> -- >> 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 >> -- 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] 5+ messages in thread
[parent not found: <4C2B5860.8020306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned [not found] ` <4C2B5860.8020306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2010-06-30 15:23 ` Hal Rosenstock 0 siblings, 0 replies; 5+ messages in thread From: Hal Rosenstock @ 2010-06-30 15:23 UTC (permalink / raw) To: Eli Dorfman (Voltaire); +Cc: Sasha Khapyorsky, linux-rdma, Vladimir Koushnir On 6/30/10, Eli Dorfman (Voltaire) <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hal Rosenstock wrote: >> On Tue, Jun 29, 2010 at 9:49 AM, Eli Dorfman (Voltaire) >> <dorfman.eli-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> Fixes a bug of failover between SM's that are running on a switch. >>> Both have lids below LMC start lid (equals to 2^LMC - 1) >>> In case of failover the LID range between 1 and start lid was considered >>> not free >>> and their (switch's) lids were changed. >> >> Was the problem case for this when LMC > 0 but num_lids is 1 ? > > yes, it was for SM running on a switch. There are two cases for SM running on a switch. There is also the case where num_lids > 1 which should work without this change. > >> >>> Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org> >>> --- >>> opensm/opensm/osm_lid_mgr.c | 4 ---- >>> 1 files changed, 0 insertions(+), 4 deletions(-) >>> >>> diff --git a/opensm/opensm/osm_lid_mgr.c b/opensm/opensm/osm_lid_mgr.c >>> index 97b1de6..5d0247a 100644 >>> --- a/opensm/opensm/osm_lid_mgr.c >>> +++ b/opensm/opensm/osm_lid_mgr.c >>> @@ -563,10 +563,6 @@ static boolean_t lid_mgr_is_range_not_persistent(IN >>> osm_lid_mgr_t * p_mgr, >>> IN uint16_t num_lids) >>> { >>> uint16_t i; >>> - uint8_t start_lid = (uint8_t) (1 << p_mgr->p_subn->opt.lmc); >>> - >>> - if (lid < start_lid) >>> - return FALSE; >> >> I think eliminating this test can cause other breakage. >> >> Shouldn't it be the following: >> >> if (num_lids > 1 && lid < start_lid) >> return FALSE; > > This could be ok, but even without this test it should work since this > function is called only > if ((min_lid & lmc_mask) == min_lid) > > So this would be false for any lid below start_lid. > > right? Right (so lid_mgr_is_range_not_persistent wouldn't be called for the case that I was concerned about). -- Hal > > > Eli >> >> -- Hal >> >>> for (i = lid; i < lid + num_lids; i++) >>> if (p_mgr->used_lids[i]) >>> -- >>> 1.5.3.6 >>> >>> -- >>> 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 >>> > > -- 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] 5+ messages in thread
* Re: [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned [not found] ` <4C29F9E5.6030905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2010-06-30 13:01 ` Hal Rosenstock @ 2010-07-05 18:04 ` Sasha Khapyorsky 1 sibling, 0 replies; 5+ messages in thread From: Sasha Khapyorsky @ 2010-07-05 18:04 UTC (permalink / raw) To: Eli Dorfman (Voltaire); +Cc: linux-rdma, Vladimir Koushnir On 16:49 Tue 29 Jun , Eli Dorfman (Voltaire) wrote: > > Fixes a bug of failover between SM's that are running on a switch. > Both have lids below LMC start lid (equals to 2^LMC - 1) > In case of failover the LID range between 1 and start lid was considered not free > and their (switch's) lids were changed. > > Signed-off-by: Eli Dorfman <elid-smomgflXvOZWk0Htik3J/w@public.gmane.org> Applied. Thanks. Sasha -- 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] 5+ messages in thread
end of thread, other threads:[~2010-07-05 18:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-29 13:49 [PATCH] opensm/osm_lid_mgr.c: Allow switch lids to be non LMC aligned Eli Dorfman (Voltaire)
[not found] ` <4C29F9E5.6030905-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-30 13:01 ` Hal Rosenstock
[not found] ` <AANLkTinrGhtz0ZKCnvW4d4GmN18QQnEI8ewLZ-vc1PVD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-30 14:44 ` Eli Dorfman (Voltaire)
[not found] ` <4C2B5860.8020306-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-30 15:23 ` Hal Rosenstock
2010-07-05 18:04 ` Sasha Khapyorsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox