Commit 1d384a72 authored by Jim Harris's avatar Jim Harris
Browse files

nvmf: add numa.id to spdk_nvmf_qpair



Individual transports are responsible for setting the numa.id_valid
flag and the numa.id value. If a transport doesn't set it, the
new spdk_nvmf_qpair_get_numa_id() inline function will just return
SPDK_ENV_NUMA_ID_ANY indicating an unknown NUMA ID.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarBen Walker <ben@nvidia.com>
Community-CI: Mellanox Build Bot
parent c2c1a767
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -174,8 +174,20 @@ struct spdk_nvmf_qpair {
	uint16_t				queue_depth;

	struct spdk_nvmf_qpair_auth		*auth;

	struct {
		/* Indicates whether numa.id is valid, needed for numa.id == 0 case */
		uint32_t			id_valid : 1;
		int32_t				id : 31;
	} numa;
};

static inline int32_t
spdk_nvmf_qpair_get_numa_id(struct spdk_nvmf_qpair *qpair)
{
	return qpair->numa.id_valid ? qpair->numa.id : SPDK_ENV_NUMA_ID_ANY;
}

struct spdk_nvmf_transport_poll_group {
	struct spdk_nvmf_transport					*transport;
	/* Requests that are waiting to obtain a data buffer */