Netdev List
 help / color / mirror / Atom feed
From: Erfan Sharafzadeh <erfansh@meta.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <edumazet@kernel.org>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <horms@kernel.org>, <almasrymina@google.com>,
	<kaiyuanz@google.com>, <willemb@google.com>,
	<asml.silence@gmail.com>, <sdf@fomichev.me>,
	<bobbyeshleman@meta.com>
Subject: Re: [PATCH net] net: devmem: allow peer-to-peer dma-buf attach for bindings
Date: Tue, 13 Oct 2026 14:18:54 -0700	[thread overview]
Message-ID: <20261013211854.2297826-1-erfansh@meta.com> (raw)
In-Reply-To: <20261012170754.669462-1-erfansh@meta.com>

Replying to the Sashiko AI review of this patch. Three of the five
points are addressed in v2, which targets net-next:
https://lore.kernel.org/netdev/20261013210954.2170175-1-erfansh@meta.com/

1. Fixes: tag on an enhancement

Agreed. The static attach is correct under the dma-buf contract, and
the patch relies on 575157b1b5fc and 609fc8766d68, so it must not go to
stable. v2 drops the Fixes: tag and targets net-next.

2. "fall back as before"

Agreed, that was too broad. With an exporter that pins in a single
placement, a later attachment that cannot do P2P can fail to pin a
buffer that a P2P binding has already pinned in device memory, as with
pinned RDMA umem. v2 states this limit in the commit message.

3. Uninterruptible fence wait

Agreed. v2 waits interruptibly, as dma_buf_map_attachment() does for
static attachments.

4. dma_buf_pin() on every bind of a userspace-supplied dma-buf

Bindings were already pinned for their lifetime before this patch:
dma_buf_map_attachment() pins static attachments through
dma_buf_pin_on_map() and unpins them at unmap. The patch keeps the same
lifetime and only lets the exporter choose device memory. The amount is
bounded by what the user can allocate from the exporter in the first
place, and it is the same model as pinned RDMA umem. Whether BIND_TX
should require CAP_NET_ADMIN, as BIND_RX does, is a separate,
pre-existing question.

5. P2P bus addresses and no revocation

The binding is non-revocable, like ib_umem_dmabuf_attach_pinned_ops.
Devmem has no way to tear down a live binding today, since page_pool
and in-flight skbs hold references to it. Supporting revocable
bindings would be a separate change; v2 notes the limit in the commit
message.

pw-bot: cr

      parent reply	other threads:[~2026-10-13 21:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 17:07 [PATCH net] net: devmem: allow peer-to-peer dma-buf attach for bindings Erfan Sharafzadeh
2026-10-13 17:11 ` netdev-bot+sashiko
2026-10-13 21:18 ` Erfan Sharafzadeh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261013211854.2297826-1-erfansh@meta.com \
    --to=erfansh@meta.com \
    --cc=almasrymina@google.com \
    --cc=asml.silence@gmail.com \
    --cc=bobbyeshleman@meta.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kaiyuanz@google.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox