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 23:48:26 +0200 [thread overview]
Message-ID: <20091030214826.GG5829@me> (raw)
In-Reply-To: <f0e08f230910301351o3f81d787g5e177be10da72319-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 16:51 Fri 30 Oct , Hal Rosenstock wrote:
> On Fri, Oct 30, 2009 at 4:17 PM, Sasha Khapyorsky <sashak-smomgflXvObQFizaE/u3fw@public.gmane.orgm> wrote:
> > 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?
>
> In order to be able to deal with combinations of old/new opensm/vendor layer.
I see, you are trying to protect old OpenSM <-> new vendor case.
Such combination will not work for many reasons (we changed OpenSM/vendor
interaction couple of times in past few years, including configuration)
and it is better to avoid such usage.
> >> >> @@ -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?
>
> -1 is not a valid timeout so can't this be used in this manner ? How
> will it break things ?
Old vendor will not work with '-1'. OTOH this enforces all vendor users
to set all parameter explicitly, and ignores those values when a value
other than '-1' was used in vendor creation. In fact it enforces using
'-1' and effectively makes it to be mandatory part of vendor API. Seems
too messy for me.
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 21:48 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
2009-10-30 20:51 ` Hal Rosenstock
[not found] ` <f0e08f230910301351o3f81d787g5e177be10da72319-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-10-30 21:48 ` Sasha Khapyorsky [this message]
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=20091030214826.GG5829@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