From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org>,
Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit
Date: Fri, 22 Dec 2017 09:28:11 -0800 [thread overview]
Message-ID: <d26eee16-9a17-c629-e012-dd760ab7ecb9@intel.com> (raw)
In-Reply-To: <20171222165600.GE30884-uk2M96/98Pc@public.gmane.org>
Hi Jason,
On 12/22/2017 8:56 AM, Jason Gunthorpe wrote:
> On Fri, Dec 22, 2017 at 08:46:00AM -0800, Dennis Dalessandro wrote:
>> From: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>>
>> Change the slid arg to ingress_pkey_table_fail() to a full
>> 32Bits and do not convert to 16Bits in caller. This is so we
>> can keep everything 32bit in the kernel and only change to
>> 16bit at the uapi boundary.
>>
>> Signed-off-by: Don Hiatt <don.hiatt-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: Dennis Dalessandro <dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>> drivers/infiniband/hw/hfi1/hfi.h | 2 +-
>> drivers/infiniband/hw/hfi1/mad.c | 6 +-----
>> 2 files changed, 2 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/infiniband/hw/hfi1/hfi.h b/drivers/infiniband/hw/hfi1/hfi.h
>> index 869c2bf..dc5b133 100644
>> +++ b/drivers/infiniband/hw/hfi1/hfi.h
>> @@ -1627,7 +1627,7 @@ static int ingress_pkey_table_search(struct hfi1_pportdata *ppd, u16 pkey)
>> * the 'error info' for this failure.
>> */
>> static void ingress_pkey_table_fail(struct hfi1_pportdata *ppd, u16 pkey,
>> - u16 slid)
>> + u32 slid)
>> {
>> struct hfi1_devdata *dd = ppd->dd;
>>
>> diff --git a/drivers/infiniband/hw/hfi1/mad.c b/drivers/infiniband/hw/hfi1/mad.c
>> index cf8dba3..34547a4 100644
>> +++ b/drivers/infiniband/hw/hfi1/mad.c
>> @@ -4348,11 +4348,7 @@ static int opa_local_smp_check(struct hfi1_ibport *ibp,
>> */
>> if (pkey == LIM_MGMT_P_KEY || pkey == FULL_MGMT_P_KEY)
>> return 0;
>> - /*
>> - * On OPA devices it is okay to lose the upper 16 bits of LID as this
>> - * information is obtained elsewhere. Mask off the upper 16 bits.
>> - */
>> - ingress_pkey_table_fail(ppd, pkey, ib_lid_cpu16(0xFFFF & in_wc->slid));
>> + ingress_pkey_table_fail(ppd, pkey, in_wc->slid);
>> return 1;
>> }
> I'm confused by this patch.
>
> It seems to totally revert the -stable patch
> 4988be5813ff2afdc0d8bfa315ef34a577d3efbf, with the exception that
> ingress_pkey_table_fail now accepts a u32.
>
> Is this saying the correct version of
> 4988be5813ff2afdc0d8bfa315ef34a577d3efbf was to just change that one
> type??
>
> Jason
Yes, the correct version was to just change the type. When I made the
original fix I didn't notice that was the easy/proper way of doing it
until your comments. Our original implementation had the masking off and
I've been just carrying it along without much thought until you
commented. Thanks again!
don
--
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:[~2017-12-22 17:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-22 16:45 [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Dennis Dalessandro
[not found] ` <20171222164036.29731.43475.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-12-22 16:45 ` [PATCH for-next 1/3] IB/hfi1: Add RQ/SRQ information to QP stats Dennis Dalessandro
[not found] ` <20171222164540.29731.68770.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2018-01-03 21:22 ` Jason Gunthorpe
2017-12-22 16:45 ` [PATCH for-next 2/3] IB/core: Use rdma_cap_opa_mad to check for OPA Dennis Dalessandro
2017-12-22 16:46 ` [PATCH for-next 3/3] IB/hfi1: Change slid arg in ingress_pkey_table_fail to 32bit Dennis Dalessandro
[not found] ` <20171222164557.29731.16649.stgit-9QXIwq+3FY+1XWohqUldA0EOCMrvLtNR@public.gmane.org>
2017-12-22 16:56 ` Jason Gunthorpe
[not found] ` <20171222165600.GE30884-uk2M96/98Pc@public.gmane.org>
2017-12-22 17:28 ` Don Hiatt [this message]
2017-12-22 23:37 ` [PATCH for-next 0/3] IB/hfi1,core: Driver updates for 12/22/2017 Jason Gunthorpe
[not found] ` <20171222233738.GB17198-uk2M96/98Pc@public.gmane.org>
2017-12-25 10:46 ` Leon Romanovsky
[not found] ` <20171225104615.GH2942-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-03 15:13 ` Dennis Dalessandro
[not found] ` <2517cf89-211d-0f40-17e5-eae670ff429e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-03 15:25 ` Leon Romanovsky
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=d26eee16-9a17-c629-e012-dd760ab7ecb9@intel.com \
--to=don.hiatt-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=jgg-uk2M96/98Pc@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.