Spdk/lib/bdev/nvme
Shuhei Matsumoto 73204fe2e5 dif: Add data offset to DIF context separately from start block address
Data offset are intended to correspond to DATAO in NVMe/TCP and
Buffer Offset in iSCSI.

Previously for iSCSI, buffer offset had been merged to start block
address, but passing buffer offset separately from start block address
clarifies the logic more.

On the other hand, for NVMe/TCP, passing DATAO separately from start
block address will be critically important because DATAO will bave any
alignment and will be necessary to use for not only reference tag
but also guard computation.

This patch adds data_offset to struct spdk_dif_ctx and adds it to the
parameters of spdk_dif_ctx_init(). ref_tag_offset is also added to struct
spdk_dif_ctx and it is computed by dividing data_offset by data_block_size
and is used to compute reference tag.

The next patch will use this change when getting DIF context in SCSI.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0e12ca9b1dc75d0589787520feb0c2ee0f844a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-11 18:53:58 +00:00
..
bdev_ftl_rpc.c lib/ftl: Add config to construct_ftl rpc for dirty shutdown restore 2019-06-07 18:26:57 +00:00
bdev_ftl.c bdev/ftl: Add driver specific data to get_bdevs rpc 2019-06-11 06:25:36 +00:00
bdev_ftl.h lib/ftl: Add config to construct_ftl rpc for dirty shutdown restore 2019-06-07 18:26:57 +00:00
bdev_nvme_rpc.c misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
bdev_nvme.c dif: Add data offset to DIF context separately from start block address 2019-06-11 18:53:58 +00:00
bdev_nvme.h bdev/nvme: use asynchronous API to probe user specified controller 2019-03-25 13:50:23 +00:00
common.c bdev/nvme: Move functions related to NVMe controller to common.c 2019-03-08 12:47:53 +00:00
common.h bdev/nvme: Move functions related to NVMe controller to common.c 2019-03-08 12:47:53 +00:00
Makefile bdev/nvme: always enable FTL 2019-05-02 08:41:56 +00:00
nvme_rpc.c bdev/nvme: Remove spdk_bdev_nvme_lookup_ctrlr function 2019-03-04 19:00:23 +00:00