DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nikhil Rao <nikhil.rao@intel.com>
To: harry.van.haaren@intel.com
Cc: dev@dpdk.org, Nikhil Rao <nikhil.rao@intel.com>
Subject: [dpdk-dev] [PATCH] service: fix parameter type
Date: Sat, 19 Jan 2019 19:31:29 +0530	[thread overview]
Message-ID: <1547906489-71240-1-git-send-email-nikhil.rao@intel.com> (raw)

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 <gage.eads@intel.com>
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
---
 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

             reply	other threads:[~2019-01-19 14:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-19 14:01 Nikhil Rao [this message]
2019-01-21 11:43 ` Van Haaren, Harry
2019-02-08 15:01   ` Ferruh Yigit
2019-02-14  9:56 ` [dpdk-dev] [PATCH v2] " Nikhil Rao
2019-02-15 10:29 ` [dpdk-dev] [PATCH v3] " Nikhil Rao
2019-02-18 20:27   ` Rami Rosen
2019-03-27  9:52   ` Thomas Monjalon
2019-03-27  9:52     ` Thomas Monjalon
2019-03-28  6:29 ` [dpdk-dev] [PATCH v4] " Nikhil Rao
2019-03-28  6:29   ` Nikhil Rao
2019-03-28 20:10   ` Thomas Monjalon
2019-03-28 20:10     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1547906489-71240-1-git-send-email-nikhil.rao@intel.com \
    --to=nikhil.rao@intel.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).