DPDK patches and discussions
 help / color / mirror / Atom feed
From: Remi Pommarel <repk@triplefau.lt>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] eal/common: Fix enabled core number with core list argument
Date: Tue, 20 Jan 2015 19:54:43 +0100
Message-ID: <1421780083-4923-1-git-send-email-repk@triplefau.lt> (raw)

When using core list argument to define which core to enable (ie -l) the
core_num field of the rte configuration is not updated the same way as using
coremask. This causes rte_lcore_num() to yield different value from the one
using coremask.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
 lib/librte_eal/common/eal_common_options.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index e2810ab..67e02dc 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -268,6 +268,9 @@ eal_parse_corelist(const char *corelist)
 	if (count == 0)
 		return -1;
 
+	/* Update the count of enabled logical cores of the EAL configuration */
+	cfg->lcore_count = count;
+
 	lcores_parsed = 1;
 	return 0;
 }
-- 
2.0.1

             reply	other threads:[~2015-01-20 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 18:54 Remi Pommarel [this message]
2015-01-27 11:45 ` 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=1421780083-4923-1-git-send-email-repk@triplefau.lt \
    --to=repk@triplefau.lt \
    --cc=dev@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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git