From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr2-f2.google.com (mail-wr2-f2.google.com [74.125.225.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 320443CC7CD for ; Sat, 18 Jul 2026 14:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.66 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784385756; cv=none; b=VCh1QfqECxyO0MbET7AQAVhIprvfyF87LhiiacMPbeXe4JlWTB6rQl7Pauu6lejqeNkxrn74xma0gNQBnTvsAMpfzKwsJxTu1Gj4ETqYUVHXQy12ldtp+zl5s1u9H8s3thxLWbreun9V/96EpiouBgtqkQOBl4WlPwfn4pdZJ7Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784385756; c=relaxed/simple; bh=Gec7Y40LrmfBcnCc7AUSx/MFDR5ApUHWGPxvi9+X3KQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PTuSk/Ys63eH5oAY4iEuSaFZP7BLfhSAcDMugKTYBR5/8AWrHRf0JL7Pv7Qv2aq8lJp8RC9cEAZu27bWtzfqflpry/GxTBsC3F5CpQPQGGZ0q3CJWrdg9lRbaXjmwtmOuqt1sdRRacgoEwBMh8arxlPZrC6vKrYUe4YAVe3tBgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AtO3jPrR; arc=none smtp.client-ip=74.125.225.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AtO3jPrR" Received: by mail-wr2-f2.google.com with SMTP id ffacd0b85a97d-472365266f5so4191458f8f.1 for ; Sat, 18 Jul 2026 07:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784385752; x=1784990552; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=2yx8a34b5Emf6vrj/2nayvymgX9i9Fh5C1RmvOWAaK4=; b=AtO3jPrRdVlqMb4BL41wXyG55XzyvdzG55MKFexGGvgHfnZmMhJD8WFsPmSjmyReSW NgJXpNvSGkiwA1IzaA8+He1lHt2ME3SRL3obKQiqp+SRwSZ74yoclahy5NyAmgDw9kSX M49mth1TGpUQdeUkdXB9Sm8W4Y0R/n+1XaJndR60ZJKcBN6+ND3gqoi0gG/f5hfR6VVJ CBPmthJTRRLbnuoS+K/pw1BtQMw0Az74mC8mGwGgABz6eqfa+UscnxNSa1D5bnNXiev+ hfnDkuQQvH2eS9hyIZazgQJ7J9AtjoZQkT7PWIwCju/eXCC0jBMKoGP9l80A8M8dJclY vYWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784385752; x=1784990552; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=2yx8a34b5Emf6vrj/2nayvymgX9i9Fh5C1RmvOWAaK4=; b=S4gixUhRp+x18lO6jrd7nkseSP1byk0qaPO+bAZSOOi0AJhqoxNB7TVdUSaAbSwafu PsusLqn3z2kKcNDbZTVgn6vRZiluSgow1oTohqJ5BSI0HwoNIgMC5+baWkwlUUBlOGOK pghZS/FwtNIYAwBVM48ZI2UwFepdHzHHlx+e9ObRRnLfuXjkCcaIoV7XRzrcQR0ps3gD tHZmlJ+Y7IAjbMzto3ya9muwMcnNt0Uo4uuIKickdOM4LCruLLaDgaHy4X/y+T9OaQG0 4a8heVjMYTZZ4vGrFSwIJy0omjcAy8MsOcrH7L9XCdZLiNkErlJff1jsKVkkbtIWBdfK VnoA== X-Forwarded-Encrypted: i=1; AHgh+RpwBMKxcbzGT/w8NmPumCcYeF4wzO/0P/SUn4Qp3R4pMUNYjRLAoHLPAHwDp+8OafKeIwP3THOuoxxbFCM=@vger.kernel.org X-Gm-Message-State: AOJu0YwVNRghWIdsiohf/OiZ+vNEMJFl5CAHGURWMQDMnNbWLRfjCUyH 107+QBWQv5Ofhcr8GV4dHgZrBE4Dh/CBbY6RZvNgrdfGH8DVIG7UdRUH X-Gm-Gg: AfdE7cnZdQ/2zi1efmazpbZPSh/KUvDCDFcMy1PwROnH58jv1z42EITi+KFCFhh4pCv Xu3VTtFSuqeqk+W9doyyCq8IJv6eE6wJ9U8JP4bRpSwUnRv9M0XAqViPvF0YJcowejf9b+JMRqP sUwXIXANB0iBb6igGyXjE7sVEDXfXkdQc90fx6hancg6F0vKLcL1KXh6LP6+CM6iW1TyYcJDkUd +GxLrGJq+03rt7hFrpxvFWzTf7WZIgboMYEod/vBtFReQf8mpvNlDHVsyVs2xMmGbs+t3AyicnJ sUDk4+1Xz6TZ/dD2CmwHg9lD7VbYeWyBtpyouUZiSS0AsqIJEzUES4Bszsm5VmP2Ka+VJtuHlms zzPy5bAyvpucQyIErXrwGX447E5nmZDLY8YLl9+1EDNefH9S3WgjBElOaDJLPgL1v0GpTbtok+m tg X-Received: by 2002:a05:6000:1882:b0:47f:5c33:5eb9 with SMTP id ffacd0b85a97d-47f6233c20amr7922807f8f.52.1784385752070; Sat, 18 Jul 2026 07:42:32 -0700 (PDT) Received: from fedora ([212.253.209.56]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47f63e51c33sm11394317f8f.12.2026.07.18.07.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2026 07:42:31 -0700 (PDT) From: Serhat Kumral To: Jason Gunthorpe , Leon Romanovsky , Zhu Yanjun Cc: Zhu Yanjun , David Ahern , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, syzbot+8c9eede336e3a843750e@syzkaller.appspotmail.com, Serhat Kumral Subject: [RFC PATCH 2/2] RDMA/nldev: remove the unused dellink link op Date: Sat, 18 Jul 2026 17:26:42 +0300 Message-ID: <20260718142642.102924-2-serhatkumral1@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260718142642.102924-1-serhatkumral1@gmail.com> References: <20260718142642.102924-1-serhatkumral1@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit rxe was the only driver implementing rdma_link_ops.dellink and does not need it anymore now that its UDP tunnel sockets follow the GID table. Remove the callback, the nldev code invoking it, the mutex that serialized it and the now unused ib_device::link_ops field the invocation looked it up through. Assisted-by: Claude:claude-fable-5 Signed-off-by: Serhat Kumral --- drivers/infiniband/core/nldev.c | 15 --------------- include/rdma/ib_verbs.h | 2 -- include/rdma/rdma_netlink.h | 1 - 3 files changed, 18 deletions(-) diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c index f599c24b34e8..0d1e749d78e1 100644 --- a/drivers/infiniband/core/nldev.c +++ b/drivers/infiniband/core/nldev.c @@ -51,7 +51,6 @@ * a controlled QKEY. */ static bool privileged_qkey; -static DEFINE_MUTEX(nldev_dellink_mutex); typedef int (*res_fill_func_t)(struct sk_buff*, bool, struct rdma_restrack_entry*, uint32_t); @@ -1866,20 +1865,6 @@ static int nldev_dellink(struct sk_buff *skb, struct nlmsghdr *nlh, return -EINVAL; } - /* - * This path is triggered by the 'rdma link delete' administrative command. - * For Soft-RoCE (RXE), we ensure that transport sockets are closed here. - * Note: iWARP driver does not implement .dellink, so this logic is - * implicitly scoped to the driver supporting dynamic link deletion like RXE. - */ - if (device->link_ops && device->link_ops->dellink) { - mutex_lock(&nldev_dellink_mutex); - err = device->link_ops->dellink(device); - mutex_unlock(&nldev_dellink_mutex); - if (err) - return err; - } - ib_unregister_device_and_put(device); return 0; } diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 794746de8db0..620f00f5d026 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -2984,8 +2984,6 @@ struct ib_device { struct completion unreg_completion; struct work_struct unregistration_work; - const struct rdma_link_ops *link_ops; - /* Protects compat_devs xarray modifications */ struct mutex compat_devs_mutex; /* Maintains compat devices for each net namespace */ diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h index 2fd1358ea57d..d1a7186f7436 100644 --- a/include/rdma/rdma_netlink.h +++ b/include/rdma/rdma_netlink.h @@ -127,7 +127,6 @@ struct rdma_link_ops { struct list_head list; const char *type; int (*newlink)(const char *ibdev_name, struct net_device *ndev); - int (*dellink)(struct ib_device *dev); }; void rdma_link_register(struct rdma_link_ops *ops); -- 2.54.0