Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Bernard Metzler <BMT@zurich.ibm.com>,
	"jgg@ziepe.ca" <jgg@ziepe.ca>,
	"leon@kernel.org" <leon@kernel.org>
Cc: "linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: [PATCH 3/4] RDMA/siw: Set qp_state in siw_query_qp
Date: Fri, 1 Dec 2023 09:29:18 +0800	[thread overview]
Message-ID: <49c3a285-1467-addf-0eec-736886e48434@linux.dev> (raw)
In-Reply-To: <BY5PR15MB3602998251455B5F504978F39982A@BY5PR15MB3602.namprd15.prod.outlook.com>

Hi Bernard,

On 12/1/23 02:09, Bernard Metzler wrote:
>> -----Original Message-----
>> From: Guoqing Jiang <guoqing.jiang@linux.dev>
>> Sent: Wednesday, November 29, 2023 4:24 AM
>> To: Bernard Metzler <BMT@zurich.ibm.com>; jgg@ziepe.ca; leon@kernel.org
>> Cc: linux-rdma@vger.kernel.org; guoqing.jiang@linux.dev
>> Subject: [EXTERNAL] [PATCH 3/4] RDMA/siw: Set qp_state in siw_query_qp
>>
>> Run test_query_rc_qp against siw failed since siw didn't set qp_state
>> accordingly. To address it, introduce siw_qp_state_to_ib_qp_state
>> which convert SIW_QP_STATE_IDLE to IB_QPS_INIT which is similar as
>> in cxgb4.
>>
>> rdma-core# ./build/bin/run_tests.py --dev siw0
>> tests.test_qp.QPTest.test_query_rc_qp -v
>> test_query_rc_qp (tests.test_qp.QPTest)
>> Queries an RC QP after creation. Verifies that its properties are as ...
>> FAIL
>>
>> ======================================================================
>> FAIL: test_query_rc_qp (tests.test_qp.QPTest)
>> Queries an RC QP after creation. Verifies that its properties are as
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>    File "/home/gjiang/rdma-core/tests/test_qp.py", line 284, in
>> test_query_rc_qp
>>      self.query_qp_common_test(e.IBV_QPT_RC)
>>    File "/home/gjiang/rdma-core/tests/test_qp.py", line 265, in
>> query_qp_common_test
>>      self.verify_qp_attrs(caps, e.IBV_QPS_INIT, qp_init_attr, qp_attr)
>>    File "/home/gjiang/rdma-core/tests/test_qp.py", line 239, in
>> verify_qp_attrs
>>      self.assertEqual(state, attr.qp_state)
>> AssertionError: <ibv_qp_state.IBV_QPS_INIT: 1> != 0
>>
>> ----------------------------------------------------------------------
>> Ran 1 test in 0.057s
>>
>> FAILED (failures=1)
>>
>> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
> Very nice finding! How could that remain undetected.
> Probably no real application checks QP state 😉

My guess is no one run the test after the commit 😉.

698f2ae80476 tests: Fix comparing qp_state for iWARP providers.

>> ---
>>   drivers/infiniband/sw/siw/siw_verbs.c | 10 ++++++++++
>>   1 file changed, 10 insertions(+)
>>
>> diff --git a/drivers/infiniband/sw/siw/siw_verbs.c
>> b/drivers/infiniband/sw/siw/siw_verbs.c
>> index dca6a155523d..233985434cfd 100644
>> --- a/drivers/infiniband/sw/siw/siw_verbs.c
>> +++ b/drivers/infiniband/sw/siw/siw_verbs.c
>> @@ -19,6 +19,15 @@
>>   #include "siw_verbs.h"
>>   #include "siw_mem.h"
>>
>> +static int siw_qp_state_to_ib_qp_state[IB_QPS_ERR] = {
> You may better use SIW_QP_STATE_COUNT for the size
> of the array

Right, fully agree, will change it in next version after you finish
review this version.

Thanks,
Guoqing

  reply	other threads:[~2023-12-01  1:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  3:24 [PATCH 0/4] Misc changes for siw Guoqing Jiang
2023-11-29  3:24 ` [PATCH 1/4] RDMA/siw: Move tx_cpu ahead Guoqing Jiang
2023-12-01 15:43   ` Bernard Metzler
2023-11-29  3:24 ` [PATCH 2/4] RDMA/siw: Reduce memory usage of struct siw_rx_stream Guoqing Jiang
2023-12-01 15:43   ` Bernard Metzler
2023-11-29  3:24 ` [PATCH 3/4] RDMA/siw: Set qp_state in siw_query_qp Guoqing Jiang
2023-11-30 18:09   ` Bernard Metzler
2023-12-01  1:29     ` Guoqing Jiang [this message]
2023-11-29  3:24 ` [PATCH 4/4] RDMA/siw: Call orq_get_current if possible Guoqing Jiang
2023-12-01 15:47   ` Bernard Metzler
2023-12-03  9:15     ` Guoqing Jiang

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=49c3a285-1467-addf-0eec-736886e48434@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=BMT@zurich.ibm.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.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