LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Fix wrong port_cap_flags
@ 2021-08-31  8:32 Junji Wei
  2021-08-31 11:54 ` Leon Romanovsky
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Junji Wei @ 2021-08-31  8:32 UTC (permalink / raw)
  To: zyjzyj2000, dledford, jgg; +Cc: linux-rdma, linux-kernel, xieyongji, Junji Wei

The port->attr.port_cap_flags should be set to enum
ib_port_capability_mask_bits in ib_mad.h,
not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.

Signed-off-by: Junji Wei <weijunji@bytedance.com>
---
 drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h
index 742e6ec93686..b5a70cbe94aa 100644
--- a/drivers/infiniband/sw/rxe/rxe_param.h
+++ b/drivers/infiniband/sw/rxe/rxe_param.h
@@ -113,7 +113,7 @@ enum rxe_device_param {
 /* default/initial rxe port parameters */
 enum rxe_port_param {
 	RXE_PORT_GID_TBL_LEN		= 1024,
-	RXE_PORT_PORT_CAP_FLAGS		= RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
+	RXE_PORT_PORT_CAP_FLAGS		= IB_PORT_CM_SUP,
 	RXE_PORT_MAX_MSG_SZ		= 0x800000,
 	RXE_PORT_BAD_PKEY_CNTR		= 0,
 	RXE_PORT_QKEY_VIOL_CNTR		= 0,
-- 
2.30.1 (Apple Git-130)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/rxe: Fix wrong port_cap_flags
  2021-08-31  8:32 [PATCH] RDMA/rxe: Fix wrong port_cap_flags Junji Wei
@ 2021-08-31 11:54 ` Leon Romanovsky
  2021-09-06  7:21 ` Zhu Yanjun
  2021-09-14 19:03 ` Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2021-08-31 11:54 UTC (permalink / raw)
  To: Junji Wei; +Cc: zyjzyj2000, dledford, jgg, linux-rdma, linux-kernel, xieyongji

On Tue, Aug 31, 2021 at 04:32:23PM +0800, Junji Wei wrote:
> The port->attr.port_cap_flags should be set to enum
> ib_port_capability_mask_bits in ib_mad.h,
> not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.
> 
> Signed-off-by: Junji Wei <weijunji@bytedance.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/rxe: Fix wrong port_cap_flags
  2021-08-31  8:32 [PATCH] RDMA/rxe: Fix wrong port_cap_flags Junji Wei
  2021-08-31 11:54 ` Leon Romanovsky
@ 2021-09-06  7:21 ` Zhu Yanjun
  2021-09-06  7:53   ` Junji Wei
  2021-09-14 19:03 ` Jason Gunthorpe
  2 siblings, 1 reply; 6+ messages in thread
From: Zhu Yanjun @ 2021-09-06  7:21 UTC (permalink / raw)
  To: Junji Wei
  Cc: Doug Ledford, Jason Gunthorpe, RDMA mailing list, LKML, xieyongji

On Tue, Aug 31, 2021 at 4:32 PM Junji Wei <weijunji@bytedance.com> wrote:
>
> The port->attr.port_cap_flags should be set to enum
> ib_port_capability_mask_bits in ib_mad.h,
> not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.
>
> Signed-off-by: Junji Wei <weijunji@bytedance.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h
> index 742e6ec93686..b5a70cbe94aa 100644
> --- a/drivers/infiniband/sw/rxe/rxe_param.h
> +++ b/drivers/infiniband/sw/rxe/rxe_param.h
> @@ -113,7 +113,7 @@ enum rxe_device_param {
>  /* default/initial rxe port parameters */
>  enum rxe_port_param {
>         RXE_PORT_GID_TBL_LEN            = 1024,
> -       RXE_PORT_PORT_CAP_FLAGS         = RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
> +       RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP,

RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP |
RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,

Is it better?

Zhu Yanjun

>         RXE_PORT_MAX_MSG_SZ             = 0x800000,
>         RXE_PORT_BAD_PKEY_CNTR          = 0,
>         RXE_PORT_QKEY_VIOL_CNTR         = 0,
> --
> 2.30.1 (Apple Git-130)
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/rxe: Fix wrong port_cap_flags
  2021-09-06  7:21 ` Zhu Yanjun
@ 2021-09-06  7:53   ` Junji Wei
  2021-09-06  8:59     ` Zhu Yanjun
  0 siblings, 1 reply; 6+ messages in thread
From: Junji Wei @ 2021-09-06  7:53 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: Doug Ledford, Jason Gunthorpe, RDMA mailing list, LKML, xieyongji


> On Sep 6, 2021, at 3:21 PM, Zhu Yanjun <zyjzyj2000@gmail.com> wrote:
> 
> On Tue, Aug 31, 2021 at 4:32 PM Junji Wei <weijunji@bytedance.com> wrote:
>> 
>> The port->attr.port_cap_flags should be set to enum
>> ib_port_capability_mask_bits in ib_mad.h,
>> not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.
>> 
>> Signed-off-by: Junji Wei <weijunji@bytedance.com>
>> ---
>> drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h
>> index 742e6ec93686..b5a70cbe94aa 100644
>> --- a/drivers/infiniband/sw/rxe/rxe_param.h
>> +++ b/drivers/infiniband/sw/rxe/rxe_param.h
>> @@ -113,7 +113,7 @@ enum rxe_device_param {
>> /* default/initial rxe port parameters */
>> enum rxe_port_param {
>>        RXE_PORT_GID_TBL_LEN            = 1024,
>> -       RXE_PORT_PORT_CAP_FLAGS         = RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
>> +       RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP,
> 
> RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP |
> RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
> 
> Is it better?
> 
> Zhu Yanjun

I don’t think so.

Because RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP(0x800000)
means IB_PORT_BOOT_MGMT_SUP(1 << 23) in ib_mad.h.
RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP should be used for
port’s core_cap_flags.

> 
>>        RXE_PORT_MAX_MSG_SZ             = 0x800000,
>>        RXE_PORT_BAD_PKEY_CNTR          = 0,
>>        RXE_PORT_QKEY_VIOL_CNTR         = 0,
>> --
>> 2.30.1 (Apple Git-130)
>> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/rxe: Fix wrong port_cap_flags
  2021-09-06  7:53   ` Junji Wei
@ 2021-09-06  8:59     ` Zhu Yanjun
  0 siblings, 0 replies; 6+ messages in thread
From: Zhu Yanjun @ 2021-09-06  8:59 UTC (permalink / raw)
  To: Junji Wei
  Cc: Doug Ledford, Jason Gunthorpe, RDMA mailing list, LKML, xieyongji

On Mon, Sep 6, 2021 at 3:53 PM Junji Wei <weijunji@bytedance.com> wrote:
>
>
> > On Sep 6, 2021, at 3:21 PM, Zhu Yanjun <zyjzyj2000@gmail.com> wrote:
> >
> > On Tue, Aug 31, 2021 at 4:32 PM Junji Wei <weijunji@bytedance.com> wrote:
> >>
> >> The port->attr.port_cap_flags should be set to enum
> >> ib_port_capability_mask_bits in ib_mad.h,
> >> not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.
> >>
> >> Signed-off-by: Junji Wei <weijunji@bytedance.com>
> >> ---
> >> drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h
> >> index 742e6ec93686..b5a70cbe94aa 100644
> >> --- a/drivers/infiniband/sw/rxe/rxe_param.h
> >> +++ b/drivers/infiniband/sw/rxe/rxe_param.h
> >> @@ -113,7 +113,7 @@ enum rxe_device_param {
> >> /* default/initial rxe port parameters */
> >> enum rxe_port_param {
> >>        RXE_PORT_GID_TBL_LEN            = 1024,
> >> -       RXE_PORT_PORT_CAP_FLAGS         = RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
> >> +       RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP,
> >
> > RXE_PORT_PORT_CAP_FLAGS         = IB_PORT_CM_SUP |
> > RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP,
> >
> > Is it better?
> >
> > Zhu Yanjun
>
> I don’t think so.
>
> Because RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP(0x800000)
> means IB_PORT_BOOT_MGMT_SUP(1 << 23) in ib_mad.h.
> RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP should be used for
> port’s core_cap_flags.

Sure. Thanks

Zhu Yanjun

>
> >
> >>        RXE_PORT_MAX_MSG_SZ             = 0x800000,
> >>        RXE_PORT_BAD_PKEY_CNTR          = 0,
> >>        RXE_PORT_QKEY_VIOL_CNTR         = 0,
> >> --
> >> 2.30.1 (Apple Git-130)
> >>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] RDMA/rxe: Fix wrong port_cap_flags
  2021-08-31  8:32 [PATCH] RDMA/rxe: Fix wrong port_cap_flags Junji Wei
  2021-08-31 11:54 ` Leon Romanovsky
  2021-09-06  7:21 ` Zhu Yanjun
@ 2021-09-14 19:03 ` Jason Gunthorpe
  2 siblings, 0 replies; 6+ messages in thread
From: Jason Gunthorpe @ 2021-09-14 19:03 UTC (permalink / raw)
  To: Junji Wei; +Cc: zyjzyj2000, dledford, linux-rdma, linux-kernel, xieyongji

On Tue, Aug 31, 2021 at 04:32:23PM +0800, Junji Wei wrote:
> The port->attr.port_cap_flags should be set to enum
> ib_port_capability_mask_bits in ib_mad.h,
> not RDMA_CORE_CAP_PROT_ROCE_UDP_ENCAP.
> 
> Signed-off-by: Junji Wei <weijunji@bytedance.com>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/sw/rxe/rxe_param.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-09-14 19:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31  8:32 [PATCH] RDMA/rxe: Fix wrong port_cap_flags Junji Wei
2021-08-31 11:54 ` Leon Romanovsky
2021-09-06  7:21 ` Zhu Yanjun
2021-09-06  7:53   ` Junji Wei
2021-09-06  8:59     ` Zhu Yanjun
2021-09-14 19:03 ` Jason Gunthorpe

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