fio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ankit Kumar <ankit.kumar@samsung.com>
To: axboe@kernel.dk, vincentfu@gmail.com
Cc: fio@vger.kernel.org, kbusch@kernel.org, joshi.k@samsung.com,
	martin.petersen@oracle.com, Ankit Kumar <ankit.kumar@samsung.com>
Subject: [PATCH v2 00/10] Protection information support for io_uring passthrough
Date: Fri, 11 Aug 2023 16:55:37 +0530	[thread overview]
Message-ID: <20230811112547.92345-1-ankit.kumar@samsung.com> (raw)
In-Reply-To: CGME20230811060633epcas5p2afd7e23260a8bebbe91c4ae87b25f6c7@epcas5p2.samsung.com

This patch series enables protection information support with io_uring
passthrough (io_uring_cmd) ioengine. This support is added for both DIF
(extended logical blocks) and DIX (separate metadata buffer) cases.

The initial patch adds support for metadata buffer. As we are unaware
of metadata size during metadata buffer allocation, we provide an
option md_per_io_size. This must be used to specify metadata size for
single IO, if namespace is formatted with separate metadata buffer.

This then enables the protection information support with and without
PRACT bit set for both DIF and DIX cases. The support covers 16-bit and
64-bit guard protection information format, without storage tags. As
32-bit guard protection information format mandates minimum 16 bits for
storage tags, it is not considered.

For the sake of consistency metadata and protection information specific
options are the same as the ones used by SPDK's external ioengine.

This series also borrows relevant kernel crc16-t10 and NVMe CRC64
generation files, along with 48-bit accessors for reference tags.

The NVMe CRC64 table is not generated at build time which is what kernel
does. This will be done in future.

Changes from v1:
 - Fixed build issue on windows and macos.
 - Changed name of CRC64 tables and algorithm as per NVMe command set
   specification (Keith's suggestion).
 - Addressed review comments from Vincent.

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

 HOWTO.rst              |  39 ++++
 crc/crc-t10dif.h       |  10 +
 crc/crc64.c            |  32 +++
 crc/crc64.h            |   3 +
 crc/crc64table.h       | 130 ++++++++++++
 crc/crct10dif_common.c |  78 +++++++
 engines/io_uring.c     | 225 +++++++++++++++++---
 engines/nvme.c         | 466 +++++++++++++++++++++++++++++++++++++++--
 engines/nvme.h         | 230 +++++++++++++++++++-
 fio.1                  |  38 ++++
 io_u.h                 |   2 +-
 11 files changed, 1200 insertions(+), 53 deletions(-)
 create mode 100644 crc/crc-t10dif.h
 create mode 100644 crc/crc64table.h
 create mode 100644 crc/crct10dif_common.c

-- 
2.25.1


       reply	other threads:[~2023-08-11  7:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20230811060633epcas5p2afd7e23260a8bebbe91c4ae87b25f6c7@epcas5p2.samsung.com>
2023-08-11 11:25 ` Ankit Kumar [this message]
     [not found]   ` <CGME20230811060634epcas5p1dbf9887e516cd6e5369b0eb2e491751a@epcas5p1.samsung.com>
2023-08-11 11:25     ` [PATCH v2 01/10] engines:io_uring: add missing error during open file Ankit Kumar
     [not found]   ` <CGME20230811060636epcas5p3e84849b062c7c7812e8392ad0eb4d8c0@epcas5p3.samsung.com>
2023-08-11 11:25     ` [PATCH v2 02/10] engines:io_uring: update arguments to fetch nvme data Ankit Kumar
     [not found]   ` <CGME20230811060637epcas5p4a48caa81e6548a28ed0cf3edea5e7dd7@epcas5p4.samsung.com>
2023-08-11 11:25     ` [PATCH v2 03/10] engines:io_uring: enable support for separate metadata buffer Ankit Kumar
     [not found]   ` <CGME20230811060639epcas5p404a8f9566a2a7db9953dc0b08ab0e44d@epcas5p4.samsung.com>
2023-08-11 11:25     ` [PATCH v2 04/10] engines:io_uring: uring_cmd add support for protection info Ankit Kumar
     [not found]   ` <CGME20230811060640epcas5p3216e74b272e85f30639d7782e30e7cbd@epcas5p3.samsung.com>
2023-08-11 11:25     ` [PATCH v2 05/10] io_u: move engine data out of union Ankit Kumar
     [not found]   ` <CGME20230811060642epcas5p2262ab4f7aa495c5ebbcdbae5dd5a142c@epcas5p2.samsung.com>
2023-08-11 11:25     ` [PATCH v2 06/10] crc: pull required crc16-t10 files from linux kernel Ankit Kumar
     [not found]   ` <CGME20230811060644epcas5p45a369165d04425b5efdb6c5e9f8ca265@epcas5p4.samsung.com>
2023-08-11 11:25     ` [PATCH v2 07/10] engines:io_uring: generate and verify pi for 16b guard Ankit Kumar
     [not found]   ` <CGME20230811060645epcas5p1715aa40476d539b21e2507ff17a88dd4@epcas5p1.samsung.com>
2023-08-11 11:25     ` [PATCH v2 08/10] crc: pull required crc64 nvme apis from linux kernel Ankit Kumar
     [not found]   ` <CGME20230811060647epcas5p1fadd4d56b4276a477760611d42445ddb@epcas5p1.samsung.com>
2023-08-11 11:25     ` [PATCH v2 09/10] engines:nvme: pull required 48 bit accessors " Ankit Kumar
     [not found]   ` <CGME20230811060648epcas5p3b641c40e820511d5336e983cf7f31392@epcas5p3.samsung.com>
2023-08-11 11:25     ` [PATCH v2 10/10] engines:io_uring: generate and verify pi for 64b guard Ankit Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230811112547.92345-1-ankit.kumar@samsung.com \
    --to=ankit.kumar@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vincentfu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).