320ab72fb5
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> |
||
---|---|---|
.. | ||
Makefile | ||
nvme_ctrlr_cmd.c | ||
nvme_ctrlr_ocssd_cmd.c | ||
nvme_ctrlr.c | ||
nvme_cuse.c | ||
nvme_cuse.h | ||
nvme_fabric.c | ||
nvme_internal.h | ||
nvme_io_msg.c | ||
nvme_io_msg.h | ||
nvme_ns_cmd.c | ||
nvme_ns_ocssd_cmd.c | ||
nvme_ns.c | ||
nvme_opal_internal.h | ||
nvme_opal.c | ||
nvme_pcie_common.c | ||
nvme_pcie_internal.h | ||
nvme_pcie.c | ||
nvme_poll_group.c | ||
nvme_qpair.c | ||
nvme_quirks.c | ||
nvme_rdma.c | ||
nvme_tcp.c | ||
nvme_transport.c | ||
nvme_vfio_user.c | ||
nvme_zns.c | ||
nvme.c | ||
spdk_nvme.map |