numam-spdk/lib/scsi
Shuhei Matsumoto 320ab72fb5 util: Add macro SPDK_SIZEOF_MEMBER to get size of a member of a struct
We find a few files to get the size of a member of a struct. How to
do it is a little complex. So add a macro to do it will be helpful
to read the current code and develop new features.

lib/dif had used member_size() internally but Linux use sizeof_member()
as the macro. Besides, SPDK have used upper case letters for similar
macros, SPDK_CONTAINEROF() and SPDK_COUNTOF(). Hence spdk_member_size()
may be good but propose SPDK_SIZEOF_MEMBER() as the macro.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2179c845a3b75fb71aa039075cc4dfd30617b898
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8738
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2021-07-15 07:16:22 +00:00
..
dev.c lib/scsi: Pass bdev_name instead of bdev to scsi_lun_construct() 2020-10-08 13:11:15 +00:00
lun.c lib/trace: don't pass zero as a non-argument 2021-06-28 16:17:35 +00:00
Makefile so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
port.c lib/scsi: Remove spdk_ prefix from internal APIs 2020-04-16 08:09:14 +00:00
scsi_bdev.c util: Add macro SPDK_SIZEOF_MEMBER to get size of a member of a struct 2021-07-15 07:16:22 +00:00
scsi_internal.h scsi: Delete mutex from spdk_scsi_globals 2021-06-17 08:59:18 +00:00
scsi_pr.c scsi: return scsi error status for invalid SCSI CDB 2021-04-15 20:25:28 +00:00
scsi_rpc.c lib/scsi: Remove spdk prefix from private functions 2020-04-16 08:09:14 +00:00
scsi.c scsi: Delete mutex from spdk_scsi_globals 2021-06-17 08:59:18 +00:00
spdk_scsi.map scsi: add bdev resize callback support 2020-09-28 08:33:18 +00:00
task.c scsi: relax spdk_scsi_task_gather_data assert 2021-03-09 08:53:21 +00:00