Commit 96168f45 authored by Jim Harris's avatar Jim Harris Committed by Tomasz Zawadzki
Browse files

env: pack and assert size for spdk_env_opts



This prepares for adding a size parameter to this structure so it
can be safely ABI versioned.

Signed-off-by: default avatarJim Harris <jim.harris@samsung.com>
Change-Id: I3b46480b7f23c588c696e53dc719cb7c66da01fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23939


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 72c41fdd
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include "spdk/stdinc.h"
#include "spdk/queue.h"
#include "spdk/pci_ids.h"
#include "spdk/assert.h"

#ifdef __cplusplus
extern "C" {
@@ -56,6 +57,7 @@ struct spdk_env_opts {
	bool			hugepage_single_segments;
	bool			unlink_hugepage;
	bool			no_huge;
	uint32_t		reserved;
	size_t			num_pci_addr;
	const char		*hugedir;
	struct spdk_pci_addr	*pci_blocked;
@@ -67,6 +69,7 @@ struct spdk_env_opts {
	void			*env_context;
	const char		*vf_token;
};
SPDK_STATIC_ASSERT(sizeof(struct spdk_env_opts) == 112, "Incorrect size");

/**
 * Allocate dma/sharable memory based on a given dma_flg. It is a memory buffer
+2 −2
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..)
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk

SO_VER := 14
SO_MINOR := 1
SO_VER := 15
SO_MINOR := 0

CFLAGS += $(ENV_CFLAGS)
C_SRCS = env.c memory.c pci.c init.c threads.c