[PATCH v3 08/20] nvme-tcp-offload: Add IO level implementation
Or Gerlitz
gerlitz.or at gmail.com
Mon Jun 28 00:10:36 PDT 2021
On Thu, Jun 24, 2021 at 8:41 PM Shai Malin <smalin at marvell.com> wrote:
>
> From: Dean Balandin <dbalandin at marvell.com>
> In this patch, we present the IO level functionality.
[..]
> +static void nvme_tcp_ofld_set_sg_null(struct nvme_command *c)
> +{
> + struct nvme_sgl_desc *sg = &c->common.dptr.sgl;
> + sg->addr = 0;
ok
> + sg->length = 0;
> + sg->type = (NVME_TRANSPORT_SGL_DATA_DESC << 4) |
> + NVME_SGL_FMT_TRANSPORT_A;
> +inline void nvme_tcp_ofld_set_sg_inline(struct nvme_tcp_ofld_queue *queue,
> + struct nvme_command *c, u32 data_len)
> +{
> + struct nvme_sgl_desc *sg = &c->common.dptr.sgl;
> + sg->addr = cpu_to_le64(queue->ctrl->nctrl.icdoff);
ok, what about dma mapping of the address?
> + sg->length = cpu_to_le32(data_len);
> + sg->type = (NVME_SGL_FMT_DATA_DESC << 4) | NVME_SGL_FMT_OFFSET;
> +static void nvme_tcp_ofld_map_data(struct nvme_command *c, u32 data_len)
> +{
> + struct nvme_sgl_desc *sg = &c->common.dptr.sgl;
> +
> + sg->addr = 0;
???
> + sg->length = cpu_to_le32(data_len);
> + sg->type = (NVME_TRANSPORT_SGL_DATA_DESC << 4) |
> + NVME_SGL_FMT_TRANSPORT_A;
More information about the Linux-nvme
mailing list