Skip to content

Commit 104d0e2

Browse files
Hannes Reineckekeithbusch
authored andcommitted
nvme-fabrics: reset admin connection for secure concatenation
When secure concatenation is requested the connection needs to be reset to enable TLS encryption on the new cnnection. That implies that the original connection used for the DH-CHAP negotiation really shouldn't be used, and we should reset as soon as the DH-CHAP negotiation has succeeded on the admin queue. Based on an idea from Sagi. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Keith Busch <[email protected]>
1 parent e88a759 commit 104d0e2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/nvme/host/tcp.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2283,6 +2283,16 @@ static int nvme_tcp_setup_ctrl(struct nvme_ctrl *ctrl, bool new)
22832283
if (ret)
22842284
return ret;
22852285

2286+
if (ctrl->opts && ctrl->opts->concat && !ctrl->tls_pskid) {
2287+
/* See comments for nvme_tcp_key_revoke_needed() */
2288+
dev_dbg(ctrl->device, "restart admin queue for secure concatenation\n");
2289+
nvme_stop_keep_alive(ctrl);
2290+
nvme_tcp_teardown_admin_queue(ctrl, false);
2291+
ret = nvme_tcp_configure_admin_queue(ctrl, false);
2292+
if (ret)
2293+
return ret;
2294+
}
2295+
22862296
if (ctrl->icdoff) {
22872297
ret = -EOPNOTSUPP;
22882298
dev_err(ctrl->device, "icdoff is not supported!\n");

0 commit comments

Comments
 (0)