From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 93E95201 for ; Sat, 19 Jan 2019 15:01:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jan 2019 06:01:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,495,1539673200"; d="scan'208";a="136011727" Received: from unknown (HELO broadwell-dev-4.localdomain) ([10.224.122.193]) by fmsmga002.fm.intel.com with ESMTP; 19 Jan 2019 06:01:53 -0800 From: Nikhil Rao To: harry.van.haaren@intel.com Cc: dev@dpdk.org, Nikhil Rao Date: Sat, 19 Jan 2019 19:31:29 +0530 Message-Id: <1547906489-71240-1-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] service: fix parameter type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2019 14:01:56 -0000 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") Reviewed-by: Gage Eads Signed-off-by: Nikhil Rao --- lib/librte_eal/common/include/rte_service.h | 2 +- lib/librte_eal/common/rte_service.c | 2 +- test/test/test_service_cores.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) For 19.02, I assume this will require the ABI change announcement. I will post it once this patch is acked. diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h index 34b41af..670c89a 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_run_iter_on_app_lcore(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 03fde97..5f75e5a 100644 --- a/lib/librte_eal/common/rte_service.c +++ b/lib/librte_eal/common/rte_service.c @@ -734,7 +734,7 @@ int32_t rte_service_run_iter_on_app_lcore(uint32_t id, } 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/test/test/test_service_cores.c b/test/test/test_service_cores.c index ec31882..82bb2ce 100644 --- a/test/test/test_service_cores.c +++ b/test/test/test_service_cores.c @@ -259,7 +259,7 @@ static int32_t dummy_mt_safe_cb(void *args) 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), -- 1.8.3.1