public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Khapyorsky <sashak-smomgflXvOZWk0Htik3J/w@public.gmane.org>
To: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] opensm/mcast_tbl: set max_mlid_ho as actually configured mlid
Date: Fri, 30 Oct 2009 23:31:25 +0200	[thread overview]
Message-ID: <20091030213125.GE5829@me> (raw)
In-Reply-To: <f0e08f230910301344j5b9564a5k9b77fd4e43e48376-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On 16:44 Fri 30 Oct     , Hal Rosenstock wrote:
> >
> > diff --git a/opensm/opensm/osm_mcast_tbl.c b/opensm/opensm/osm_mcast_tbl.c
> > index 0a45904..a599e56 100644
> > --- a/opensm/opensm/osm_mcast_tbl.c
> > +++ b/opensm/opensm/osm_mcast_tbl.c
> > @@ -245,8 +245,8 @@ void osm_mcast_tbl_clear_mlid(IN osm_mcast_tbl_t * p_tbl, IN uint16_t mlid_ho)
> >        CL_ASSERT(p_tbl);
> >        CL_ASSERT(mlid_ho >= IB_LID_MCAST_START_HO);
> >
> > -       if (p_tbl->p_mask_tbl && mlid_ho <= p_tbl->max_mlid_ho) {
> > -               mlid_offset = mlid_ho - IB_LID_MCAST_START_HO;
> > +       mlid_offset = mlid_ho - IB_LID_MCAST_START_HO;
> > +       if (p_tbl->p_mask_tbl && mlid_offset < p_tbl->mft_depth) {
> >                for (i = 0; i <= p_tbl->max_position; i++)
> >                        (*p_tbl->p_mask_tbl)[mlid_offset][i] = 0;
> >        }
> >
> > Does it make sense?
> 
> Yes, that fixes the removal issue.
> 
> Tested-by: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Thanks I will apply the patch.

Yet another (likely even more efficient) approach would be memset()ing
MFTs in realloc function above requested mlid_offset, then we will be
able to remove osm_mcast_tbl_clear_mlid() completely.

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

  parent reply	other threads:[~2009-10-30 21:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4AEAEA86.8080309@systemfabricworks.com>
     [not found] ` <4AEAEA86.8080309-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2009-10-30 13:48   ` [PATCH] opensm/mcast_tbl: set max_mlid_ho as actually configured mlid Hal Rosenstock
     [not found]     ` <f0e08f230910300648m4d802f57w2910cea678a3cd1f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-30 20:06       ` Sasha Khapyorsky
2009-10-30 20:44         ` Hal Rosenstock
     [not found]           ` <f0e08f230910301344j5b9564a5k9b77fd4e43e48376-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-30 21:31             ` Sasha Khapyorsky [this message]
2009-11-02 16:18               ` Hal Rosenstock
     [not found]                 ` <f0e08f230911020818n2f2f4dcai5c920dbfa98551de-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-02 16:43                   ` Sasha Khapyorsky
2009-11-02 16:44                     ` Hal Rosenstock
     [not found]                       ` <f0e08f230911020844i7f52b492ifdcbadc2babbf4ae-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-02 16:50                         ` Sasha Khapyorsky
2009-10-30 21:32         ` [PATCH] opensm/osm_mcast_tbl: fix mlid removal Sasha Khapyorsky
2009-10-23 23:48 [PATCHv5] opensm: Reduce heap consumption by multicast routing tables (MFTs) Hal Rosenstock
2009-10-29 19:17 ` Sasha Khapyorsky
2009-10-29 19:19   ` [PATCH] opensm/mcast_tbl: set max_mlid_ho as actually configured mlid Sasha Khapyorsky
2009-10-29 22:44     ` Ira Weiny
     [not found]       ` <20091029154431.72fc32bd.weiny2-i2BcT+NCU+M@public.gmane.org>
2009-10-29 23:02         ` Sasha Khapyorsky
2009-10-29 23:09           ` Ira Weiny
     [not found]             ` <20091029160958.d13ed53e.weiny2-i2BcT+NCU+M@public.gmane.org>
2009-10-30  0:32               ` 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=20091030213125.GE5829@me \
    --to=sashak-smomgflxvozwk0htik3j/w@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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