From: Chuck Lever III <chuck.lever@oracle.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Chuck Lever <cel@kernel.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
Bernard Metzler <BMT@zurich.ibm.com>, Tom Talpey <tom@talpey.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH RFC] RDMA/core: Handle ARPHRD_NONE devices
Date: Wed, 7 Jun 2023 14:48:59 +0000 [thread overview]
Message-ID: <95E53E7B-829B-454A-A15E-0B5062CE2FCB@oracle.com> (raw)
In-Reply-To: <ZH++hitKpvcFC/hQ@nvidia.com>
> On Jun 6, 2023, at 7:17 PM, Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> On Tue, Jun 06, 2023 at 08:15:36PM +0000, Chuck Lever III wrote:
>>
>>
>>> On Jun 6, 2023, at 11:48 AM, Jason Gunthorpe <jgg@nvidia.com> wrote:
>>>
>>> On Fri, Jun 02, 2023 at 03:24:30PM -0400, Chuck Lever wrote:
>>>> From: Chuck Lever <chuck.lever@oracle.com>
>>>>
>>>> We would like to enable the use of siw on top of a VPN that is
>>>> constructed and managed via a tun device. That hasn't worked up
>>>> until now because ARPHRD_NONE devices (such as tun devices) have
>>>> no GID for the RDMA/core to look up.
>>>>
>>>> But it turns out that the egress device has already been picked for
>>>> us. addr_handler() just has to do the right thing with it.
>>>>
>>>> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
>>>> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
>>>> ---
>>>> drivers/infiniband/core/cma.c | 4 ++++
>>>> 1 file changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
>>>> index 56e568fcd32b..3351dc5afa17 100644
>>>> --- a/drivers/infiniband/core/cma.c
>>>> +++ b/drivers/infiniband/core/cma.c
>>>> @@ -704,11 +704,15 @@ cma_validate_port(struct ib_device *device, u32 port,
>>>> ndev = dev_get_by_index(dev_addr->net, bound_if_index);
>>>> if (!ndev)
>>>> return ERR_PTR(-ENODEV);
>>>> + } else if (dev_type == ARPHRD_NONE) {
>>>> + sgid_attr = rdma_get_gid_attr(device, port, 0);
>>>
>>> It seems believable, should it be locked to iwarp devices?
>>>
>>> More broadly, should iwarp devices just always do this and skip all
>>> the rest of it?
>>>
>>> I think it also has to check that the returned netdev in the sgid_attr
>>> matches the egress netdev selected?
>>
>> Both @ndev and sgid_attr.ndev are NULL here.
>
> The nedev to check is the dev_addr->bound_dev_if, that represents the netdev
>
> It is some iwarp mistake that the sgid attr's don't have proper
> netdevs, that is newer than iwarp so it never got updated.
>
> So, maybe it is too hard to fix for this, and maybe we can just assume
> it all has to be right
sgid_attr.index is not set it looks like. I will send you an "official"
version of this patch and we can go from there.
--
Chuck Lever
prev parent reply other threads:[~2023-06-07 14:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 19:24 [PATCH RFC] RDMA/core: Handle ARPHRD_NONE devices Chuck Lever
2023-06-02 22:18 ` Tom Talpey
2023-06-03 0:33 ` Chuck Lever III
2023-06-03 13:51 ` Bernard Metzler
2023-06-03 13:53 ` Chuck Lever III
2023-06-03 13:55 ` Bernard Metzler
2023-06-05 19:05 ` Jason Gunthorpe
2023-06-06 15:48 ` Jason Gunthorpe
2023-06-06 20:15 ` Chuck Lever III
2023-06-06 23:17 ` Jason Gunthorpe
2023-06-07 14:48 ` Chuck Lever III [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=95E53E7B-829B-454A-A15E-0B5062CE2FCB@oracle.com \
--to=chuck.lever@oracle.com \
--cc=BMT@zurich.ibm.com \
--cc=cel@kernel.org \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tom@talpey.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;
as well as URLs for NNTP newsgroup(s).