Skip to content

Commit

Permalink
app/eventdev: fix lcore parsing skipping last core
Browse files Browse the repository at this point in the history
[ upstream commit ca90f20 ]

The last lcore declared in the list is also a valid lcore in the list.

Fixes: 32d7dbf ("app/eventdev: fix overflow in lcore list parsing")

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
  • Loading branch information
PavanNikhilesh authored and steevenlee committed Jun 8, 2021
1 parent d4138b5 commit d8351b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test-eventdev/parser.c
Expand Up @@ -345,7 +345,7 @@ parse_lcores_list(bool lcores[], int lcores_num, const char *corelist)
max = idx;
if (min == RTE_MAX_LCORE)
min = idx;
for (idx = min; idx < max; idx++) {
for (idx = min; idx <= max; idx++) {
if (lcores[idx] == 1)
return -E2BIG;
lcores[idx] = 1;
Expand Down

0 comments on commit d8351b6

Please sign in to comment.