Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741169 > unrolled thread

[PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

Started by"Wei Hu (Xavier)" <xavier.huwei@huawei.com>
First post2017-09-28 06:40 +0200
Last post2017-09-28 18:20 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 06:40 +0200
    Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in  hns-abi.h Leon Romanovsky <leon@kernel.org> - 2017-09-28 11:10 +0200
      Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in  hns-abi.h "Wei Hu (Xavier)" <xavier.huwei@huawei.com> - 2017-09-28 14:00 +0200
        Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in  hns-abi.h Leon Romanovsky <leon@kernel.org> - 2017-09-28 15:10 +0200
          Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in  hns-abi.h "Wei Hu (Xavier)" <xavier.huwei@tom.com> - 2017-09-28 18:20 +0200

#1741169 — [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

From"Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date2017-09-28 06:40 +0200
Subject[PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h
Message-ID<uuyM9-4cw-1@gated-at.bofh.it>
From: Lijun Ou <oulijun@huawei.com>

This patch mainly deletes some unused struct members for
hns_roce_ib_create_qp in order to match libhns, because
the num of struct members of hns_roce_ib_create_qp must
be the same with hns_roce_create_qp in libhns.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
---
 include/uapi/rdma/hns-abi.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
index 5d74019..79251b6 100644
--- a/include/uapi/rdma/hns-abi.h
+++ b/include/uapi/rdma/hns-abi.h
@@ -41,10 +41,8 @@ struct hns_roce_ib_create_cq {
 
 struct hns_roce_ib_create_qp {
 	__u64	buf_addr;
-	__u64   db_addr;
 	__u8    log_sq_bb_count;
 	__u8    log_sq_stride;
-	__u8    sq_no_prefetch;
 	__u8    reserved[5];
 };
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1741309 — Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

FromLeon Romanovsky <leon@kernel.org>
Date2017-09-28 11:10 +0200
SubjectRe: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h
Message-ID<uuCZs-743-25@gated-at.bofh.it>
In reply to#1741169

[Multipart message — attachments visible in raw view] — view raw

On Thu, Sep 28, 2017 at 12:57:33PM +0800, Wei Hu (Xavier) wrote:
> From: Lijun Ou <oulijun@huawei.com>
>
> This patch mainly deletes some unused struct members for
> hns_roce_ib_create_qp in order to match libhns, because
> the num of struct members of hns_roce_ib_create_qp must
> be the same with hns_roce_create_qp in libhns.
>
> Signed-off-by: Lijun Ou <oulijun@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
> ---
>  include/uapi/rdma/hns-abi.h | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
> index 5d74019..79251b6 100644
> --- a/include/uapi/rdma/hns-abi.h
> +++ b/include/uapi/rdma/hns-abi.h
> @@ -41,10 +41,8 @@ struct hns_roce_ib_create_cq {
>
>  struct hns_roce_ib_create_qp {
>  	__u64	buf_addr;
> -	__u64   db_addr;
>  	__u8    log_sq_bb_count;
>  	__u8    log_sq_stride;
> -	__u8    sq_no_prefetch;
>  	__u8    reserved[5];
>  };

It is classical UAPI breakage which kernel tries to avoid.

In RDMA, we do allow rename of fields from reserved to something, but
don't allow binary layout change.

NAK to this change.

Thanks

>
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1741468 — Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

From"Wei Hu (Xavier)" <xavier.huwei@huawei.com>
Date2017-09-28 14:00 +0200
SubjectRe: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h
Message-ID<uuFDX-8w4-3@gated-at.bofh.it>
In reply to#1741309

On 2017/9/28 17:02, Leon Romanovsky wrote:
> On Thu, Sep 28, 2017 at 12:57:33PM +0800, Wei Hu (Xavier) wrote:
>> From: Lijun Ou <oulijun@huawei.com>
>>
>> This patch mainly deletes some unused struct members for
>> hns_roce_ib_create_qp in order to match libhns, because
>> the num of struct members of hns_roce_ib_create_qp must
>> be the same with hns_roce_create_qp in libhns.
>>
>> Signed-off-by: Lijun Ou <oulijun@huawei.com>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
>> ---
>>   include/uapi/rdma/hns-abi.h | 2 --
>>   1 file changed, 2 deletions(-)
>>
>> diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
>> index 5d74019..79251b6 100644
>> --- a/include/uapi/rdma/hns-abi.h
>> +++ b/include/uapi/rdma/hns-abi.h
>> @@ -41,10 +41,8 @@ struct hns_roce_ib_create_cq {
>>
>>   struct hns_roce_ib_create_qp {
>>   	__u64	buf_addr;
>> -	__u64   db_addr;
>>   	__u8    log_sq_bb_count;
>>   	__u8    log_sq_stride;
>> -	__u8    sq_no_prefetch;
>>   	__u8    reserved[5];
>>   };
> It is classical UAPI breakage which kernel tries to avoid.
>
> In RDMA, we do allow rename of fields from reserved to something, but
> don't allow binary layout change.
>
> NAK to this change.
>
> Thanks
Hi, Leon
     Now there is an inconsistency between hns_roce_ib_create_qp in 
kernel driver and hns_roce_create_qp  in libhns as below:

struct hns_roce_create_qp {
     struct ibv_create_qp        ibv_cmd;
     __u64                buf_addr;
     __u8                log_sq_bb_count;
     __u8                log_sq_stride;
     __u8                reserved[5];
};
     It is better to modify hns_roce_create_qp in libhns, right?
     Thanks

     Regards
Wei Hu
>> --
>> 1.9.1
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1741519 — Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

FromLeon Romanovsky <leon@kernel.org>
Date2017-09-28 15:10 +0200
SubjectRe: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h
Message-ID<uuGJH-XA-1@gated-at.bofh.it>
In reply to#1741468

[Multipart message — attachments visible in raw view] — view raw

On Thu, Sep 28, 2017 at 07:56:40PM +0800, Wei Hu (Xavier) wrote:
>
>
> On 2017/9/28 17:02, Leon Romanovsky wrote:
> > On Thu, Sep 28, 2017 at 12:57:33PM +0800, Wei Hu (Xavier) wrote:
> > > From: Lijun Ou <oulijun@huawei.com>
> > >
> > > This patch mainly deletes some unused struct members for
> > > hns_roce_ib_create_qp in order to match libhns, because
> > > the num of struct members of hns_roce_ib_create_qp must
> > > be the same with hns_roce_create_qp in libhns.
> > >
> > > Signed-off-by: Lijun Ou <oulijun@huawei.com>
> > > Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> > > Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
> > > ---
> > >   include/uapi/rdma/hns-abi.h | 2 --
> > >   1 file changed, 2 deletions(-)
> > >
> > > diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
> > > index 5d74019..79251b6 100644
> > > --- a/include/uapi/rdma/hns-abi.h
> > > +++ b/include/uapi/rdma/hns-abi.h
> > > @@ -41,10 +41,8 @@ struct hns_roce_ib_create_cq {
> > >
> > >   struct hns_roce_ib_create_qp {
> > >   	__u64	buf_addr;
> > > -	__u64   db_addr;
> > >   	__u8    log_sq_bb_count;
> > >   	__u8    log_sq_stride;
> > > -	__u8    sq_no_prefetch;
> > >   	__u8    reserved[5];
> > >   };
> > It is classical UAPI breakage which kernel tries to avoid.
> >
> > In RDMA, we do allow rename of fields from reserved to something, but
> > don't allow binary layout change.
> >
> > NAK to this change.
> >
> > Thanks
> Hi, Leon
>     Now there is an inconsistency between hns_roce_ib_create_qp in kernel
> driver and hns_roce_create_qp  in libhns as below:
>
> struct hns_roce_create_qp {
>     struct ibv_create_qp        ibv_cmd;
>     __u64                buf_addr;
>     __u8                log_sq_bb_count;
>     __u8                log_sq_stride;
>     __u8                reserved[5];
> };
>     It is better to modify hns_roce_create_qp in libhns, right?

Yes, it can work, because it is user space problem, where you used wrong
structure.

Thanks

>     Thanks
>
>     Regards
> Wei Hu
> > > --
> > > 1.9.1
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> > > the body of a message to majordomo@vger.kernel.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [next] | [standalone]


#1741685 — Re: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h

From"Wei Hu (Xavier)" <xavier.huwei@tom.com>
Date2017-09-28 18:20 +0200
SubjectRe: [PATCH for-next 8/9] RDMA/hns: Remove unused struct members in hns-abi.h
Message-ID<uuJHz-2JP-1@gated-at.bofh.it>
In reply to#1741519

On 2017/9/28 21:04, Leon Romanovsky wrote:
> On Thu, Sep 28, 2017 at 07:56:40PM +0800, Wei Hu (Xavier) wrote:
>>
>> On 2017/9/28 17:02, Leon Romanovsky wrote:
>>> On Thu, Sep 28, 2017 at 12:57:33PM +0800, Wei Hu (Xavier) wrote:
>>>> From: Lijun Ou <oulijun@huawei.com>
>>>>
>>>> This patch mainly deletes some unused struct members for
>>>> hns_roce_ib_create_qp in order to match libhns, because
>>>> the num of struct members of hns_roce_ib_create_qp must
>>>> be the same with hns_roce_create_qp in libhns.
>>>>
>>>> Signed-off-by: Lijun Ou <oulijun@huawei.com>
>>>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
>>>> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
>>>> ---
>>>>    include/uapi/rdma/hns-abi.h | 2 --
>>>>    1 file changed, 2 deletions(-)
>>>>
>>>> diff --git a/include/uapi/rdma/hns-abi.h b/include/uapi/rdma/hns-abi.h
>>>> index 5d74019..79251b6 100644
>>>> --- a/include/uapi/rdma/hns-abi.h
>>>> +++ b/include/uapi/rdma/hns-abi.h
>>>> @@ -41,10 +41,8 @@ struct hns_roce_ib_create_cq {
>>>>
>>>>    struct hns_roce_ib_create_qp {
>>>>    	__u64	buf_addr;
>>>> -	__u64   db_addr;
>>>>    	__u8    log_sq_bb_count;
>>>>    	__u8    log_sq_stride;
>>>> -	__u8    sq_no_prefetch;
>>>>    	__u8    reserved[5];
>>>>    };
>>> It is classical UAPI breakage which kernel tries to avoid.
>>>
>>> In RDMA, we do allow rename of fields from reserved to something, but
>>> don't allow binary layout change.
>>>
>>> NAK to this change.
>>>
>>> Thanks
>> Hi, Leon
>>      Now there is an inconsistency between hns_roce_ib_create_qp in kernel
>> driver and hns_roce_create_qp  in libhns as below:
>>
>> struct hns_roce_create_qp {
>>      struct ibv_create_qp        ibv_cmd;
>>      __u64                buf_addr;
>>      __u8                log_sq_bb_count;
>>      __u8                log_sq_stride;
>>      __u8                reserved[5];
>> };
>>      It is better to modify hns_roce_create_qp in libhns, right?
> Yes, it can work, because it is user space problem, where you used wrong
> structure.
>
> Thanks
Thanks, Leon
I will pull it out off this series in patch v2.
>>      Thanks
>>
>>      Regards
>> Wei Hu
>>>> --
>>>> 1.9.1
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
>>>> the body of a message to majordomo@vger.kernel.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@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web