[dpdk-dev] [PATCH v3 4/4] eal: fix end character check in --lcores argument

Ferruh Yigit ferruh.yigit at intel.com
Thu Jul 28 17:26:43 CEST 2016


On 7/27/2016 12:27 PM, Wei Dai wrote:
> With --lcores 'a-b at 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 at intel.com>

I am not sure if a-b at c-d syntax should be supported. (a-b)@(c-d) is
supported and already working.

It looks like a-b is only planned to use without @

and the usage a-b at c-d, like 1-2 at 4-5 implies to me:
1 -> 4
2 -> 5

but it doesn't work that way, it is always grouped after @, like it has
parenthesis, what it does is:
1 -> 4,5
2 -> 4,5

Even a-b at c is not working, but as I said if @ will be used, using
grouping seems more proper to me, like:
(a-b)@(c-d)
(a-b)@c

So this is mainly about defining the syntax, more than implementing it.
Somebody know more about syntax can comment better.

Regards,
ferruh





More information about the dev mailing list