Commit 74c6c715 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Jens Axboe

nvme: don't send keep-alives to the discovery controller

NVMe over Fabrics 1.0 Section 5.2 "Discovery Controller Properties and
Command Support" Figure 31 "Discovery Controller – Admin Commands"
explicitly listst all commands but "Get Log Page" and "Identify" as
reserved, but NetApp report the Linux host is sending Keep Alive
commands to the discovery controller, which is a violation of the
Spec.

We're already checking for discovery controllers when configuring the
keep alive timeout but when creating a discovery controller we're not
hard wiring the keep alive timeout to 0 and thus remain on
NVME_DEFAULT_KATO for the discovery controller.

This can be easily remproduced when issuing a direct connect to the
discovery susbsystem using:
'nvme connect [...] --nqn=nqn.2014-08.org.nvmexpress.discovery'
Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Fixes: 07bfcd09 ("nvme-fabrics: add a generic NVMe over Fabrics library")
Reported-by: default avatarMartin George <marting@netapp.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 00b683db
...@@ -608,8 +608,10 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts, ...@@ -608,8 +608,10 @@ static int nvmf_parse_options(struct nvmf_ctrl_options *opts,
opts->discovery_nqn = opts->discovery_nqn =
!(strcmp(opts->subsysnqn, !(strcmp(opts->subsysnqn,
NVME_DISC_SUBSYS_NAME)); NVME_DISC_SUBSYS_NAME));
if (opts->discovery_nqn) if (opts->discovery_nqn) {
opts->kato = 0;
opts->nr_io_queues = 0; opts->nr_io_queues = 0;
}
break; break;
case NVMF_OPT_TRADDR: case NVMF_OPT_TRADDR:
p = match_strdup(args); p = match_strdup(args);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment