nvme-cli: fabrics: Fix passing "host_traddr" for all transports
PATCH 1/1 nvme-cli: fabrics: Fix passing "host_traddr" for all transports
Currently only FC transport passes "host_traddr" to the kernel during nvme connect-all command. Fix it for all transports.
Signed-off-by Max Gurtovoy <maxg at mellanox.com>
--- fabrics.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
fabrics.c +8 -5
@@ -614,6 +614,14 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e) p += len; } +if (cfg.host_traddr) { + len =sprintf (p,",host_traddr=%s" , cfg.host_traddr); +if (len <0 ) +return -EINVAL ; + p+= len; + } + +switch (e->trtype) {case NVMF_TRTYPE_LOOP :/* loop */ len =sprintf (p,",transport=loop" );
@@ -659,11 +667,6 @@ static int connect_ctrl(struct nvmf_disc_rsp_page_entry *e)return -EINVAL ; p += len; - len =sprintf (p,",host_traddr=%s" , cfg.host_traddr); -if (len <0 ) -return -EINVAL ; - p+= len; - len =sprintf (p,",traddr=%.*s" ,space_strip_len (NVMF_TRADDR_SIZE , e->traddr), e->traddr);
Signature · 1 line
2.14.1
Keith Busch
AppliedPATCH 1/1 nvme-cli: fabrics: Fix passing "host_traddr" for all transports
Applied, thanks!