From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAD642EDD62; Mon, 27 Oct 2025 18:40:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761590457; cv=none; b=tQi04KjmEZGF+qKxAPesOxq5DYvduXwiBSDy7UgbGMtGhyyvueuhnK+Z4n/h2IK22ksjGCBuUo8vJgdIILb3AOTOJ0/pvGecfiIXNoYsz9l8M2Bb8P3l0IdLIm+dqdU/NsleDnVbFr1DUBoKyaTvsYhL1EQiKoUDrmwpfQvfWNo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761590457; c=relaxed/simple; bh=drNRIW+Lvi40vnhCxRsvlvX2FcCWk8Cb7EjNCbLsWgU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dVekpy0kntMY0kVsGgsB2ya/dy6ttdEKrSPseWOZBtNhADQTg/df5M1xsHw7ICHk9VdFa4hC1bfCZFqxhJqlh/TJleOH/N0FVsolq7hDNVqe+JV0VutXanlA2eOJcEgBn5Ec4zPcv8hyiRHExbcjX4HUNZlNgNk63atwkDf/feE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lfuH0O0w; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="lfuH0O0w" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1114DC4CEF1; Mon, 27 Oct 2025 18:40:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761590457; bh=drNRIW+Lvi40vnhCxRsvlvX2FcCWk8Cb7EjNCbLsWgU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lfuH0O0wWcUw0OegrR3BV5XjKALpWnuZVU3Fk4q7/yAaEkDoNrMgOtawrNQjrw2hg /D3XXg/WuOBsku1ZYNkRVs/rfuSCFSlRAj2zd47u+mefwRzlPLYC/4l9b+QfD3GoxC opVnKZwG0CL7B8q8s9d87nZtk31G1a2LiQkcn+Ro= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Parav Pandit , Vlad Dumitrescu , Edward Srouji , Leon Romanovsky , Sasha Levin Subject: [PATCH 5.4 053/224] RDMA/core: Resolve MAC of next-hop device without ARP support Date: Mon, 27 Oct 2025 19:33:19 +0100 Message-ID: <20251027183510.418800369@linuxfoundation.org> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251027183508.963233542@linuxfoundation.org> References: <20251027183508.963233542@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Parav Pandit [ Upstream commit 200651b9b8aadfbbec852f0e5d042d9abe75e2ab ] 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 Reviewed-by: Vlad Dumitrescu Signed-off-by: Edward Srouji Link: https://patch.msgid.link/20250916111103.84069-3-edwards@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- 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 c9e63c692b6e8..48de2285922f8 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -459,14 +459,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.51.0