All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dai, Wei" <wei.dai@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	"adambynes@outlook.com" <adambynes@outlook.com>,
	"Liang, Cunming" <cunming.liang@intel.com>
Subject: Re: [PATCH v3 4/4] eal: fix end character check in --lcores argument
Date: Tue, 2 Aug 2016 08:22:29 +0000	[thread overview]
Message-ID: <49759EB36A64CF4892C1AFEC9231E8D63A268522@PGSMSX106.gar.corp.intel.com> (raw)
In-Reply-To: <1717702.2SVR8RdYDI@xps13>

Hi, Thomas, Yigit

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Friday, July 29, 2016 12:06 AM
> To: Dai, Wei <wei.dai@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v3 4/4] eal: fix end character check in --lcores
> argument
> 
> 2016-07-28 16:26, Ferruh Yigit:
> > On 7/27/2016 12:27 PM, Wei Dai wrote:
> > > With --lcores 'a-b@c-d', eal_parse_cores() fails because
> > > eal_parse_set() fails due to the next character after lcore set a-b,
> > > which is '@'and not ',' or '\0'.
> > > There is also a right check immediately after this incorrect check.
> > >
> > > Fixes: 53e54bf81700 ("eal: new option --lcores for cpu assignment")
> > >
> > > Signed-off-by: Wei Dai <wei.dai@intel.com>
> >
> > I am not sure if a-b@c-d syntax should be supported. (a-b)@(c-d) is
> > supported and already working.
> 
> Agreed.
> 
> Series applied, except this last patch 4, thanks

Sorry, I can't find any document to clarify whether a-b@c-d shoule be supported.
So I design following case to verify all kinds of combination of - and @. 
I tested my patch with --lcores '0-3@12-15, 4-7@(8-11),  (8-11)@4-7, (12-15)@(0-3), 16-19, (20-23) ',
After calling eal_parse_args(argc, argv),  I observed lcore_config[i].cpuset to check cpuset of each lcore.
I added following codes immediately after calling fctret = eal_parse_args(argc, argv); in function rte_eal_init( )
in eal.c to check this patch.

	{
		struct rte_config *p;
		const char *rte_role_str[2] = {"ROLE_RTE", "ROLE_OFF"};
		p = rte_eal_get_configuration();
		for (i=0; i<28; i++) {
			printf("lcore %2d status = %s,  runs on cpuset = 0x%08lX\n", 
					i, rte_role_str[p->lcore_role[i]], lcore_config[i].cpuset.__bits[0]);
		}
	}

The result is as follow:
lcore  0 status = ROLE_RTE,  runs on cpuset = 0x0000F000
lcore  1 status = ROLE_RTE,  runs on cpuset = 0x0000F000
lcore  2 status = ROLE_RTE,  runs on cpuset = 0x0000F000
lcore  3 status = ROLE_RTE,  runs on cpuset = 0x0000F000
lcore  4 status = ROLE_RTE,  runs on cpuset = 0x00000F00
lcore  5 status = ROLE_RTE,  runs on cpuset = 0x00000F00
lcore  6 status = ROLE_RTE,  runs on cpuset = 0x00000F00
lcore  7 status = ROLE_RTE,  runs on cpuset = 0x00000F00
lcore  8 status = ROLE_RTE,  runs on cpuset = 0x000000F0
lcore  9 status = ROLE_RTE,  runs on cpuset = 0x000000F0
lcore 10 status = ROLE_RTE,  runs on cpuset = 0x000000F0
lcore 11 status = ROLE_RTE,  runs on cpuset = 0x000000F0
lcore 12 status = ROLE_RTE,  runs on cpuset = 0x0000000F
lcore 13 status = ROLE_RTE,  runs on cpuset = 0x0000000F
lcore 14 status = ROLE_RTE,  runs on cpuset = 0x0000000F
lcore 15 status = ROLE_RTE,  runs on cpuset = 0x0000000F
lcore 16 status = ROLE_RTE,  runs on cpuset = 0x00010000
lcore 17 status = ROLE_RTE,  runs on cpuset = 0x00020000
lcore 18 status = ROLE_RTE,  runs on cpuset = 0x00040000
lcore 19 status = ROLE_RTE,  runs on cpuset = 0x00080000
lcore 20 status = ROLE_RTE,  runs on cpuset = 0x00F00000
lcore 21 status = ROLE_RTE,  runs on cpuset = 0x00F00000
lcore 22 status = ROLE_RTE,  runs on cpuset = 0x00F00000
lcore 23 status = ROLE_RTE,  runs on cpuset = 0x00F00000
lcore 24 status = ROLE_OFF,  runs on cpuset = 0x00000000
lcore 25 status = ROLE_OFF,  runs on cpuset = 0x00000000
lcore 26 status = ROLE_OFF,  runs on cpuset = 0x00000000
lcore 27 status = ROLE_OFF,  runs on cpuset = 0x00000000

	

  reply	other threads:[~2016-08-02  8:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  6:03 [PATCH] eal: fix parsing of argument of option --lcores Wei Dai
2016-07-21 14:21 ` Thomas Monjalon
2016-07-21 20:44 ` bynes adam
2016-07-27 10:06   ` Dai, Wei
2016-07-26  9:52 ` [PATCH v2 1/2] eal: remove redundant codes to parse --lcores Wei Dai
2016-07-26 11:51   ` Ananyev, Konstantin
2016-07-26 17:36     ` Adam Bynes
2016-07-27  9:15       ` Dai, Wei
2016-07-27 11:22   ` [PATCH v3 1/4] " Wei Dai
2016-07-28 15:18     ` Ferruh Yigit
2016-07-27 11:25   ` [PATCH v3 3/4] eal: fix tail blank check in --lcores argument Wei Dai
2016-07-28 15:18     ` Ferruh Yigit
2016-07-26  9:52 ` [PATCH v2 2/2] eal: fix parsing of eal option --lcores Wei Dai
2016-07-27 11:23 ` [PATCH v3 2/4] " Wei Dai
2016-07-28 15:18   ` Ferruh Yigit
2016-07-27 11:27 ` [PATCH v3 4/4] eal: fix end character check in --lcores argument Wei Dai
2016-07-28 15:26   ` Ferruh Yigit
2016-07-28 16:05     ` Thomas Monjalon
2016-08-02  8:22       ` Dai, Wei [this message]
2016-08-02 10: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=49759EB36A64CF4892C1AFEC9231E8D63A268522@PGSMSX106.gar.corp.intel.com \
    --to=wei.dai@intel.com \
    --cc=adambynes@outlook.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas.monjalon@6wind.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.