public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] ibacm: Handle EP expiration time
Date: Mon, 19 Sep 2016 19:40:58 +0300	[thread overview]
Message-ID: <20160919164057.GA28264@yuval-lap.uk.oracle.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373AB08D0BC-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Mon, Sep 19, 2016 at 03:51:22PM +0000, Hefty, Sean wrote:
> > > >  static struct acmp_dest *
> > > >  acmp_acquire_dest(struct acmp_ep *ep, uint8_t addr_type, const
> > uint8_t
> > > > *addr)
> > > >  {
> > > > @@ -366,6 +382,15 @@ acmp_acquire_dest(struct acmp_ep *ep, uint8_t
> > > > addr_type, const uint8_t *addr)
> > > >  	acm_log(2, "%s\n", log_data);
> > > >  	lock_acquire(&ep->lock);
> > > >  	dest = acmp_get_dest(ep, addr_type, addr);
> > > > +	if (dest && is_dest_ready(dest)) {
> > >
> > > I think it would be clearer to just perform the state check here and
> > either avoid the timeout check or merge it with the if statement below.
> > 
> > As stated above, i cannot ignore the timeout so will merge it here.
> > 
> > >
> > > > +		acm_log(2, "Record valid for the next %ld minute(s)\n",
> > > > +			dest->addr_timeout - time_stamp_min());
> > > > +		if (time_stamp_min() >= dest->addr_timeout) {
> 
> We also check addr_timeout here.  (Sorry, it's been a long while since I've looked at this code.)  My question regarding timeouts are around why do we need two checks?

First one is for log only.
If you think it is not needed then i'll remove it, otherwise i will take it
out to an helper variable and use it in both.

> --
> 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

  parent reply	other threads:[~2016-09-19 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15 14:14 [PATCH] ibacm: Handle EP expiration time Yuval Shaia
     [not found] ` <1473948862-7461-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-09-16 19:38   ` Hefty, Sean
     [not found]     ` <1828884A29C6694DAF28B7E6B8A82373AB08CA2E-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-19  7:25       ` Yuval Shaia
     [not found]         ` <20160919072504.GA3571-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2016-09-19 15:51           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A82373AB08D0BC-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-09-19 16:40               ` Yuval Shaia [this message]
     [not found]                 ` <20160919164057.GA28264-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2016-09-19 16:50                   ` Hefty, Sean

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=20160919164057.GA28264@yuval-lap.uk.oracle.com \
    --to=yuval.shaia-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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