diff --git a/include/spdk/event.h b/include/spdk/event.h index 82cf2ac77..19a4dd407 100644 --- a/include/spdk/event.h +++ b/include/spdk/event.h @@ -63,23 +63,42 @@ struct spdk_app_opts { const char *name; const char *json_config_file; bool json_config_ignore_errors; + + /* Hole at bytes 17-23. */ + uint8_t reserved17[7]; + const char *rpc_addr; /* Can be UNIX domain socket path or IP address + TCP port */ const char *reactor_mask; const char *tpoint_group_mask; int shm_id; + /* Hole at bytes 52-55. */ + uint8_t reserved52[4]; + spdk_app_shutdown_cb shutdown_cb; bool enable_coredump; + + /* Hole at bytes 65-67. */ + uint8_t reserved65[3]; + int mem_channel; int main_core; int mem_size; bool no_pci; bool hugepage_single_segments; bool unlink_hugepage; + + /* Hole at bytes 83-85. */ + uint8_t reserved83[5]; + const char *hugedir; enum spdk_log_level print_level; + + /* Hole at bytes 100-103. */ + uint8_t reserved100[4]; + size_t num_pci_addr; struct spdk_pci_addr *pci_blocked; struct spdk_pci_addr *pci_allowed; @@ -90,6 +109,9 @@ struct spdk_app_opts { */ bool delay_subsystem_init; + /* Hole at bytes 137-143. */ + uint8_t reserved137[7]; + /* Number of trace entries allocated for each core */ uint64_t num_entries; @@ -121,13 +143,16 @@ struct spdk_app_opts { */ bool disable_signal_handlers; + /* Hole at bytes 185-191. */ + uint8_t reserved185[7]; + /** * The allocated size for the message pool used by the threading library. * * Default is `SPDK_DEFAULT_MSG_MEMPOOL_SIZE`. */ size_t msg_mempool_size; -}; +} __attribute__((packed)); SPDK_STATIC_ASSERT(sizeof(struct spdk_app_opts) == 200, "Incorrect size"); /** diff --git a/lib/event/Makefile b/lib/event/Makefile index 32022aa5d..ff2ecdbe6 100644 --- a/lib/event/Makefile +++ b/lib/event/Makefile @@ -9,7 +9,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk SO_VER := 11 SO_MINOR := 0 -CFLAGS += $(ENV_CFLAGS) +CFLAGS += $(ENV_CFLAGS) -Wno-address-of-packed-member LIBNAME = event C_SRCS = app.c reactor.c log_rpc.c \ diff --git a/test/make/check_so_deps.sh b/test/make/check_so_deps.sh index eeceab894..74aa29d08 100755 --- a/test/make/check_so_deps.sh +++ b/test/make/check_so_deps.sh @@ -84,6 +84,8 @@ function confirm_abi_deps() { name = spdk_nvme_cdata_nvmf_specific [suppress_type] name = spdk_bs_opts +[suppress_type] + name = spdk_app_opts EOF for object in "$libdir"/libspdk_*.so; do diff --git a/test/unit/lib/event/app.c/Makefile b/test/unit/lib/event/app.c/Makefile index 34e9b9031..b4ff971e9 100644 --- a/test/unit/lib/event/app.c/Makefile +++ b/test/unit/lib/event/app.c/Makefile @@ -5,6 +5,8 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..) +CFLAGS += -Wno-address-of-packed-member + SPDK_LIB_LIST = conf trace jsonrpc json TEST_FILE = app_ut.c