]> www.infradead.org Git - users/hch/nvme-cli.git/commit
nvme-cli: user-defined hostnqn option for discover
authorJay Freyensee <james_p_freyensee@linux.intel.com>
Thu, 28 Jul 2016 19:23:59 +0000 (12:23 -0700)
committerJay Freyensee <james_p_freyensee@linux.intel.com>
Thu, 4 Aug 2016 23:05:34 +0000 (16:05 -0700)
commitcc8a5e13c1b02740318e847e69e5632da5c09047
treebb94cce8ef0f1d6c8c31d71170c9df1209b54e6e
parentbf0b23ff0e969a91cdcda48ad3058b05054fd46c
nvme-cli: user-defined hostnqn option for discover

The nvme-cli will always use the default hostnqn
in /dev/nvme-fabrics  for the discovery query, even though
both the NVMe Target and NVMe Host rdma implementations allow
user-defined hostnqn naming.

For example, this is the current, somewhat broken behavior if you
used your own hostnqn provision naming on the NVMe kernel target:

nvme discover /dev/nvme-fabrics  -t rdma --traddr=192.168.1.3 --trsvcid=4420

in dmesg:
[591910.025779] nvme nvme0: Connect Invalid Data Parameter, hostnqn "nqn.2014-08.org.nvmexpress:NVMf:uuid:a2d7752c-a31b-477a-a003-31a5e1c424a9"

New, fixed behavior introduced by this patch:

[root@fedora23-fabrics-host1 nvme-cli]# nvme discover  -t rdma --traddr=192.168.1.3 --trsvcid=4420 --hostnqn=host1-rogue-nqn

Discovery Log Number of Records 1, Generation counter 10
=====Discovery Log Entry 0======
trtype:  ipv4
adrfam:  rdma
nqntype: 2
treq:    0
portid:  1
trsvcid: 4420
subnqn:  nullside-nqn
traddr:  192.168.1.3
rdma_prtype: 0
rdma_qptype: 0
rdma_cms:    0
rdma_pkey: 0x0000
[root@fedora23-fabrics-host1 nvme-cli]#

Signed-off-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: Roy Shterman <roysh@mellanox.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fabrics.c