From: Jason Gunthorpe <jgg@ziepe.ca>
To: Alex Timofeyev <sashka@ankey.net>
Cc: Leon Romanovsky <leon@kernel.org>,
linux-rdma@vger.kernel.org, Parav Pandit <parav@nvidia.com>,
Edward Srouji <edwards@nvidia.com>,
Vlad Dumitrescu <vdumitrescu@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH rdma-next v1 0/2] RDMA: fix cross-NIC same-host IPv6 RDMA-CM connect
Date: Mon, 15 Jun 2026 20:59:24 -0300 [thread overview]
Message-ID: <20260615235924.GT1066031@ziepe.ca> (raw)
In-Reply-To: <1781545579.1-sashka@ankey.net>
On Mon, Jun 15, 2026 at 05:46:19PM +0000, Alex Timofeyev wrote:
> RDMA-CM cannot establish an IPv6 RoCEv2 connection between two NICs that
> live on the same host. This shows up on hosts that pin one process per
> NUMA-local NIC and let those processes talk to each other over each NIC's
> global IPv6 GID (e.g. a storage daemon with one engine per NUMA node on
> dual ConnectX-7). rdma_resolve_addr() and ib_send_cm_req() both return
> success, but the destination NIC silently drops the frame and the peer
> never sees the REQ; the connection times out.
>
> The bug has two halves, one on each side of the connection:
>
> 1) Send side (patch 1, drivers/infiniband/core/addr.c)
>
> When the destination address is local, addr_resolve_neigh() copies the
> *source* device's MAC into the path record's destination MAC. That is
> right for true loopback (same netdev), but for a destination that lives
> on a different netdev of the same host the destination NIC will not
> accept a frame addressed to the source NIC's MAC and drops it in HW.
> The fix resolves the netdev that owns the destination address and uses
> its MAC.
I'm not sure about this, you need to have policy routing or VRF setup
so these local routes don't show up.. Do you have that?
A local route result should result only in a local loopback AH, it should
never result in a packet on the wire, and we shouldn't be trying to
mangle loopback routes at all.
> 2) Receive side (patch 2, drivers/infiniband/core/cma.c)
>
> Once the REQ does reach the peer, validate_ipv6_net_dev() rejects it:
> rt6_lookup() of a same-host destination collapses onto the loopback
> netdev, so the strict rt6i_idev->dev == net_dev check fails with
> -EHOSTUNREACH even though the REQ arrived on the right net_dev. The fix
> accepts an RTF_LOCAL route when net_dev itself owns the listener
> address. This half is only observable once patch 1 lets the REQ
> arrive.
Same answer here, if you have proper routing you won't get a loopback
route to match and you won't fail on this check. Removing the check
does not seem correct.
Jason
next prev parent reply other threads:[~2026-06-15 23:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 17:46 Alex Timofeyev
2026-06-15 17:46 ` [PATCH rdma-next v1 2/2] RDMA/cma: accept cross-NIC same-host local dst in validate_ipv6_net_dev Alex Timofeyev
2026-06-15 17:46 ` [PATCH rdma-next v1 1/2] RDMA/core: use destination netdev MAC for cross-NIC same-host local dst Alex Timofeyev
2026-06-15 23:59 ` Jason Gunthorpe [this message]
2026-06-17 2:02 ` [PATCH rdma-next v1 0/2] RDMA: fix cross-NIC same-host IPv6 RDMA-CM connect Alex Timofeyev
2026-07-02 15:26 ` Jason Gunthorpe
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=20260615235924.GT1066031@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=edwards@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=parav@nvidia.com \
--cc=sashka@ankey.net \
--cc=vdumitrescu@nvidia.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
all inboxes | Powered by JetHome®