[PATCH 0/3] nvmet-auth: auth send / receive cleanup
Chaitanya Kulkarni
kch at nvidia.com
Mon May 22 01:37:10 PDT 2023
Hi,
nvmet_execute_auth_send() and nvmet_exeucte_auth_receive() share a lot
of common functionality such as :-
1. Checking secp/spsp values and its error handling.
2. Initializing transfer buffer len and its error handling.
2. Allocating transfer buffer and its error handling.
This code is repeated in both the functions.
Add common helpers with very small restructring code to remove
duplication of above functionality in the nvmet_exeucte_auth_receive()
and nvmet_execute_auth_send(), it also makes code easy to read as both
the functions are doing substantial work.
Please note that this series is generated on the top of this :-
[PATCH 1/2] nvmet-auth: remove unnecessary break after goto
http://lists.infradead.org/pipermail/linux-nvme/2023-May/039950.html
Below are the blktets nvme results on nvme-loop and nvme-tcp transport.
-ck
Chaitanya Kulkarni (3):
nvmet-auth: use common helper to check secp/spsp
nvmet_auth: use common helper for buffer alloc
nvmet-auth: use helper for auth send/recv cmd prep
drivers/nvme/target/fabrics-cmd-auth.c | 106 +++++++++++--------------
1 file changed, 45 insertions(+), 61 deletions(-)
blktests (master) # sh test-nvme-memleack.sh
################nvme_trtype=loop############
nvme/002 (create many subsystems and test discovery) [passed]
runtime ... 43.965s
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
runtime 10.194s ... 10.171s
nvme/004 (test nvme and nvmet UUID NS descriptors) [passed]
runtime 1.321s ... 1.732s
nvme/005 (reset local loopback target) [passed]
runtime 1.421s ... 2.118s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
runtime 0.134s ... 0.131s
nvme/007 (create an NVMeOF target with a file-backed ns) [passed]
runtime 0.092s ... 0.083s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
runtime 1.351s ... 1.712s
nvme/009 (create an NVMeOF host with a file-backed ns) [passed]
runtime 1.306s ... 1.742s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 88.563s ... 84.996s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
runtime 88.483s ... 70.556s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 93.537s ... 77.927s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
runtime 89.064s ... 71.515s
nvme/014 (flush a NVMeOF block device-backed ns) [passed]
runtime 5.629s ... 6.141s
nvme/015 (unit test for NVMe flush for file backed ns) [passed]
runtime 3.993s ... 4.797s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [passed]
runtime ... 20.513s
nvme/017 (create/delete many file-ns and test discovery) [passed]
runtime ... 20.563s
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
runtime 1.315s ... 1.741s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
runtime 1.324s ... 1.718s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
runtime 1.293s ... 1.721s
nvme/021 (test NVMe list command on NVMeOF file-backed ns) [passed]
runtime 1.307s ... 1.668s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns) [passed]
runtime 1.376s ... 2.147s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
runtime 1.318s ... 1.718s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
runtime 1.284s ... 1.699s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
runtime 1.285s ... 1.695s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
runtime 1.274s ... 1.659s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
runtime 1.290s ... 1.688s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
runtime 1.289s ... 1.716s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
runtime 1.616s ... 2.001s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
runtime 0.298s ... 0.420s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
runtime 1.484s ... 5.448s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
runtime 0.046s ... 0.042s
nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed]
runtime 7.416s ... 8.235s
nvme/041 (Create authenticated connections) [passed]
runtime 1.164s ... 1.638s
nvme/042 (Test dhchap key types for authenticated connections) [passed]
runtime 7.461s ... 10.101s
nvme/043 (Test hash and DH group variations for authenticated connections) [passed]
runtime 1.342s ... 4.516s
nvme/044 (Test bi-directional authentication) [passed]
runtime 1.537s ... 2.351s
nvme/045 (Test re-authentication) [passed]
runtime 6.356s ... 4.993s
nvme/047 (test different queue types for fabric transports) [not run]
runtime 2.281s ...
nvme_trtype=loop is not supported in this test
nvme/048 (Test queue count changes on reconnect) [not run]
runtime 5.627s ...
nvme_trtype=loop is not supported in this test
################nvme_trtype=tcp############
nvme/002 (create many subsystems and test discovery) [not run]
runtime 43.965s ...
nvme_trtype=tcp is not supported in this test
nvme/003 (test if we're sending keep-alives to a discovery controller) [passed]
runtime 10.171s ... 10.189s
nvme/004 (test nvme and nvmet UUID NS descriptors) [passed]
runtime 1.732s ... 1.331s
nvme/005 (reset local loopback target) [passed]
runtime 2.118s ... 1.432s
nvme/006 (create an NVMeOF target with a block device-backed ns) [passed]
runtime 0.131s ... 0.134s
nvme/007 (create an NVMeOF target with a file-backed ns) [passed]
runtime 0.083s ... 0.092s
nvme/008 (create an NVMeOF host with a block device-backed ns) [passed]
runtime 1.712s ... 1.345s
nvme/009 (create an NVMeOF host with a file-backed ns) [passed]
runtime 1.742s ... 1.315s
nvme/010 (run data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 84.996s ... 78.021s
nvme/011 (run data verification fio job on NVMeOF file-backed ns) [passed]
runtime 70.556s ... 94.072s
nvme/012 (run mkfs and data verification fio job on NVMeOF block device-backed ns) [passed]
runtime 77.927s ... 70.347s
nvme/013 (run mkfs and data verification fio job on NVMeOF file-backed ns) [passed]
runtime 71.515s ... 92.875s
nvme/014 (flush a NVMeOF block device-backed ns) [passed]
runtime 6.141s ... 5.665s
nvme/015 (unit test for NVMe flush for file backed ns) [passed]
runtime 4.797s ... 3.903s
nvme/016 (create/delete many NVMeOF block device-backed ns and test discovery) [not run]
runtime 20.513s ...
nvme_trtype=tcp is not supported in this test
nvme/017 (create/delete many file-ns and test discovery) [not run]
runtime 20.563s ...
nvme_trtype=tcp is not supported in this test
nvme/018 (unit test NVMe-oF out of range access on a file backend) [passed]
runtime 1.741s ... 1.307s
nvme/019 (test NVMe DSM Discard command on NVMeOF block-device ns) [passed]
runtime 1.718s ... 1.350s
nvme/020 (test NVMe DSM Discard command on NVMeOF file-backed ns) [passed]
runtime 1.721s ... 1.315s
nvme/021 (test NVMe list command on NVMeOF file-backed ns) [passed]
runtime 1.668s ... 1.316s
nvme/022 (test NVMe reset command on NVMeOF file-backed ns) [passed]
runtime 2.147s ... 1.386s
nvme/023 (test NVMe smart-log command on NVMeOF block-device ns) [passed]
runtime 1.718s ... 1.336s
nvme/024 (test NVMe smart-log command on NVMeOF file-backed ns) [passed]
runtime 1.699s ... 1.304s
nvme/025 (test NVMe effects-log command on NVMeOF file-backed ns) [passed]
runtime 1.695s ... 1.320s
nvme/026 (test NVMe ns-descs command on NVMeOF file-backed ns) [passed]
runtime 1.659s ... 1.297s
nvme/027 (test NVMe ns-rescan command on NVMeOF file-backed ns) [passed]
runtime 1.688s ... 1.307s
nvme/028 (test NVMe list-subsys command on NVMeOF file-backed ns) [passed]
runtime 1.716s ... 1.322s
nvme/029 (test userspace IO via nvme-cli read/write interface) [passed]
runtime 2.001s ... 1.671s
nvme/030 (ensure the discovery generation counter is updated appropriately) [passed]
runtime 0.420s ... 0.341s
nvme/031 (test deletion of NVMeOF controllers immediately after setup) [passed]
runtime 5.448s ... 1.622s
nvme/038 (test deletion of NVMeOF subsystem without enabling) [passed]
runtime 0.042s ... 0.049s
nvme/040 (test nvme fabrics controller reset/disconnect operation during I/O) [passed]
runtime 8.235s ... 7.458s
nvme/041 (Create authenticated connections) [passed]
runtime 1.638s ... 1.242s
nvme/042 (Test dhchap key types for authenticated connections) [passed]
runtime 10.101s ... 7.807s
nvme/043 (Test hash and DH group variations for authenticated connections) [passed]
runtime 4.516s ... 1.496s
nvme/044 (Test bi-directional authentication) [passed]
runtime 2.351s ... 1.552s
nvme/045 (Test re-authentication) [passed]
runtime 4.993s ... 5.859s
nvme/047 (test different queue types for fabric transports) [passed]
runtime ... 2.365s
nvme/048 (Test queue count changes on reconnect) [passed]
runtime ... 5.649s
blktests (master) #
--
2.40.0
More information about the Linux-nvme
mailing list