All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/core: Fix wrong rkey in test_qp_ex_rc_bind_mw
@ 2022-05-18 15:23 Bob Pearson
  2022-05-19  3:38 ` Zhu Yanjun
  0 siblings, 1 reply; 3+ messages in thread
From: Bob Pearson @ 2022-05-18 15:23 UTC (permalink / raw)
  To: edwards, leon, jgg, zyjzyj2000, linux-rdma; +Cc: Bob Pearson

The current test_qp_ex_rc_bind_mw in tests/test_qpex.py uses an incorrect
value for the new_rkey based on the old mr.rkey. This patch fixes that
behavior by basing the new rkey on the old mw.rkey instead.

Before this patch the test will fail for the rxe driver about 1 in 256
tries since randomly that is the freguency of new_rkeys which have the
same 8 bit key portion as the current mw which is not allowed. With
this patch those errors do not occur.

Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
---
 tests/test_qpex.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_qpex.py b/tests/test_qpex.py
index 8f3f338e..a4c99910 100644
--- a/tests/test_qpex.py
+++ b/tests/test_qpex.py
@@ -300,7 +300,7 @@ class QpExTestCase(RDMATestCase):
             if ex.error_code == errno.EOPNOTSUPP:
                 raise unittest.SkipTest('Memory Window allocation is not supported')
             raise ex
-        new_key = inc_rkey(server.mr.rkey)
+        new_key = inc_rkey(mw.rkey)
         server.qp.wr_bind_mw(mw, new_key, bind_info)
         server.qp.wr_complete()
         u.poll_cq(server.cq)
-- 
2.34.1


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

* Re: [PATCH for-next] RDMA/core: Fix wrong rkey in test_qp_ex_rc_bind_mw
  2022-05-18 15:23 [PATCH for-next] RDMA/core: Fix wrong rkey in test_qp_ex_rc_bind_mw Bob Pearson
@ 2022-05-19  3:38 ` Zhu Yanjun
  2022-05-19 12:32   ` Edward Srouji
  0 siblings, 1 reply; 3+ messages in thread
From: Zhu Yanjun @ 2022-05-19  3:38 UTC (permalink / raw)
  To: Bob Pearson
  Cc: Edward Srouji, Leon Romanovsky, Jason Gunthorpe, RDMA mailing list

On Wed, May 18, 2022 at 11:23 PM Bob Pearson <rpearsonhpe@gmail.com> wrote:
>
> The current test_qp_ex_rc_bind_mw in tests/test_qpex.py uses an incorrect
> value for the new_rkey based on the old mr.rkey. This patch fixes that
> behavior by basing the new rkey on the old mw.rkey instead.
>
> Before this patch the test will fail for the rxe driver about 1 in 256
> tries since randomly that is the freguency of new_rkeys which have the
> same 8 bit key portion as the current mw which is not allowed. With
> this patch those errors do not occur.
>
> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>

This is for rdma-core? It had better add "for rdma core" in the subject line.

Zhu Yanjun

> ---
>  tests/test_qpex.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/test_qpex.py b/tests/test_qpex.py
> index 8f3f338e..a4c99910 100644
> --- a/tests/test_qpex.py
> +++ b/tests/test_qpex.py
> @@ -300,7 +300,7 @@ class QpExTestCase(RDMATestCase):
>              if ex.error_code == errno.EOPNOTSUPP:
>                  raise unittest.SkipTest('Memory Window allocation is not supported')
>              raise ex
> -        new_key = inc_rkey(server.mr.rkey)
> +        new_key = inc_rkey(mw.rkey)
>          server.qp.wr_bind_mw(mw, new_key, bind_info)
>          server.qp.wr_complete()
>          u.poll_cq(server.cq)
> --
> 2.34.1
>

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

* Re: [PATCH for-next] RDMA/core: Fix wrong rkey in test_qp_ex_rc_bind_mw
  2022-05-19  3:38 ` Zhu Yanjun
@ 2022-05-19 12:32   ` Edward Srouji
  0 siblings, 0 replies; 3+ messages in thread
From: Edward Srouji @ 2022-05-19 12:32 UTC (permalink / raw)
  To: Zhu Yanjun, Bob Pearson
  Cc: Leon Romanovsky, Jason Gunthorpe, RDMA mailing list

Thanks Bob for the fix.

Could you please add a "Fixes" line?

On 5/19/2022 6:38 AM, Zhu Yanjun wrote:
>
> On Wed, May 18, 2022 at 11:23 PM Bob Pearson <rpearsonhpe@gmail.com> wrote:
>> The current test_qp_ex_rc_bind_mw in tests/test_qpex.py uses an incorrect
>> value for the new_rkey based on the old mr.rkey. This patch fixes that
>> behavior by basing the new rkey on the old mw.rkey instead.
>>
>> Before this patch the test will fail for the rxe driver about 1 in 256
>> tries since randomly that is the freguency of new_rkeys which have the
>> same 8 bit key portion as the current mw which is not allowed. With
>> this patch those errors do not occur.
>>
>> Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
> This is for rdma-core? It had better add "for rdma core" in the subject line.
>
> Zhu Yanjun
>
>> ---
>>   tests/test_qpex.py | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tests/test_qpex.py b/tests/test_qpex.py
>> index 8f3f338e..a4c99910 100644
>> --- a/tests/test_qpex.py
>> +++ b/tests/test_qpex.py
>> @@ -300,7 +300,7 @@ class QpExTestCase(RDMATestCase):
>>               if ex.error_code == errno.EOPNOTSUPP:
>>                   raise unittest.SkipTest('Memory Window allocation is not supported')
>>               raise ex
>> -        new_key = inc_rkey(server.mr.rkey)
>> +        new_key = inc_rkey(mw.rkey)
>>           server.qp.wr_bind_mw(mw, new_key, bind_info)
>>           server.qp.wr_complete()
>>           u.poll_cq(server.cq)
>> --
>> 2.34.1
>>

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

end of thread, other threads:[~2022-05-19 12:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 15:23 [PATCH for-next] RDMA/core: Fix wrong rkey in test_qp_ex_rc_bind_mw Bob Pearson
2022-05-19  3:38 ` Zhu Yanjun
2022-05-19 12:32   ` Edward Srouji

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.