Thread (37 messages) 37 messages, 6 authors, 2018-11-21

RE: [PATCH v2 14/14] nvme-tcp: add NVMe over TCP host driver

From: Ethan Weidman <hidden>
Date: 2018-11-21 00:41:08
Also in: linux-block, linux-nvme

+static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
+               struct nvmf_ctrl_options *opts)
+{
+       struct nvme_tcp_ctrl *ctrl;
+       int ret;
+
+       ctrl = kzalloc(sizeof(*ctrl), GFP_KERNEL);
+       if (!ctrl)
+               return ERR_PTR(-ENOMEM);
+
+       INIT_LIST_HEAD(&ctrl->list);
+       ctrl->ctrl.opts = opts;
+       ctrl->ctrl.queue_count = opts->nr_io_queues + 1; /* +1 for admin queue */
+       ctrl->ctrl.sqsize = opts->queue_size - 1;
+       ctrl->ctrl.kato = opts->kato;
+
+       INIT_DELAYED_WORK(&ctrl->ctrl.connect_work,
+                       nvme_tcp_reconnect_ctrl_work);
+       INIT_WORK(&ctrl->ctrl.err_work, nvme_tcp_error_recovery_work);
+       INIT_WORK(&ctrl->ctrl.reset_work, nvme_reset_ctrl_work);
+
+       if (!(opts->mask & NVMF_OPT_TRSVCID)) {
+               opts->trsvcid =
+                       kstrdup(__stringify(NVME_TCP_DISC_PORT), GFP_KERNEL);
+               if (!opts->trsvcid) {
+                       ret = -ENOMEM;
+                       goto out_free_ctrl;
+               }
+               opts->mask |= NVMF_OPT_TRSVCID;
+       }
NVME_TCP_DISC_PORT, 8009, should not be the default for nvme fabric connections when trsvcid is not specified.

NVME_RDMA_IP_PORT, 4420, should be used, or renamed to something more generic.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help