DPDK patches and discussions
 help / color / mirror / Atom feed
From: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
To: pbhagavatula@caviumnetworks.com
Cc: dev@dpdk.org, rsanford@akamai.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 1/1] timer: fix reset on service cores
Date: Fri, 12 Jan 2018 15:31:05 -0600	[thread overview]
Message-ID: <1515792665-6890-1-git-send-email-erik.g.carrillo@intel.com> (raw)

The return value of rte_lcore_has_role is misinterpreted in the timer
reset function.  The return values of rte_lcore_has_role will be changed
in a future DPDK release, but this commit fixes this call site until
that happens.

Fixes: 351f463456f8 ("timer: allow reset on service cores")
Cc: stable@dpdk.org

Signed-off-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
---
 lib/librte_timer/rte_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c
index 604ecab..4bbcd06 100644
--- a/lib/librte_timer/rte_timer.c
+++ b/lib/librte_timer/rte_timer.c
@@ -403,7 +403,7 @@ rte_timer_reset(struct rte_timer *tim, uint64_t ticks,
 
 	if (unlikely((tim_lcore != (unsigned)LCORE_ID_ANY) &&
 			!(rte_lcore_is_enabled(tim_lcore) ||
-				rte_lcore_has_role(tim_lcore, ROLE_SERVICE))))
+			  rte_lcore_has_role(tim_lcore, ROLE_SERVICE) == 0)))
 		return -1;
 
 	if (type == PERIODICAL)
-- 
2.6.4

             reply	other threads:[~2018-01-12 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 21:31 Erik Gabriel Carrillo [this message]
2018-01-13  5:06 ` Pavan Nikhilesh
2018-01-16  0:49   ` 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=1515792665-6890-1-git-send-email-erik.g.carrillo@intel.com \
    --to=erik.g.carrillo@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    --cc=rsanford@akamai.com \
    --cc=stable@dpdk.org \
    /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).