[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aTFpsl3o7IoJ_xPg@infradead.org>
Date: Thu, 4 Dec 2025 03:00:02 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Pavel Begunkov <asml.silence@...il.com>
Cc: linux-block@...r.kernel.org, io-uring@...r.kernel.org,
Vishal Verma <vishal1.verma@...el.com>, tushar.gohad@...el.com,
Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...nel.dk>,
Christoph Hellwig <hch@....de>, Sagi Grimberg <sagi@...mberg.me>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Sumit Semwal <sumit.semwal@...aro.org>,
Christian König <christian.koenig@....com>,
linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
linux-fsdevel@...r.kernel.org, linux-media@...r.kernel.org,
dri-devel@...ts.freedesktop.org, linaro-mm-sig@...ts.linaro.org
Subject: Re: [RFC v2 06/11] nvme-pci: add support for dmabuf reggistration
Splitting this trivial stub from the substantial parts in the next patch
feels odd. Please merge them.
(and better commit logs and comments really would be useful for others
to understand what you've done).
> +const struct dma_buf_attach_ops nvme_dmabuf_importer_ops = {
> + .move_notify = nvme_dmabuf_move_notify,
> + .allow_peer2peer = true,
> +};
Tab-align the =, please.
> +static int nvme_init_dma_token(struct request_queue *q,
> + struct blk_mq_dma_token *token)
> +{
> + struct dma_buf_attachment *attach;
> + struct nvme_ns *ns = q->queuedata;
> + struct nvme_dev *dev = to_nvme_dev(ns->ctrl);
> + struct dma_buf *dmabuf = token->dmabuf;
> +
> + if (dmabuf->size % NVME_CTRL_PAGE_SIZE)
> + return -EINVAL;
Why do you care about alignment to the controller page size?
> + for_each_sgtable_dma_sg(sgt, sg, tmp) {
> + dma_addr_t dma = sg_dma_address(sg);
> + unsigned long sg_len = sg_dma_len(sg);
> +
> + while (sg_len) {
> + dma_list[i++] = dma;
> + dma += NVME_CTRL_PAGE_SIZE;
> + sg_len -= NVME_CTRL_PAGE_SIZE;
> + }
> + }
Why does this build controller pages sized chunks?
Powered by blists - more mailing lists