Thread (27 messages) 27 messages, 4 authors, 2021-07-05

Re: [PATCH v3 08/20] nvme-tcp-offload: Add IO level implementation

From: Or Gerlitz <hidden>
Date: 2021-06-28 07:11:33

On Thu, Jun 24, 2021 at 8:41 PM Shai Malin [off-list ref] wrote:
From: Dean Balandin <redacted>
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;
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help