l2fwd-event: fix lcore allocation in poll mode
diff mbox series

Message ID 20200203044619.3944-1-pbhagavatula@marvell.com
State Accepted
Delegated to: Jerin Jacob
Headers show
Series
  • l2fwd-event: fix lcore allocation in poll mode
Related show

Checks

Context Check Description
ci/Intel-compilation fail apply issues
ci/iol-nxp-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Pavan Nikhilesh Bhagavatula Feb. 3, 2020, 4:46 a.m. UTC
From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Skip master lcore when assigning cores to rx_queues as it is only used
to print stats.

Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
 examples/l2fwd-event/l2fwd_poll.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jerin Jacob Feb. 15, 2020, 8:08 a.m. UTC | #1
On Mon, Feb 3, 2020 at 10:16 AM <pbhagavatula@marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
>
> Skip master lcore when assigning cores to rx_queues as it is only used
> to print stats.
>
> Fixes: 4ff457986f76 ("examples/l2fwd-event: add default poll mode routines")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>

Applied to dpdk-next-eventdev/master. Thanks.



> ---
>  examples/l2fwd-event/l2fwd_poll.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/examples/l2fwd-event/l2fwd_poll.c b/examples/l2fwd-event/l2fwd_poll.c
> index a3a383558..2033c65e5 100644
> --- a/examples/l2fwd-event/l2fwd_poll.c
> +++ b/examples/l2fwd-event/l2fwd_poll.c
> @@ -116,6 +116,7 @@ l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc)
>
>                 /* get the lcore_id for this port */
>                 while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
> +                      rx_lcore_id == rte_get_master_lcore() ||
>                        poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
>                        rsrc->rx_queue_per_lcore) {
>                         rx_lcore_id++;
> --
> 2.17.1
>

Patch
diff mbox series

diff --git a/examples/l2fwd-event/l2fwd_poll.c b/examples/l2fwd-event/l2fwd_poll.c
index a3a383558..2033c65e5 100644
--- a/examples/l2fwd-event/l2fwd_poll.c
+++ b/examples/l2fwd-event/l2fwd_poll.c
@@ -116,6 +116,7 @@  l2fwd_poll_lcore_config(struct l2fwd_resources *rsrc)
 
 		/* get the lcore_id for this port */
 		while (rte_lcore_is_enabled(rx_lcore_id) == 0 ||
+		       rx_lcore_id == rte_get_master_lcore() ||
 		       poll_rsrc->lcore_queue_conf[rx_lcore_id].n_rx_port ==
 		       rsrc->rx_queue_per_lcore) {
 			rx_lcore_id++;