NVMe client TLS finally ... something
Hi Chuck,
at last some good news. The 'fput()' instead of 'sock_release()' really did the trick; crashes are gone, and things started to rumble along.
So the client side now seems to work:
[61077.029382] nvme nvme0: connecting queue 0 [61077.029778] nvme nvme0: queue 0: lookup sha256 retained TLS key [61077.029792] nvme nvme0: queue 0: start TLS with key beab76d [61077.029800] tls_client_hello_psk: peerid beab76d [61077.105017] nvme nvme0: queue 0: TLS handshake done, key 0, status 0 [61077.105036] nvme nvme0: queue 0: TLS handshake complete, tmo 2500, error 0 [61077.206598] nvme nvme0: creating 2 I/O queues. [61077.207100] nvme nvme0: connecting queue 1 [61077.207168] nvme nvme0: queue 1: lookup sha256 retained TLS key [61077.207176] nvme nvme0: queue 1: start TLS with key beab76d [61077.207184] tls_client_hello_psk: peerid beab76d [61077.255669] nvme nvme0: queue 1: TLS handshake done, key 0, status 0 [61077.255687] nvme nvme0: queue 1: TLS handshake complete, tmo 2500, error 0 [61077.255821] nvme nvme0: connecting queue 2 [61077.255883] nvme nvme0: queue 2: lookup sha256 retained TLS key [61077.255892] nvme nvme0: queue 2: start TLS with key beab76d [61077.255897] tls_client_hello_psk: peerid beab76d [61077.308351] nvme nvme0: queue 2: TLS handshake done, key 0, status 0 [61077.308367] nvme nvme0: queue 2: TLS handshake complete, tmo 2500, error 0 [61077.308494] nvme nvme0: mapped 2/0/0 default/read/poll queues. [61077.310415] nvme nvme0: new ctrl: NQN "nqn.2014-08.org.nvmexpress:NVMf:uuid:7a48d319-b49a-452a-86dd-3be7c4491382", addr 127.0.0.1:4420 [61109.661753] nvme nvme0: queue 2: timeout cid 0x1043 type 4 opcode 0x2 (Read) [61109.663158] nvme nvme0: starting error recovery [61109.663992] nvme0c0n1: Read(0x2) @ LBA 130999, 9 blocks, Host Aborted Command (sct 0x3 / sc 0x71) [61109.665081] I/O error, dev nvme0c0n1, sector 1047992 op 0x0:(READ) flags 0x4080700 phys_seg 9 prio class 2 [61109.666763] block nvme0n1: no usable path - requeuing I/O [61109.667309] nvme nvme0: queue 1: free socket [61109.667452] nvme nvme0: queue 2: free socket [61109.670704] nvme nvme0: queue 0: free socket [61109.670712] nvme nvme0: Reconnecting in 10 seconds...
IE TLS handshaked worked, and the client has sent commands. They never made it to the target, though; however, that might be that the plumbing on the client side isn't done properly. (queues need to be restarted, socket operations set, yadda yadda).
But it really is a big step forward.
Thanks for all the help.
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions Germany GmbH, Frankenstr. 146, 90461 Nürnberg Managing Directors: I. Totev, A. Myers, A. McDonald, M. B. Moerman (HRB 36809, AG Nürnberg)
Quoted 37 lines · Hannes Reinecke
Hi Chuck,
at last some good news. The '
fput()' instead of 'sock_release()' really did the trick; crashes are gone, and things started to rumble along.So the client side now seems to work:
[61077.029382] nvme nvme0: connecting queue 0 [61077.029778] nvme nvme0: queue 0: lookup sha256 retained TLS key [61077.029792] nvme nvme0: queue 0: start TLS with key beab76d [61077.029800] tls_client_hello_psk: peerid beab76d [61077.105017] nvme nvme0: queue 0: TLS handshake done, key 0, status 0 [61077.105036] nvme nvme0: queue 0: TLS handshake complete, tmo 2500, error 0 [61077.206598] nvme nvme0: creating 2 I/O queues. [61077.207100] nvme nvme0: connecting queue 1 [61077.207168] nvme nvme0: queue 1: lookup sha256 retained TLS key [61077.207176] nvme nvme0: queue 1: start TLS with key beab76d [61077.207184] tls_client_hello_psk: peerid beab76d [61077.255669] nvme nvme0: queue 1: TLS handshake done, key 0, status 0 [61077.255687] nvme nvme0: queue 1: TLS handshake complete, tmo 2500, error 0 [61077.255821] nvme nvme0: connecting queue 2 [61077.255883] nvme nvme0: queue 2: lookup sha256 retained TLS key [61077.255892] nvme nvme0: queue 2: start TLS with key beab76d [61077.255897] tls_client_hello_psk: peerid beab76d [61077.308351] nvme nvme0: queue 2: TLS handshake done, key 0, status 0 [61077.308367] nvme nvme0: queue 2: TLS handshake complete, tmo 2500, error 0 [61077.308494] nvme nvme0: mapped 2/0/0 default/read/poll queues. [61077.310415] nvme nvme0: new ctrl: NQN "nqn.2014-08.org.nvmexpress:NVMf:uuid:7a48d319-b49a-452a-86dd-3be7c4491382", addr 127.0.0.1:4420 [61109.661753] nvme nvme0: queue 2: timeout cid 0x1043 type 4 opcode 0x2 (Read) [61109.663158] nvme nvme0: starting error recovery [61109.663992] nvme0c0n1: Read(0x2) @ LBA 130999, 9 blocks, Host Aborted Command (sct 0x3 / sc 0x71) [61109.665081] I/O error, dev nvme0c0n1, sector 1047992 op 0x0:(READ) flags 0x4080700 phys_seg 9 prio class 2 [61109.666763] block nvme0n1: no usable path - requeuing I/O [61109.667309] nvme nvme0: queue 1: free socket [61109.667452] nvme nvme0: queue 2: free socket [61109.670704] nvme nvme0: queue 0: free socket [61109.670712] nvme nvme0: Reconnecting in 10 seconds...
Quoted 7 lines
IE TLS handshaked worked, and the client has sent commands. They never made it to the target, though; however, that might be that the plumbing on the client side isn't done properly. (queues need to be restarted, socket operations set, yadda yadda).
But it really is a big step forward.
Hmm. Retry the whole think seems _way_ better:
nvme nvme0: queue 2: TLS handshake done, key 0, status 0
nvme nvme0: queue 2: TLS handshake complete, tmo 2500, error 0
nvme nvme0: mapped 2/0/0 default/read/poll queues.
nvme nvme0: new ctrl: NQN "nqn.2014-08.org.nvmexpress:NVMf:uuid:7a48d319-b49a-452a-86dd-3be7c4491382", addr 127.0.0.1:4420 nvme nvme0: Removing ctrl: NQN "nqn.2014-08.org.nvmexpress:NVMf:uuid:7a48d319-b49a-452a-86dd-3be7c4491382" nvme nvme0: queue 1: timeout cid 0x102f type 4 opcode 0x2 (Read)
nvme0c0n1: Read(0x2) @ LBA 130988, 10 blocks, Host Aborted Command (sct 0x3 / sc 0x71)
nvme nvme0: queue 1: timeout cid 0x1030 type 4 opcode 0x2 (Read)
nvme0c0n1: Read(0x2) @ LBA 130999, 9 blocks, Host Aborted Command (sct 0x3 / sc 0x71)
block nvme0n1: no available path - failing I/O
Buffer I/O error on dev nvme0n1, logical block 130988, async page read
nvme nvme0: queue 1: free socket
IE data transfer seems to work, and I'm only seeing I/O errors after trying to disconnect, but that's about to be expected.
Me thinks.
Hence I can declare the client side functional.
Thanks for the work!
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions Germany GmbH, Frankenstr. 146, 90461 Nürnberg Managing Directors: I. Totev, A. Myers, A. McDonald, M. B. Moerman (HRB 36809, AG Nürnberg)