Article View: linux.kernel.netdev
Article #22514Re: [PATCH rdma-next 00/11] RDMA/mlx5: Preparation for SD support
From: Leon Romanovsky
Date: Wed, 25 Nov 2026 13:29
Date: Wed, 25 Nov 2026 13:29
54 lines
10402 bytes
10402 bytes
On Tue, Nov 17, 2026 at 04:01:11PM +0200, Edward Srouji wrote: > This series prepares mlx5_ib for Socket Direct (SD), where one IB device > spans several core devices, one per PCIe function. Today the driver > assumes a single core device per IB device and reaches it through > dev->mdev all over the code. > > Instead, each call site now finds its core device through the resource > it works on: QPs, SRQs, AHs and MWs through their PD, and DEVX objects, > UARs and mmaps through their ucontext. A CQ and an MR store the core > device they were created on, since they cannot always reach their owner > when they need it. The SD series can then change where a resource lives > in the resolvers, without touching the call sites. > > The resolvers follow one naming scheme: <resource>_to_mdev() returns a > core device and <resource>_to_dev() an IB device. Where several resource > types are accepted, a _Generic() dispatches to per-type helpers, which > are prefixed with '__' and are not meant to be called directly. > > State kept once per IB device, such as the ODP page-fault EQ, delay drop > and local loopback, stays on dev->mdev. The SD series decides how each > of them works across core devices. > > This series only changes how each call site finds its core device. With > one core device per IB device every resolver returns dev->mdev, so the > behaviour is unchanged. Pre-existing issues in the touched code are > intentionally left alone so that each patch stays a mechanical > conversion. > > Patches 1-2: name device pointers consistently, dev for the IB device > and mdev for the core device. > Patches 3-7: resolve the core device through the PD. > Patches 8-11: resolve the core device through the ucontext, and keep it > on the CQ. > > Signed-off-by: Edward Srouji <edwards@nvidia.com> > --- > Akiva Goldberger (11): > RDMA/mlx5: Enforce dev/mdev naming for device pointers > RDMA/mlx5: Rename to_mdev() helpers that return an IB device > RDMA/mlx5: Select the PD and SRQ core device through the PD > RDMA/mlx5: Select the core device through PD for QP commands > RDMA/mlx5: Cache the MR core device and resolve the MW's via its PD > RDMA/mlx5: Select the AH core device through their PD > RDMA/mlx5: Select the QP core device through its PD > RDMA/mlx5: Resolve core device from ucontext for DEVX resources > RDMA/mlx5: Cache the CQ core device and resolve it via cq_to_mdev() > RDMA/mlx5: Resolve the bfreg UAR-index core device from the ucontext > RDMA/mlx5: Resolve UAR and mmap core devices via the ucontext This series does not apply cleanly to my wip/leon-for-next branch. Please rebase and resend. Thanks
Technical Details
Message-ID:
<20261125132927.GC14811@unreal>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371341-linux-kernel-netdev=dewy.ruReferences:
<20261117-mlx5-sd-prep-v1-0-8efd124c7895@nvidia.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news-wdc.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371341-linux-kernel-netdev=dewy.ru From: leon@kernel.org (Leon Romanovsky) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH rdma-next 00/11] RDMA/mlx5: Preparation for SD support Date: Wed, 25 Nov 2026 15:29:27 +0200 Organization: Usenet Network Message-ID: <20261125132927.GC14811@unreal> References: <20261117-mlx5-sd-prep-v1-0-8efd124c7895@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="215686"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:+iAQ2a/o5HOJAFpW2R/XTejjuIk= sha256:VVcW4J+sCRzM+nRmBPv84fzFSDQqLlzJU3kXv7G7RRI= sha1:Dy9SVwyhp0pneqDMyN7E33VVXak= sha256:Gaj8cZbHK4Fi452LzNAcMTf/pmBFIKIdDVU85np8eoY= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 822A4125E6A; Wed, 25 Nov 2026 16:29:53 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.401 X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SJ0nsOWWMP5e; Wed, 25 Nov 2026 16:29:49 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-371341-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 329AC125E69; Wed, 25 Nov 2026 16:29:39 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id E7AD525E78; Wed, 25 Nov 2026 13:29:35 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795613373; b=GcaWSc9vXUd6Bx1INlZWpIbo/cRpKzUYTQBBg0TGNkMyPVgH4wM0KC5SfQtYZ5+l1E1u PvxcrKV3QB0j6V/ULHfcLn/ers+xp8S1/awOj9P4bu3QPAB1FTY21axx+OKjMbhhJqIZh hH8ogvkAlHBTdr4ksGEPpGotafVzBq1kU1EOqXljzZ+WEzZlX9RuZ5OHLXPU4d6m+Xw71 XmRoDbSRJUc0Z6zBAz7xF+siTq9RzGzi+4wCibKSvhWnbBN8uxgSthSqoGMtM0abV+y1c E4+QF7uSG1WC6beEQLbOyboKHBpUs1Ninh4Whb/FGgvll1Y/WYld8pTGs5XEx6MUDNA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795613373; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=MREAmVsMpWt0d6LopvXMCJWqj3NJInfKcqd/wmSDof0=; b=mj2UFbhdb7jt2c9TBkQ0huHqgMW6YsrDt0DDDsmIKE+fvuypisTFCyk5C33g+Ja5CUpp MOR9PONe32kr03x6Au9q/QwVSMQCy94RvybhfljG86Y7aoZNYPixU3U7LHlYI+ocT+vdT ApVOnpOwO17Zpwa8bcMYHHuLQXIpAUKLvW8HMVL3jvCyRUoY9D2VHdJ5jpi3Z/OKYh4Vm dEBSidt1VmancvciBhlWOgrPX83MRC5RekBLiux6RGgMM+0w+w5aEe8qrNjnKlhKqDwHA eZe9n8k+FxIRPr9q5cCE9D1zqqs8F81MuR9yLQYsL+pprT1faTlgy73Y6PmLFEkRlGA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hyVxURu3; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF1F3606A336; Wed, 25 Nov 2026 13:29:33 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hyVxURu3 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795613372; b=RSG7pWIDed//fMtm+6M36VXcqk9zGiOaAhoePV7MQqHWWq+eLtefP18U8vb4ejh+GB/H kCxIYscR+fSj89Xaain66LB0gF0Y/ZmzwFFHIF5+x1Hx1UWpUgM/VfZ43EcEQsz/6PO0m kHjSeNOHHBhhQP3RICB4sgvu7Nc043Y6PDLxqGU+fNptGJV4+yJobtw6MbjGimDl60TdW TVPZcn+HUnY0uBKauL9gxkTVGTNaJtbXj0T0g8atr7d71q1tJJVZTTpiq/nSCAUg7Us8E ut06ipHKmn/3wUMhYD2iXE85OKdu0JVfr+6fhFgcFi+JyZVfaDQtxCMHt2qF8/BsyWg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795613372; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=MREAmVsMpWt0d6LopvXMCJWqj3NJInfKcqd/wmSDof0=; b=rziL2IdtCzCFPU6oZr4DU0H1/danrbXZZGwZ+phJV3miVukCFdsrE+S1UKiq2ZPQHJ8E oERMOJR2+5Utc7wbSX6TcvQKLyqSLoVDioo6/q8crgzBriRBdYDPoDeyfEk/maAOxDoWF 9Ohl2EYtl64h0gZQa964yUz4IFwTLTNlBw49tXG0sw2QGwr4QXO1EXz+g3XIydG9xPDUS zrOCziDK2eMA8/YoLMzWom4uIdOYB11sU0BEmts5CqYna3ZVyJaF4KxcQDclXjbhSUFH/ anB0ltwa234/C0kUSymHVVipddzLi3/eIiqXxRwggRl/BkTJ1xK/Dg400cT7uFgjrJA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=hyVxURu3; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33602606A31E; Wed, 25 Nov 2026 13:29:31 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD1421F000C0; Wed, 25 Nov 2026 13:29:30 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795613371; bh=MREAmVsMpWt0d6LopvXMCJWqj3NJInfKcqd/wmSDof0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=hyVxURu3lneGuZKQdqMCK/A5/My4c7nH5bD2d8wlcPkZIZSgVQtrtM275+bi0HGhb o0DI3jOfRueuBL74Cof3fpZ1TIuJ4qi6f6XuERff1HLWPBHn8c1LycSh9xxWgH2Ps7 InPNhR6in5KySLL10j1EuoyKRZDWagFGY2Zf6211g6Q7xJM7U+JVJ4Sy/n/rN0uUsi XwjCnmTCUXd4UkotGCckPpozYFE0whNY+JJuJ0xD5N2KOR6sZhLOheizy6MkdXrb1W GZSzcY3Ri3+YNTg08Lo56k70v61w1Q/UYL5K80NAsC5JWWbfMVcvHNoLmhU0uZ9CzB ODSxh17BE7xdw== X-Cc: Jason Gunthorpe <jgg@ziepe.ca>, Sabrina Dubroca <sd@queasysnail.net>, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Akiva Goldberger <agoldberger@nvidia.com>, Michael Gur <michaelgur@nvidia.com> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261117-mlx5-sd-prep-v1-0-8efd124c7895@nvidia.com>