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: Add configurable retries for transactions
Date: Fri, 30 Oct 2009 22:17:38 +0200 [thread overview]
Message-ID: <20091030201738.GC5829@me> (raw)
In-Reply-To: <f0e08f230910300848i3a36ceedh4472478b6f492a7d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 11:48 Fri 30 Oct , Hal Rosenstock wrote:
> >> @@ -819,6 +821,13 @@ osm_vendor_bind(IN osm_vendor_t * const p_vend,
> >> p_bind->send_err_callback = send_err_callback;
> >> p_bind->p_mad_pool = p_mad_pool;
> >> p_bind->port_guid = port_guid;
> >> + if (p_vend->timeout == -1) {
> >> + p_bind->timeout = p_user_bind->timeout;
> >> + p_bind->max_retries = p_user_bind->retries;
> >> + } else {
> >> + p_bind->timeout = p_vend->timeout;
> >> + p_bind->max_retries = p_vend->max_retries;
> >> + }
> >
> > Hmm, shouldn't we respect user requested data? Something like:
> >
> > p_bind->timeout = p_user_bind->timeout ? p_user_bind->timeout :
> > p_vend->timeout;
> > p_bind->retries = p_user_bind->retries ? p_user_bind->retries :
> > p_vend->retries;
> >
> > ?
>
> The -1 is for the new ABI.
Could you elaborate?
> >> @@ -983,6 +989,11 @@ int main(int argc, char *argv[])
> >> opt.sm_sl = (uint8_t) temp;
> >> printf(" SMSL = %d\n", opt.sm_sl);
> >> break;
> >> + case 8:
> >> + opt.transaction_retries = strtol(optarg, NULL, 0);
> >
> > Please use strtoul().
>
> OK. What about transaction_timeout ?
Yes, the same is applicable here.
> >> @@ -392,8 +393,7 @@ ib_api_status_t osm_opensm_init(IN osm_opensm_t * p_osm,
> >> if (status != IB_SUCCESS)
> >> goto Exit;
> >>
> >> - p_osm->p_vendor =
> >> - osm_vendor_new(&p_osm->log, p_opt->transaction_timeout);
> >> + p_osm->p_vendor = osm_vendor_new(&p_osm->log, -1);
> >
> > Why to not make p_opt->transaction_timeout as default for newly
> > allocated vendor object?
>
> To support old and new ABI.
What do you mean? OpenSM will run against older vendor?
Even if so how '-1' is helpful? Likely it will break things, no?
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
next prev parent reply other threads:[~2009-10-30 20:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-24 14:05 [PATCH] opensm: Add configurable retries for transactions Hal Rosenstock
[not found] ` <20091024140538.GA5213-Wuw85uim5zDR7s880joybQ@public.gmane.org>
2009-10-30 2:55 ` Sasha Khapyorsky
2009-10-30 15:48 ` Hal Rosenstock
[not found] ` <f0e08f230910300848i3a36ceedh4472478b6f492a7d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-30 20:17 ` Sasha Khapyorsky [this message]
2009-10-30 20:51 ` Hal Rosenstock
[not found] ` <f0e08f230910301351o3f81d787g5e177be10da72319-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-30 21:48 ` Sasha Khapyorsky
2009-10-30 21:49 ` Hal Rosenstock
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=20091030201738.GC5829@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