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: [PATCHv3] opensm: Reduce heap consumption by unicast routing tables (LFTs)
Date: Tue, 13 Oct 2009 17:44:27 +0200 [thread overview]
Message-ID: <20091013154427.GP13830@me> (raw)
In-Reply-To: <f0e08f230910130559y2eb965cfm7a2e26b05ad63c12-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 08:59 Tue 13 Oct , Hal Rosenstock wrote:
> >> @@ -405,7 +406,7 @@ uint8_t osm_switch_get_port_least_hops(IN const osm_switch_t * p_sw,
> >> static inline uint8_t osm_switch_get_port_by_lid(IN const osm_switch_t * p_sw,
> >> IN uint16_t lid_ho)
> >> {
> >> - if (lid_ho == 0 || lid_ho > IB_LID_UCAST_END_HO)
> >> + if (lid_ho == 0 || lid_ho >= p_sw->lft_size)
> >
> > Similar story? Shouldn't this be checked against p_sw->max_lid_ho?
>
> Yes and this change could be considered independent as I think is a
> minor optimization even with the LFT heap changes.
It is not just optimization, but rather a bug fix - it should prevent
potential junk returned by this function. And yes, it exists even
without LFT reallocation stuff.
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
prev parent reply other threads:[~2009-10-13 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091004160541.GA28310@comcast.net>
[not found] ` <20091004160541.GA28310-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-12 15:46 ` [PATCHv3] opensm: Reduce heap consumption by unicast routing tables (LFTs) Sasha Khapyorsky
2009-10-13 12:59 ` Hal Rosenstock
[not found] ` <f0e08f230910130559y2eb965cfm7a2e26b05ad63c12-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-13 15:44 ` Sasha Khapyorsky [this message]
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=20091013154427.GP13830@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.