Recent changes (master)
The following changes since commit 62f35562722f0c903567096d0f10a836d1ae2f60:
eta: calculate aggregate bw statistics even when eta is disabled (2023-08-03 11:49:08 -0400)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 6795954bde09c8697e0accb865b4f438d62c601f:
engines/io_uring: fix leak of 'ld' in error path (2023-08-14 19:59:20 -0600)
----------------------------------------------------------------
Ankit Kumar (10):
engines:io_uring: add missing error during open file engines:io_uring: update arguments to fetch nvme data engines:io_uring: enable support for separate metadata buffer engines:io_uring: uring_cmd add support for protection info
io_u: move engine data out of union
crc: pull required crc16-t10 files from linux kernel engines:io_uring: generate and verify pi for 16b guard
crc: pull required crc64 nvme apis from linux kernel engines:nvme: pull required 48 bit accessors from linux kernel engines:io_uring: generate and verify pi for 64b guard
Jens Axboe (1):
engines/io_uring: fix leak of 'ld' in error path
Vincent Fu (2):
t/fiotestlib: use config variable to skip test at runtime t/nvmept_pi: test script for protection information
HOWTO.rst | 39 ++ crc/crc-t10dif.h | 9 + crc/crc64.c | 32 ++ crc/crc64.h | 3 + crc/crc64table.h | 130 +++++++ crc/crct10dif_common.c | 78 ++++ engines/io_uring.c | 228 ++++++++++-- engines/nvme.c | 466 ++++++++++++++++++++++-- engines/nvme.h | 230 +++++++++++- fio.1 | 38 ++ io_u.h | 2 +- t/fiotestlib.py | 5 +- t/nvmept_pi.py | 949 +++++++++++++++++++++++++++++++++++++++++++++++++ 13 files changed, 2154 insertions(+), 55 deletions(-) create mode 100644 crc/crc-t10dif.h create mode 100644 crc/crc64table.h create mode 100644 crc/crct10dif_common.c create mode 100755 t/nvmept_pi.py
---
Diff of recent changes:
HOWTO.rst +39 -0
@@ -2487,6 +2487,45 @@ with the caveat that when used on the command line, they must come after the want fio to use placement identifier only at indices 0, 2 and 5 specify ``fdp_pli=0,2,5``. +.. option:: md_per_io_size=int : [io_uring_cmd] + + Size in bytes for separate metadata buffer per IO. Default: 0. + +.. option:: pi_act=int : [io_uring_cmd] + + Action to take when nvme namespace is formatted with protection + information. If this is set to 1 and namespace is formatted with + metadata size equal to protection information size, fio won't use + separate metadata buffer or extended logical block. If this is set to + 1 and namespace is formatted with metadata size greater than protection + information size, fio will not generate or verify the protection + information portion of metadata for write or read case respectively. + If this is set to 0, fio generates protection information for + write case and verifies for read case. Default: 1. + +.. option:: pi_chk=str[,str][,str] : [io_uring_cmd] + + Controls the protection information check. This can take one or more + of these values. Default: none. + + **GUARD** + Enables protection information checking of guard field. + **REFTAG** + Enables protection information checking of logical block + reference tag field. + **APPTAG** + Enables protection information checking of application tag field. + +.. option:: apptag=int : [io_uring_cmd] + + Specifies logical block application tag value, if namespace is + formatted to use end to end protection information. Default: 0x1234. + +.. option:: apptag_mask=int : [io_uring_cmd] + + Specifies logical block application tag mask value, if namespace is + formatted to use end to end protection information. Default: 0xffff. + .. option:: cpuload=int : [cpuio] Attempt to use the specified percentage of CPU cycles. This is a mandatory
crc/crc-t10dif.h new file +9 -0
@@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __CRC_T10DIF_H +#define __CRC_T10DIF_H + +extern unsigned short fio_crc_t10dif (unsigned short crc, +const unsigned char *buffer, +unsigned int len); + +#endif
crc/crc64.c +32 -0
@@ -1,4 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* crc64nvme[256] table is from the generator polynomial specified by NVMe +* 64b CRC and is defined as, +* +* x^64 + x^63 + x^61 + x^59 + x^58 + x^56 + x^55 + x^52 + x^49 + x^48 + x^47 + +* x^46 + x^44 + x^41 + x^37 + x^36 + x^34 + x^32 + x^31 + x^28 + x^26 + x^23 + +* x^22 + x^19 + x^16 + x^13 + x^12 + x^10 + x^9 + x^6 + x^4 + x^3 + 1 +* +*/ +#include "crc64.h" +#include "crc64table.h" /* * poly 0x95AC9329AC4BC9B5ULL and init 0xFFFFFFFFFFFFFFFFULL
@@ -102,3 +114,23 @@ unsigned long long fio_crc64(const unsigned char *buffer, unsigned long length)return crc; } +/** +* fio_crc64_nvme - Calculate bitwise NVMe CRC64 +* @crc: seed value for computation. 0 for a new CRC calculation, or the +* previous crc64 value if computing incrementally. +* @p: pointer to buffer over which CRC64 is run +* @len: length of buffer @p +*/ +unsigned long long fio_crc64_nvme (unsigned long long crc,const void *p, +unsigned int len) +{ +const unsigned char *_p = p; +unsigned int i; + + crc = ~crc; + +for (i =0 ; i < len; i++) + crc = (crc >>8 ) ^ crc64nvmetable[(crc &0xff ) ^ *_p++]; + +return ~crc; +}
crc/crc64.h +3 -0
@@ -3,4 +3,7 @@unsigned long long fio_crc64 (const unsigned char *,unsigned long ); +unsigned long long fio_crc64_nvme (unsigned long long crc,const void *p, +unsigned int len); +#endif
crc/crc64table.h new file +130 -0
130 lines not on this page · raw message
crc/crct10dif_common.c new file +78 -0
78 lines not on this page · raw message
engines/io_uring.c +200 -28
350 lines not on this page · raw message
engines/nvme.c +444 -22
527 lines not on this page · raw message
engines/nvme.h +228 -2
284 lines not on this page · raw message
fio.1 +38 -0
@@ -2247,6 +2247,44 @@ By default, the job will cycle through all available Placement IDs, so use this to isolate these identifiers to specific jobs. If you want fio to use placement identifier only at indices 0, 2 and 5 specify, you would set `fdp_pli=0,2,5`. .TP +.BI (io_uring_cmd)md_per_io_size \fR=\fPint +Size in bytes for separate metadata buffer per IO. Default: 0. +.TP +.BI (io_uring_cmd)pi_act \fR=\fPint +Action to take when nvme namespace is formatted with protection information. +If this is set to 1 and namespace is formatted with metadata size equal to +protection information size, fio won't use separate metadata buffer or extended +logical block. If this is set to 1 and namespace is formatted with metadata +size greater than protection information size, fio will not generate or verify +the protection information portion of metadata for write or read case +respectively. If this is set to 0, fio generates protection information for +write case and verifies for read case. Default: 1. +.TP +.BI (io_uring_cmd)pi_chk \fR=\fPstr[,str][,str] +Controls the protection information check. This can take one or more of these +values. Default: none. +.RS +.RS +.TP +.B GUARD +Enables protection information checking of guard field. +.TP +.B REFTAG +Enables protection information checking of logical block reference tag field. +.TP +.B APPTAG +Enables protection information checking of application tag field. +.RE +.RE +.TP +.BI (io_uring_cmd)apptag \fR=\fPint +Specifies logical block application tag value, if namespace is formatted to use +end to end protection information. Default: 0x1234. +.TP +.BI (io_uring_cmd)apptag_mask \fR=\fPint +Specifies logical block application tag mask value, if namespace is formatted +to use end to end protection information. Default: 0xffff. +.TP .BI (cpuio)cpuload \fR=\fPint Attempt to use the specified percentage of CPU cycles. This is a mandatory option when using cpuio I/O engine.
io_u.h +1 -1
@@ -89,8 +89,8 @@ struct io_u {union {unsigned int index;unsigned int seen; -void *engine_data; }; +void *engine_data;union {struct flist_head verify_list;
t/fiotestlib.py +3 -2
@@ -382,9 +382,10 @@ def run_fio_tests(test_list, test_env, args): for config in test_list: if (args.skip and config['test_id'] in args.skip) or \ - (args.run_only and config['test_id'] not in args.run_only): + (args.run_only and config['test_id'] not in args.run_only) or \ + ('force_skip' in config and config['force_skip']): skipped = skipped + 1 - print(f"Test {config['test_id']} SKIPPED (User request)") + print(f"Test {config['test_id']} SKIPPED (User request or override)") continue if issubclass(config['test_class'], FioJobFileTest):
t/nvmept_pi.py new file +949 -0
949 lines not on this page · raw message