From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (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 1FAA235E92B for ; Wed, 1 Apr 2026 17:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775065411; cv=none; b=oU0MCx6zqohcWuEcfv4dUyEO0k3ZZqlEUKzHbaBe+/AQ1YWVbNWyppr0bnKLJ1T8Pk3WHi9c0pj6IZI3tQTXfJnNOqL/5D81jmS1FDj5Dxo/ARBdY26EQ1qGZC8C63PWyTYzVhZtPkwgBNGk87jxocerM/PJZ/qUAqE2gQhZJtI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775065411; c=relaxed/simple; bh=e3CRoJffDelcNgBLLlUtD6WhhBUG5M2GmDFzS5vKChE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nanOA4bt8lF4N36nDcAU+3+HmEBLBkurp9FKjhLjYXs/4SSElpuAmKvt8uRTHErouZ4PFeIt6oS99KxqjQMKRHMVmT05XKcWuAIiFY7YojHOgGboCmDZeNq9M2dxqQFRjp93s18Pn5AAqtWp7Rvsp1y/JYv0zXGH0TqMcn37+Dk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=ecUw8mHL; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="ecUw8mHL" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2b0c12be0ecso14745ad.0 for ; Wed, 01 Apr 2026 10:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1775065409; x=1775670209; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Ay3iF+IOIXyQ8Y5GyamWOg2dop1zP3uPJAWOZ58oQh4=; b=ecUw8mHLZJ/xKhBi7Y/TumFZgnACNDjYGqlu394B1yh4xUgyKmsIM4UE4iFSGDFdGc cy+X3iuSYC6FL7wgeLAlJeMwkHWgNp8JcrAvqIAqm6sWbpLBS9ePfCJ3zF5PIPmELI2H Z4ndQyxISOGr4Rd6f9bB366lxBPRpTD4Z+8DiwRDBuLwp+6XiUlf86kwM6qy+CJpZyPw Ic8xHeAnSvPAcn22UH5K0KuU3gTB3SkEHTy5dSLqfBx0Lg//eWAm1fOQErjCTKl4nA1n p6no8N8X2RLAsz6DEH0kNdSzJsK4xUAZ6/tp6AaEDOBAWDVMR09fVe+U/Kvigc7ZxOj9 9uLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775065409; x=1775670209; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ay3iF+IOIXyQ8Y5GyamWOg2dop1zP3uPJAWOZ58oQh4=; b=Y36WNoPLtSY1JkS6DKMi0zqdCcGlxd2JEjLlfBvEDm1rpgE7UEoEZeo4t9D6X4T6eN 7o5UXLI/UJqFEFk+MrQKTBfs1E/JqP2k38bT1ltjWZYdtgCBBOBT47t451ptdRLPTEqh Nyt1Laeq8GimnS6p1Xo+c3QRapdweWGHCJF9QxI49sTxfqLAIkDEp5sNHLFGNnfEGZaI eFKcKhtTbT/vWR+eyL7nPyejDR1UUrWuBFOYDMQ6+M5N9wdaet5gr6Yg4/Pj0CrlF4en nmExrYuVbQdjHr5mHxqycuhICCXmrPTHcbwevPf/ImnKkty6M3sRhcLWl6LTB25hn7/c 0Vag== X-Forwarded-Encrypted: i=1; AJvYcCXDUlV5blSwf2UunjLG9NdQPtjOJiSi0fys7sXJecsvCQd+vRUFBldZ7oDkn9Thkiux0lTHBaCBZ+aSHK8=@vger.kernel.org X-Gm-Message-State: AOJu0Yz2K8gKiQ7pQV6SBuYcwPqRfM4pRrUc6Tyc3P3emiU9Aw4TNadq eREXM+ObKbL0GmC/axDZ70XB65cacLX8D5DLpJDDZFS2g0cloWaWliAw9UUGhFhUHcB0XAm9jwu 4Adobdw== X-Gm-Gg: ATEYQzz9xEiIJrucPjW7m+2EjzpcZKvxFPBoMj3jQsS1npKVbOFyf7Zf3Frox1XYn8e rbUlFVl8mkz61q3vjTN4zmIKnwmyORJsSo92ZKtLW62M/daZ6KGxoKX7UGqoPCd6+93yGrKn4sc x085jWgvM6iI8H8VVY+LRg45ikh+MIBqXbYfGSg6inUzZi93ihT+RuUbIXE27T27F7Wm8/q0vZ9 jhmNwcLVPkd5OEWOiBOZpr2GAGPoXx3kGvrAPApgCF1yvrK75p3Nqj9UWQLQzfSz9Cw4Skqofac x7/zRJ3j/5+4f9UabIioCwBdhv7S4W7SIN4QkQ48ChCoCj+S8626g3sc7Mdx1OIWbNCnI15qCw/ WVA+mOEKXjfnAxCW/NNoo/SfPUYCC7Zi7cbtNlG0PwQ7E+qtN4rvegDL2TN1J7prNJDL/4qKRc4 9y3428WSNThHR33hfHXrrJxK7fWlYJ+1sdauJYqSZmjvWJD2x2wMnWTlmMEw== X-Received: by 2002:a17:903:285:b0:2b0:b0c9:96e2 with SMTP id d9443c01a7336-2b27610acd4mr80455ad.21.1775065408798; Wed, 01 Apr 2026 10:43:28 -0700 (PDT) Received: from google.com (10.129.124.34.bc.googleusercontent.com. [34.124.129.10]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b2749a1e9csm3922085ad.55.2026.04.01.10.43.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 10:43:27 -0700 (PDT) Date: Wed, 1 Apr 2026 17:43:22 +0000 From: Pranjal Shrivastava To: Christoph Hellwig Cc: Shivaji Kant , kbusch@kernel.org, axboe@kernel.dk, sagi@grimberg.me, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] nvme: enable PCI P2PDMA support for RDMA transport Message-ID: References: <20260401103441.1229964-1-shivajikant@google.com> <20260401141706.GA22165@lst.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260401141706.GA22165@lst.de> On Wed, Apr 01, 2026 at 04:17:06PM +0200, Christoph Hellwig wrote: > On Wed, Apr 01, 2026 at 10:34:41AM +0000, Shivaji Kant wrote: > > Enable BLK_FEAT_PCI_P2PDMA on the NVMe when the underlying > > RDMA controller supports it. > > > > blk_stack_limits() currently filters out this feature bit because it is > > absent from BLK_FEAT_INHERIT_MASK. Manually re-assert the capability > > in nvme_update_ns_info() after the stacking operation. > > This is really two different features/fixes and should be two patches. > Note that Chaitanya also has an outstanding patch about p2p on multipath, > so please work with him. > Ack. Shivaji, I believe this [1] is the patch Christoph's referring to. > > Hardware reachability remains enforced by late-stage distance checks > > during DMA mapping. > > I don't know what this is supposed to mean. Callers need to check the > reachability first before submitting P2P I/O. > > > +static bool nvme_rdma_supports_pci_p2pdma(struct nvme_ctrl *ctrl) > > +{ > > + struct nvme_rdma_ctrl *r_ctrl = to_rdma_ctrl(ctrl); > > + bool supported = false; > > + > > + if (r_ctrl && r_ctrl->device) > > to_rdma_ctrl is a wrapper around container_of, so r_ctrl can't be > NULL for a non-NULL ctrl. ->device also should not NULL because it > is set up before namespaces are probed. > > > + supported = ib_dma_pci_p2p_dma_supported(r_ctrl->device->dev); > > + > > + dev_dbg(ctrl->device, "PCI P2PDMA support result: %s\n", > > + supported ? "PASSED" : "FAILED (HW/Driver restriction)"); > > Overly long line, and screaming isn't really something we do in our > messages. We also don't do that debug message in PCI, so please just > drop it. IF you think this is important enough add a tracepoint in the > core code in a separate patch. > +1, we should drop the log and add a TP if necessary. Thanks, Praan [1] https://lore.kernel.org/all/20260323234416.46944-3-kch@nvidia.com/