From: Stephen Hemminger <stephen@networkplumber.org>
To: Reshma Pattan <reshma.pattan@intel.com>
Cc: dev@dpdk.org, ferruh.yigit@intel.com, vipin.varghese@intel.com,
stable@dpdk.org
Subject: Re: [PATCH] app/pdump: check lcore is not the maximum core
Date: Fri, 18 Feb 2022 08:27:23 -0800 [thread overview]
Message-ID: <20220218082723.051106b5@hermes.local> (raw)
In-Reply-To: <20220218151841.116135-1-reshma.pattan@intel.com>
On Fri, 18 Feb 2022 15:18:41 +0000
Reshma Pattan <reshma.pattan@intel.com> wrote:
> lcore_id = rte_get_next_lcore(lcore_id, 1, 0);
> + if (lcore_id == RTE_MAX_LCORE) {
> + printf("Invalid core %u for the packet capture!\n", lcore_id);
> + return;
> + }
Since nothing useful can be done, maybe rte_exit()?
Or at least print to stderr and return error status.
Also, if you write same code in two places, it should
be a function.
next prev parent reply other threads:[~2022-02-18 16:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 15:18 [PATCH] app/pdump: check lcore is not the maximum core Reshma Pattan
2022-02-18 16:27 ` Stephen Hemminger [this message]
2022-02-21 10:19 ` [PATCH v2] " Reshma Pattan
2022-02-22 11:02 ` [PATCH v3] " Reshma Pattan
2022-02-25 9:59 ` Pattan, Reshma
2022-02-25 17:34 ` Stephen Hemminger
2022-02-28 9:58 ` [PATCH v4] " Reshma Pattan
2022-02-28 17:09 ` Stephen Hemminger
2022-03-08 13:47 ` Mcnamara, John
2022-03-08 14:27 ` Thomas Monjalon
2022-03-08 15:03 ` Mcnamara, John
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=20220218082723.051106b5@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=reshma.pattan@intel.com \
--cc=stable@dpdk.org \
--cc=vipin.varghese@intel.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.