From: Edward Srouji <edwards@nvidia.com>
To: <jgg@ziepe.ca>, <leon@kernel.org>
Cc: <linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<parav@nvidia.com>, <cratiu@nvidia.com>, <vdumitrescu@nvidia.com>,
<edwards@nvidia.com>, <kuba@kernel.org>, <tariqt@nvidia.com>,
<mbloch@nvidia.com>, <gal@nvidia.com>
Subject: [PATCH 2/4] RDMA/core: Resolve MAC of next-hop device without ARP support
Date: Sun, 7 Sep 2025 19:08:31 +0300 [thread overview]
Message-ID: <20250907160833.56589-3-edwards@nvidia.com> (raw)
In-Reply-To: <20250907160833.56589-1-edwards@nvidia.com>
From: Parav Pandit <parav@nvidia.com>
Currently, if the next-hop netdevice does not support ARP resolution,
the destination MAC address is silently set to zero without reporting
an error. This leads to incorrect behavior and may result in packet
transmission failures.
Fix this by deferring MAC resolution to the IP stack via neighbour
lookup, allowing proper resolution or error reporting as appropriate.
Fixes: 7025fcd36bd6 ("IB: address translation to map IP toIB addresses (GIDs)")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Vlad Dumitrescu <vdumitrescu@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
---
drivers/infiniband/core/addr.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 594e7ee335f7..ca86c482662f 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -454,14 +454,10 @@ static int addr_resolve_neigh(const struct dst_entry *dst,
{
int ret = 0;
- if (ndev_flags & IFF_LOOPBACK) {
+ if (ndev_flags & IFF_LOOPBACK)
memcpy(addr->dst_dev_addr, addr->src_dev_addr, MAX_ADDR_LEN);
- } else {
- if (!(ndev_flags & IFF_NOARP)) {
- /* If the device doesn't do ARP internally */
- ret = fetch_ha(dst, addr, dst_in, seq);
- }
- }
+ else
+ ret = fetch_ha(dst, addr, dst_in, seq);
return ret;
}
--
2.21.3
next prev parent reply other threads:[~2025-09-07 16:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 16:08 [PATCH 0/4] Fix local destination address resolution with VRF Edward Srouji
2025-09-07 16:08 ` [PATCH 1/4] RDMA/core: Squash a single user static function Edward Srouji
2025-09-10 8:17 ` Leon Romanovsky
2025-09-10 10:51 ` Parav Pandit
2025-09-10 12:21 ` Leon Romanovsky
2025-09-07 16:08 ` Edward Srouji [this message]
2025-09-10 8:32 ` [PATCH 2/4] RDMA/core: Resolve MAC of next-hop device without ARP support Leon Romanovsky
2025-09-10 10:55 ` Parav Pandit
2025-09-15 16:30 ` Jason Gunthorpe
2025-09-15 17:16 ` Parav Pandit
2025-09-07 16:08 ` [PATCH 3/4] RDMA/core: Use route entry flag to decide on loopback traffic Edward Srouji
2025-09-07 16:08 ` [PATCH 4/4] IB/ipoib: Ignore L3 master device Edward Srouji
2025-09-16 11:10 ` [PATCH v1 0/4] Fix local destination address resolution with VRF Edward Srouji
2025-09-16 11:11 ` [PATCH v1 1/4] RDMA/core: Squash a single user static function Edward Srouji
2025-09-16 11:11 ` [PATCH v1 2/4] RDMA/core: Resolve MAC of next-hop device without ARP support Edward Srouji
2025-09-16 11:11 ` [PATCH v1 3/4] RDMA/core: Use route entry flag to decide on loopback traffic Edward Srouji
2025-09-16 11:11 ` [PATCH v1 4/4] IB/ipoib: Ignore L3 master device Edward Srouji
2025-09-18 9:24 ` [PATCH v1 0/4] Fix local destination address resolution with VRF Leon Romanovsky
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=20250907160833.56589-3-edwards@nvidia.com \
--to=edwards@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=gal@nvidia.com \
--cc=jgg@ziepe.ca \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=parav@nvidia.com \
--cc=tariqt@nvidia.com \
--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