From: Yanjun Zhu <yanjun.zhu@linux.dev>
To: Edward Srouji <edwards@nvidia.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>,
Jason Gunthorpe <jgg@nvidia.com>
Cc: Bob Pearson <rpearsonhpe@gmail.com>,
Leon Romanovsky <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>
Subject: Re: 10 more python test cases for rxe
Date: Wed, 20 Oct 2021 20:52:21 +0800 [thread overview]
Message-ID: <3c13fea1-31cd-e45c-b4bb-a75792b37c0f@linux.dev> (raw)
In-Reply-To: <DM4PR12MB5216785DF4827AF953E2AC04DABE9@DM4PR12MB5216.namprd12.prod.outlook.com>
在 2021/10/20 18:27, Edward Srouji 写道:
>> On Wed, Oct 13, 2021 at 11:00 PM Jason Gunthorpe <jgg@nvidia.com> wrote:
>>>
>>> On Wed, Oct 13, 2021 at 09:43:28AM -0500, Bob Pearson wrote:
>>>> Zhu,
>>>>
>>>> There are about 10 test cases in the python suite that do not run
>>>> for rxe because
>>>>
>>>> ... skipped "Device rxe0 doesn't have net interface"
>>>>
>>>> Clearly this is wrong and I don't know how to address the root cause
>>>> yet but the following hack where enp0s3 is the actual net device
>>>> that rxe0 is based on in my case enables these test cases to run and it
>> appears they all do.
>>>>
>>>> diff --git a/tests/base.py b/tests/base.py
>>>>
>>>> index 3460c546..d6fd29b8 100644
>>>>
>>>>
>>>> +++ b/tests/base.py
>>>>
>>>> @@ -240,10 +240,11 @@ class RDMATestCase(unittest.TestCase):
>>>>
>>>> if self.gid_type is not None and
>>>> ctx.query_gid_type(port, idx) != \
>>>>
>>>> self.gid_type:
>>>>
>>>> continue
>>>>
>>>> - if not
>> os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
>>>>
>>>> - self.args.append([dev, port, idx, None, None])
>>>>
>>>> - continue
>>>>
>>>> - net_name = self.get_net_name(dev)
>>>>
>>>> + #if not
>> os.path.exists('/sys/class/infiniband/{}/device/net/'.format(dev)):
>>>
>>> The pytests code is wrong - it should be querying the netdev through
>>> the verbs APIs, not hacking in sysfs like this.
>>
>> Got it. Thanks
>>
>> Zhu Yanjun
>>
>>>
>>> Jason
>
> I will modify the base test file to use verbs API instead of accessing the sysfs directly.
> I wanted to do that using ibv_query_gid_ex to get the netdev ifindex, but in case of IB (IPoIB) the netdex is just 0 and not updated accordingly.
> Not sure if it's a bug or by design (looks like a bug for me).
> I'll check that and update accordingly.
Hope all the test cases are ready.
Zhu Yanjun
>
> Thanks,
> Edward.
>
prev parent reply other threads:[~2021-10-20 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-13 14:43 10 more python test cases for rxe Bob Pearson
2021-10-13 15:00 ` Jason Gunthorpe
2021-10-14 12:36 ` Zhu Yanjun
2021-10-20 10:27 ` Edward Srouji
2021-10-20 11:39 ` Jason Gunthorpe
2021-10-20 12:52 ` Yanjun Zhu [this message]
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=3c13fea1-31cd-e45c-b4bb-a75792b37c0f@linux.dev \
--to=yanjun.zhu@linux.dev \
--cc=edwards@nvidia.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=rpearsonhpe@gmail.com \
--cc=zyjzyj2000@gmail.com \
/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