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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>+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.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux