linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "ira.weiny" <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
	<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org"
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	"hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org"
	<hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: Re: [PATCH 06/14] IB/mad: Add helper function for smi_check_forward_dr_smp
Date: Wed, 20 May 2015 13:56:35 -0400	[thread overview]
Message-ID: <20150520175634.GB14309@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373A8FDDAA6-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Wed, May 20, 2015 at 11:32:01AM -0600, Hefty, Sean wrote:
> > diff --git a/drivers/infiniband/core/smi.c b/drivers/infiniband/core/smi.c
> > index b09fa1dec865..4969ce3338fb 100644
> > --- a/drivers/infiniband/core/smi.c
> > +++ b/drivers/infiniband/core/smi.c
> > @@ -236,21 +236,20 @@ enum smi_action smi_handle_dr_smp_recv(struct ib_smp
> > *smp, u8 node_type,
> >  					smp->dr_slid == IB_LID_PERMISSIVE);
> >  }
> > 
> > -enum smi_forward_action smi_check_forward_dr_smp(struct ib_smp *smp)
> > +static inline
> > +enum smi_forward_action __smi_check_forward_dr_smp(u8 hop_ptr, u8
> > hop_cnt,
> > +						   u8 direction,
> > +						   int dr_dlid_is_permissive,
> > +						   int dr_slid_is_permissive)
> 
> snip
> 
> > +enum smi_forward_action smi_check_forward_dr_smp(struct ib_smp *smp)
> > +{
> > +	return __smi_check_forward_dr_smp(smp->hop_ptr, smp->hop_cnt,
> > +					  ib_get_smp_direction(smp),
> > +					  smp->dr_dlid == IB_LID_PERMISSIVE,
> > +					  smp->dr_slid != IB_LID_PERMISSIVE);
> 
> The dr_slid check looks backwards.

Yes.  The logic is correct but the variable name is wrong.

These should be bool as well.

Ira

--
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:[~2015-05-20 17:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  8:13 [PATCH 00/14] IB/mad: Add support for OPA MAD processing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <1432109615-19564-1-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20  8:13   ` [PATCH 01/14] IB/mad: Clean up ib_find_send_mad ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-2-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 18:22       ` Jason Gunthorpe
     [not found]         ` <20150520182221.GF28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21  0:28           ` ira.weiny
2015-05-21  1:32           ` ira.weiny
2015-05-20  8:13   ` [PATCH 02/14] IB/mad: Create an RMPP Base header ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-3-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 18:27       ` Jason Gunthorpe
     [not found]         ` <20150520182735.GG28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 21:23           ` ira.weiny
     [not found]             ` <20150520212344.GB22981-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-20 22:03               ` Jason Gunthorpe
     [not found]                 ` <20150520220333.GA5970-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-27 18:13                   ` ira.weiny
2015-05-20  8:13   ` [PATCH 03/14] IB/mad: Create handle_ib_smi ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-4-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 17:24       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373A8FDDA89-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-20 17:52           ` ira.weiny
     [not found]             ` <20150520175230.GA14309-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-20 18:11               ` Hefty, Sean
2015-05-20 18:28       ` Jason Gunthorpe
     [not found]         ` <20150520182832.GH28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21  1:34           ` ira.weiny
2015-05-20  8:13   ` [PATCH 04/14] IB/mad: Add helper function for smi_handle_dr_smp_send ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-20  8:13   ` [PATCH 05/14] IB/mad: Add helper function for smi_handle_dr_smp_recv ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-20  8:13   ` [PATCH 06/14] IB/mad: Add helper function for smi_check_forward_dr_smp ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-7-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 17:32       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373A8FDDAA6-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-20 17:56           ` ira.weiny [this message]
2015-05-20  8:13   ` [PATCH 07/14] IB/mad: Add base version to ib_create_send_mad ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-20  8:13   ` [PATCH 08/14] IB/core: Add rdma_max_mad_size helper ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-9-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 17:37       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373A8FDDACE-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-20 18:02           ` ira.weiny
     [not found]             ` <20150520180226.GC14309-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-20 18:19               ` Jason Gunthorpe
     [not found]                 ` <20150520181928.GE28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 19:03                   ` ira.weiny
     [not found]                     ` <20150520190352.GA22981-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-20 19:08                       ` Hefty, Sean
2015-05-20 19:43                       ` Jason Gunthorpe
     [not found]                         ` <20150520194314.GA3344-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-20 21:31                           ` ira.weiny
     [not found]                             ` <20150520213128.GD22981-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org>
2015-05-20 21:34                               ` Jason Gunthorpe
     [not found]                                 ` <20150520213404.GA6293-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21  0:12                                   ` ira.weiny
2015-05-21  0:19                           ` ira.weiny
2015-05-20  8:13   ` [PATCH 09/14] IB/mad: Convert allocations from kmem_cache to kmalloc ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-10-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 17:53       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373A8FDDAFC-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-05-20 22:32           ` ira.weiny
2015-05-20  8:13   ` [PATCH 10/14] IB/mad: Add MAD size parameters to process_mad ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-11-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 18:49       ` Jason Gunthorpe
     [not found]         ` <20150520184914.GI28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21 20:44           ` ira.weiny
2015-05-20  8:13   ` [PATCH 11/14] IB/core: Add rdma_cap_opa_mad helper ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-12-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 18:50       ` Jason Gunthorpe
2015-05-20  8:13   ` [PATCH 12/14] IB/mad: Add partial Intel OPA MAD support ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-20  8:13   ` [PATCH 13/14] " ira.weiny-ral2JQCrhuEAvxtiuMwx3w
2015-05-20  8:13   ` [PATCH 14/14] IB/mad: Add final OPA MAD processing ira.weiny-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1432109615-19564-15-git-send-email-ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-05-20 18:59       ` Jason Gunthorpe
     [not found]         ` <20150520185901.GK28496-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-05-21 16:23           ` ira.weiny
2015-05-20 21:11       ` Suri Shelvapille
     [not found]         ` <CY1PR03MB1440B98A7FE0A82E1BE53D75DEC20-DUcFgbLRNhB/HYnSB+xpdWP7xZHs9kq/vxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2015-05-20 21:26           ` ira.weiny
2015-05-28  7:03   ` [PATCH 00/14] IB/mad: Add support for " Or Gerlitz
2015-05-28  7:07   ` Or Gerlitz

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=20150520175634.GB14309@phlsvsds.ph.intel.com \
    --to=ira.weiny-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@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;
as well as URLs for NNTP newsgroup(s).