From: Jim Harris Date: Tue, 24 Sep 2019 09:23:34 +0000 (-0700) Subject: vhost: add missing experimental flag X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=61af1713d3f1bebf896aeb943fc23f58ed4f0724;p=dpdk.git vhost: add missing experimental flag This function is listed under EXPERIMENTAL in the rte_vhost_version.map, so it needs to be marked with __rte_experimental in the header file as well. Found by check-experimental-syms.sh when trying to compile DPDK with -finstrument-functions. This script didn't catch this in the normal case, since the function is declared __rte_always_inline. This also requires updating the vhost_scsi example to allow use of this newly marked experimental API. Signed-off-by: Jim Harris Reviewed-by: Maxime Coquelin --- diff --git a/examples/vhost_scsi/Makefile b/examples/vhost_scsi/Makefile index c5aec269e9..05e1cedb7d 100644 --- a/examples/vhost_scsi/Makefile +++ b/examples/vhost_scsi/Makefile @@ -58,6 +58,7 @@ please change the definition of the RTE_TARGET environment variable) all: else +CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -O2 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/vhost_scsi/meson.build b/examples/vhost_scsi/meson.build index 77e5201bd7..384127d5be 100644 --- a/examples/vhost_scsi/meson.build +++ b/examples/vhost_scsi/meson.build @@ -15,6 +15,7 @@ if not cc.has_header('linux/virtio_scsi.h') endif deps += 'vhost' +allow_experimental_apis = true sources = files( 'scsi.c', 'vhost_scsi.c' ) diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h index 878e339550..19474bca07 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h @@ -233,6 +233,7 @@ rte_vhost_gpa_to_vva(struct rte_vhost_memory *mem, uint64_t gpa) * @return * the host virtual address on success, 0 on failure */ +__rte_experimental static __rte_always_inline uint64_t rte_vhost_va_from_guest_pa(struct rte_vhost_memory *mem, uint64_t gpa, uint64_t *len)