From patchwork Mon Jul 17 15:12:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13315880 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3D41C001B0 for ; Mon, 17 Jul 2023 15:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229541AbjGQPMQ (ORCPT ); Mon, 17 Jul 2023 11:12:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229608AbjGQPMQ (ORCPT ); Mon, 17 Jul 2023 11:12:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20B9CE6 for ; Mon, 17 Jul 2023 08:12:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B343B610E8 for ; Mon, 17 Jul 2023 15:12:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F3A3C433C8; Mon, 17 Jul 2023 15:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689606734; bh=4avJEdfWOu7+j0BNKREDlNdzSA16EPIWvquz8T3FyGU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=KlQ8+Y7tLeAQWd9MoTKE9pp6HHUIT/etPYgN4Zax2orgFKuGAnYByKmWuGQYq+ksX jVeztpyHPqaGng7B2Cc3pHvaGzsDekGgaHmk4rueOmjo6QOT7pgITYhlqmHhsfzPVC HSoadYSH6u8sj0KMexhg6/R0z/dTgEGTNV8UaprXaXVgqHGWU5sQl0ow/Z8i22UT0M OET5OLX9thHHAbCbSzoeaT6qZ39358pDgfz+NwtWIcuKJox96DKsq2XSgtwYTbSggm TjpmzxX0zJkg3xf6kkXCJoqU9QEwYAIdD1WIKJGF21yMKxezbCmY/RGwb2anZn4Ugj xxkQ/sGUNfO1w== Subject: [PATCH v6 1/4] RDMA/siw: Fabricate a GID on tun and loopback devices From: Chuck Lever To: leon@kernel.org, jgg@nvidia.com Cc: Tom Talpey , Bernard Metzler , Tom Talpey , Chuck Lever , BMT@zurich.ibm.com, tom@talpey.com, linux-rdma@vger.kernel.org Date: Mon, 17 Jul 2023 11:12:12 -0400 Message-ID: <168960673260.3007.12378736853793339110.stgit@manet.1015granger.net> In-Reply-To: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> References: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chuck Lever LOOPBACK and NONE (tunnel) devices have all-zero MAC addresses. Currently, siw_device_create() falls back to copying the IB device's name in those cases, because an all-zero MAC address breaks the RDMA core address resolution mechanism. However, at the point when siw_device_create() constructs a GID, the ib_device::name field is uninitialized, leaving the MAC address to remain in an all-zero state. Fabricate a random artificial GID for such devices, and ensure this artificial GID is returned for all device query operations. Reported-by: Tom Talpey Link: https://lore.kernel.org/linux-rdma/SA0PR15MB391986C07C4D41E107E79659994FA@SA0PR15MB3919.namprd15.prod.outlook.com/T/#t Fixes: a2d36b02c15d ("RDMA/siw: Enable siw on tunnel devices") Reviewed-by: Bernard Metzler Reviewed-by: Tom Talpey Signed-off-by: Chuck Lever --- drivers/infiniband/sw/siw/siw.h | 1 + drivers/infiniband/sw/siw/siw_main.c | 22 ++++++++-------------- drivers/infiniband/sw/siw/siw_verbs.c | 4 ++-- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h index 2f3a9cda3850..8b4a710b82bc 100644 --- a/drivers/infiniband/sw/siw/siw.h +++ b/drivers/infiniband/sw/siw/siw.h @@ -74,6 +74,7 @@ struct siw_device { u32 vendor_part_id; int numa_node; + char raw_gid[ETH_ALEN]; /* physical port state (only one port per device) */ enum ib_port_state state; diff --git a/drivers/infiniband/sw/siw/siw_main.c b/drivers/infiniband/sw/siw/siw_main.c index 65b5cda5457b..f45600d169ae 100644 --- a/drivers/infiniband/sw/siw/siw_main.c +++ b/drivers/infiniband/sw/siw/siw_main.c @@ -75,8 +75,7 @@ static int siw_device_register(struct siw_device *sdev, const char *name) return rv; } - siw_dbg(base_dev, "HWaddr=%pM\n", sdev->netdev->dev_addr); - + siw_dbg(base_dev, "HWaddr=%pM\n", sdev->raw_gid); return 0; } @@ -313,24 +312,19 @@ static struct siw_device *siw_device_create(struct net_device *netdev) return NULL; base_dev = &sdev->base_dev; - sdev->netdev = netdev; - if (netdev->type != ARPHRD_LOOPBACK && netdev->type != ARPHRD_NONE) { - addrconf_addr_eui48((unsigned char *)&base_dev->node_guid, - netdev->dev_addr); + if (netdev->addr_len) { + memcpy(sdev->raw_gid, netdev->dev_addr, + min_t(unsigned int, netdev->addr_len, ETH_ALEN)); } else { /* - * This device does not have a HW address, - * but connection mangagement lib expects gid != 0 + * This device does not have a HW address, but + * connection mangagement requires a unique gid. */ - size_t len = min_t(size_t, strlen(base_dev->name), 6); - char addr[6] = { }; - - memcpy(addr, base_dev->name, len); - addrconf_addr_eui48((unsigned char *)&base_dev->node_guid, - addr); + eth_random_addr(sdev->raw_gid); } + addrconf_addr_eui48((u8 *)&base_dev->node_guid, sdev->raw_gid); base_dev->uverbs_cmd_mask |= BIT_ULL(IB_USER_VERBS_CMD_POST_SEND); diff --git a/drivers/infiniband/sw/siw/siw_verbs.c b/drivers/infiniband/sw/siw/siw_verbs.c index 398ec13db624..32b0befd25e2 100644 --- a/drivers/infiniband/sw/siw/siw_verbs.c +++ b/drivers/infiniband/sw/siw/siw_verbs.c @@ -157,7 +157,7 @@ int siw_query_device(struct ib_device *base_dev, struct ib_device_attr *attr, attr->vendor_part_id = sdev->vendor_part_id; addrconf_addr_eui48((u8 *)&attr->sys_image_guid, - sdev->netdev->dev_addr); + sdev->raw_gid); return 0; } @@ -218,7 +218,7 @@ int siw_query_gid(struct ib_device *base_dev, u32 port, int idx, /* subnet_prefix == interface_id == 0; */ memset(gid, 0, sizeof(*gid)); - memcpy(&gid->raw[0], sdev->netdev->dev_addr, 6); + memcpy(gid->raw, sdev->raw_gid, ETH_ALEN); return 0; } From patchwork Mon Jul 17 15:12:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13315881 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12CA7C001B0 for ; Mon, 17 Jul 2023 15:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbjGQPM0 (ORCPT ); Mon, 17 Jul 2023 11:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230359AbjGQPMX (ORCPT ); Mon, 17 Jul 2023 11:12:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BEB1B10E for ; Mon, 17 Jul 2023 08:12:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 57A4860FCA for ; Mon, 17 Jul 2023 15:12:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 562F1C433C8; Mon, 17 Jul 2023 15:12:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689606740; bh=tDBsqL5NlQ8X0YV7ODIeH9tuaa9S3XC9sn5ZSeG6NTQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=m7NqKVogr6EV0RZc1FTRIFHe3jGldFxfxJEsM0qZuN1oPkv3Co8XwU27dh4Wa6/GU Fc1KLnLxU9as80Q5OkX8wZYvimzi+aIpWtnF+Y0K0hnIudny8NGmEiQtcqAGrXPudT +w8V8rVv82kbvWaj1bFKbm0KqPSPG5PUDb744TK9f+yrROGxSY4ZuQRjyM9BId0iaL Lp5+fci4bfeMmmWBDS8pip63cPw5W9/8FKk5ARKOFrH/TFY+4cZfFFvO0+O31J6e18 Uq6evzW8VLx+EVReY592lxNepPuVIyBIYy7SOJmuLCixnuBun/MtcVSCkPDQEOv7u/ mDPksJY7SXy9g== Subject: [PATCH v6 2/4] RDMA/core: Set gid_attr.ndev for iWARP devices From: Chuck Lever To: leon@kernel.org, jgg@nvidia.com Cc: Tom Talpey , Chuck Lever , BMT@zurich.ibm.com, tom@talpey.com, linux-rdma@vger.kernel.org Date: Mon, 17 Jul 2023 11:12:19 -0400 Message-ID: <168960673933.3007.8043081822081877578.stgit@manet.1015granger.net> In-Reply-To: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> References: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chuck Lever Have the iwarp side properly set the ndev in the device's sgid_attrs so that address resolution can treat it more like a RoCE device. Suggested-by: Jason Gunthorpe Reviewed-by: Tom Talpey Signed-off-by: Chuck Lever --- drivers/infiniband/core/cache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 2e91d8879326..33f9d02f9b60 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -1457,6 +1457,17 @@ static int config_non_roce_gid_cache(struct ib_device *device, i); goto err; } + + if (rdma_protocol_iwarp(device, port)) { + struct net_device *ndev; + + ndev = ib_device_get_netdev(device, port); + if (!ndev) + continue; + RCU_INIT_POINTER(gid_attr.ndev, ndev); + dev_put(ndev); + } + gid_attr.index = i; tprops->subnet_prefix = be64_to_cpu(gid_attr.gid.global.subnet_prefix); From patchwork Mon Jul 17 15:12:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13315882 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82806EB64DC for ; Mon, 17 Jul 2023 15:12:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229786AbjGQPMb (ORCPT ); Mon, 17 Jul 2023 11:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbjGQPMa (ORCPT ); Mon, 17 Jul 2023 11:12:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A42710A for ; Mon, 17 Jul 2023 08:12:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ED2A3610E8 for ; Mon, 17 Jul 2023 15:12:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE76DC433C7; Mon, 17 Jul 2023 15:12:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689606747; bh=ULwKLfG+e/NjrddHm8LnJXLUOkgLG9WijKTWJ+/5wDc=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=KZ52jAmPcLZiemVQj/xi7edkeac4oMsP0UUrlS5IXw8TFBj9ZWA/pv6IfSm0A2dXu 2AiHh0GX0EmbLU7s0KcXDPteUdf/+joO5MbhYNj4CSH4NyAUzo5cuvO0dFaSpXMcFN HglgiLUXFjO6IsCGuRnW91g0KE3X3VxwLz/rpviIHuulVmpEtT97FSBmIv13AGmfkx dsnWLQfc0ZsoxicISHyvZ8LRAhLIBKGgKyLGf+2e4tNUe3osYaoLIWZhqa+3Vps/iG 6aW5HDJPhQBV74EVGHCUcrUCx27wR1VMCbnCULbyl8hIzybVIOX12VHTWbkd5fRzk3 jA0VP3oybm0hw== Subject: [PATCH v6 3/4] RDMA/cma: Deduplicate error flow in cma_validate_port() From: Chuck Lever To: leon@kernel.org, jgg@nvidia.com Cc: Chuck Lever , BMT@zurich.ibm.com, tom@talpey.com, linux-rdma@vger.kernel.org Date: Mon, 17 Jul 2023 11:12:25 -0400 Message-ID: <168960674597.3007.6128252077812202526.stgit@manet.1015granger.net> In-Reply-To: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> References: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chuck Lever Clean up to prepare for the addition of new logic. Signed-off-by: Chuck Lever --- drivers/infiniband/core/cma.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 1ee87c3aaeab..da54167723d6 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -686,30 +686,31 @@ cma_validate_port(struct ib_device *device, u32 port, struct rdma_id_private *id_priv) { struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; + const struct ib_gid_attr *sgid_attr = ERR_PTR(-ENODEV); int bound_if_index = dev_addr->bound_dev_if; - const struct ib_gid_attr *sgid_attr; int dev_type = dev_addr->dev_type; struct net_device *ndev = NULL; if (!rdma_dev_access_netns(device, id_priv->id.route.addr.dev_addr.net)) - return ERR_PTR(-ENODEV); + goto out; if ((dev_type == ARPHRD_INFINIBAND) && !rdma_protocol_ib(device, port)) - return ERR_PTR(-ENODEV); + goto out; if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port)) - return ERR_PTR(-ENODEV); + goto out; if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) { ndev = dev_get_by_index(dev_addr->net, bound_if_index); if (!ndev) - return ERR_PTR(-ENODEV); + goto out; } else { gid_type = IB_GID_TYPE_IB; } sgid_attr = rdma_find_gid_by_port(device, gid, gid_type, port, ndev); dev_put(ndev); +out: return sgid_attr; } From patchwork Mon Jul 17 15:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13315883 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C028FC001B0 for ; Mon, 17 Jul 2023 15:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbjGQPMo (ORCPT ); Mon, 17 Jul 2023 11:12:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbjGQPMn (ORCPT ); Mon, 17 Jul 2023 11:12:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33FF4170A for ; Mon, 17 Jul 2023 08:12:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 91C1261128 for ; Mon, 17 Jul 2023 15:12:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BEFFC433C8; Mon, 17 Jul 2023 15:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689606754; bh=b1xQe7gleMwBAdcCBnvil0pAV/6vAdiizVxa5NbIVkM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=cRx3P09U81xLYz97NrkKsIZBpP6eBfLjWMABR1674r3d4S4yxUp/FOylVXHTG3xOM +rXPHd6h7aHTL4IYvMXwZFwj3nHW/VKdo7rEoZJn2fE0intk7KtvEdTQImTfjLHZ88 WTf++G0Nx6S/9t/zdiaIRYASjG4tMJ+PIfr0fa4c2fvvs75LB1Y5c/irLNjP8bDh0K hDkxNyIXbZNSJ3SPoBu7sNELMWZjIRk/CbJhvRjokj2KuCmDITvdcjZfBuE4rn6i8M Wz5i+yu7RqunCUjyVAJTbapD5SttbKIJkLZy2sWxy3PPa1sJpJlyITDXm1Vn2BQK4B Zs3Ngx5ESh5YA== Subject: [PATCH v6 4/4] RDMA/cma: Avoid GID lookups on iWARP devices From: Chuck Lever To: leon@kernel.org, jgg@nvidia.com Cc: Chuck Lever , BMT@zurich.ibm.com, tom@talpey.com, linux-rdma@vger.kernel.org Date: Mon, 17 Jul 2023 11:12:32 -0400 Message-ID: <168960675257.3007.4737911174148394395.stgit@manet.1015granger.net> In-Reply-To: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> References: <168960662017.3007.17697555924773191374.stgit@manet.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org From: Chuck Lever 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 -- no GID is necessary. addr_handler() just has to do the right thing with it. Suggested-by: Jason Gunthorpe Signed-off-by: Chuck Lever --- drivers/infiniband/core/cma.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index da54167723d6..8bd6cb867381 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -700,6 +700,27 @@ cma_validate_port(struct ib_device *device, u32 port, if ((dev_type != ARPHRD_INFINIBAND) && rdma_protocol_ib(device, port)) goto out; + /* + * For drivers that do not associate more than one net device with + * their gid tables, such as iWARP drivers, it is sufficient to + * return the first table entry. + * + * Other driver classes might be included in the future. + */ + if (rdma_protocol_iwarp(device, port)) { + sgid_attr = rdma_get_gid_attr(device, port, 0); + if (IS_ERR(sgid_attr)) + goto out; + + rcu_read_lock(); + ndev = rcu_dereference(sgid_attr->ndev); + if (!net_eq(dev_net(ndev), dev_addr->net) || + ndev->ifindex != bound_if_index) + sgid_attr = ERR_PTR(-ENODEV); + rcu_read_unlock(); + goto out; + } + if (dev_type == ARPHRD_ETHER && rdma_protocol_roce(device, port)) { ndev = dev_get_by_index(dev_addr->net, bound_if_index); if (!ndev)