Commit f2c4b64f authored by Jim Harris's avatar Jim Harris Committed by Konrad Sztyber
Browse files

env_dpdk: assert that SOCKET_ID_ANY == SPDK_ENV_SOCKET_ID_ANY



Currently we just rely on the values being #defined to the same
value. So add a STATIC_ASSERT in env_dpdk just to confirm they
are always the same, since we pass these values straight through
to DPDK.

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


Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 57fd99b9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
#include "spdk/util.h"
#include "spdk/env_dpdk.h"
#include "spdk/log.h"
#include "spdk/assert.h"

#include "env_internal.h"

@@ -21,6 +22,8 @@

static __thread bool g_is_thread_unaffinitized;

SPDK_STATIC_ASSERT(SOCKET_ID_ANY == SPDK_ENV_SOCKET_ID_ANY, "SOCKET_ID_ANY mismatch");

void *
spdk_malloc(size_t size, size_t align, uint64_t *unused, int socket_id, uint32_t flags)
{