From: Nikhil Rao Date: Thu, 28 Mar 2019 06:29:03 +0000 (+0530) Subject: service: fix parameter type for attribute X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=db9f4430c26de505b3f9987ea4604d1ab5e5b64f;p=dpdk.git service: fix parameter type for attribute The type of value parameter to rte_service_attr_get should be uint64_t *, since the attributes are of type uint64_t. Fixes: 4d55194d76a4 ("service: add attribute get function") Signed-off-by: Nikhil Rao Reviewed-by: Gage Eads Reviewed-by: Rami Rosen Acked-by: Harry van Haaren --- diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c index ec31882d99..82bb2ce50b 100644 --- a/app/test/test_service_cores.c +++ b/app/test/test_service_cores.c @@ -259,7 +259,7 @@ service_attr_get(void) rte_service_set_stats_enable(id, 1); uint32_t attr_id = UINT32_MAX; - uint32_t attr_value = 0xdead; + uint64_t attr_value = 0xdead; /* check error return values */ TEST_ASSERT_EQUAL(-EINVAL, rte_service_attr_get(id, attr_id, &attr_value), diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index d749fe3cce..73bfa9d4aa 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -20,10 +20,6 @@ Deprecation Notices * kvargs: The function ``rte_kvargs_process`` will get a new parameter for returning key match count. It will ease handling of no-match case. -* eal: The ``attr_value`` parameter of ``rte_service_attr_get()`` - will be changed from ``uint32_t *`` to ``uint64_t *`` - as the attributes are of type ``uint64_t``. - * eal: both declaring and identifying devices will be streamlined in v18.11. New functions will appear to query a specific port from buses, classes of device and device drivers. Device declaration will be made coherent with the diff --git a/doc/guides/rel_notes/release_19_05.rst b/doc/guides/rel_notes/release_19_05.rst index d11bb5a2ba..aae8ff6029 100644 --- a/doc/guides/rel_notes/release_19_05.rst +++ b/doc/guides/rel_notes/release_19_05.rst @@ -134,6 +134,10 @@ API Changes Also, make sure to start the actual text at the margin. ========================================================= +* eal: the type of the ``attr_value`` parameter of the function + ``rte_service_attr_get()`` has been changed + from ``uint32_t *`` to ``uint64_t *``. + ABI Changes ----------- @@ -190,7 +194,7 @@ The libraries prepended with a plus sign were incremented in this version. librte_compressdev.so.1 + librte_cryptodev.so.7 librte_distributor.so.1 - librte_eal.so.9 + + librte_eal.so.10 librte_efd.so.1 librte_ethdev.so.11 librte_eventdev.so.6 diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h index 34b41aff2a..670c89af43 100644 --- a/lib/librte_eal/common/include/rte_service.h +++ b/lib/librte_eal/common/include/rte_service.h @@ -372,7 +372,7 @@ int32_t rte_service_dump(FILE *f, uint32_t id); * -EINVAL Invalid id, attr_id or attr_value was NULL. */ int32_t rte_service_attr_get(uint32_t id, uint32_t attr_id, - uint32_t *attr_value); + uint64_t *attr_value); /** * Reset all attribute values of a service. diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c index 03fde97a9c..5f75e5a53f 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -734,7 +734,7 @@ rte_service_lcore_stop(uint32_t lcore) } int32_t -rte_service_attr_get(uint32_t id, uint32_t attr_id, uint32_t *attr_value) +rte_service_attr_get(uint32_t id, uint32_t attr_id, uint64_t *attr_value) { struct rte_service_spec_impl *s; SERVICE_VALID_GET_OR_ERR_RET(id, s, -EINVAL); diff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile index 8e9450c26f..5d5abf1bba 100644 --- a/lib/librte_eal/freebsd/eal/Makefile +++ b/lib/librte_eal/freebsd/eal/Makefile @@ -22,7 +22,7 @@ LDLIBS += -lrte_kvargs EXPORT_MAP := ../../rte_eal_version.map -LIBABIVER := 9 +LIBABIVER := 10 # specific to freebsd exec-env SRCS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) := eal.c diff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile index e5e668cd00..932c93309e 100644 --- a/lib/librte_eal/linux/eal/Makefile +++ b/lib/librte_eal/linux/eal/Makefile @@ -10,7 +10,7 @@ ARCH_DIR ?= $(RTE_ARCH) EXPORT_MAP := ../../rte_eal_version.map VPATH += $(RTE_SDK)/lib/librte_eal/common/arch/$(ARCH_DIR) -LIBABIVER := 9 +LIBABIVER := 10 VPATH += $(RTE_SDK)/lib/librte_eal/common diff --git a/lib/librte_eal/meson.build b/lib/librte_eal/meson.build index c592c6747f..d48c5e11d0 100644 --- a/lib/librte_eal/meson.build +++ b/lib/librte_eal/meson.build @@ -21,7 +21,7 @@ else error('unsupported system type "@0@"'.format(host_machine.system())) endif -version = 9 # the version of the EAL API +version = 10 # the version of the EAL API allow_experimental_apis = true deps += 'kvargs' if dpdk_conf.has('RTE_USE_LIBBSD')