DPDK patches and discussions
 help / color / mirror / Atom feed
From: fengchengwen <fengchengwen@huawei.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
	<usman.tanveer@emumba.com>, <reshma.pattan@intel.com>
Cc: <dev@dpdk.org>
Subject: Re: [PATCH v2] app/pdump: exit if no device specified
Date: Mon, 3 Jul 2023 14:29:20 +0800	[thread overview]
Message-ID: <d096a9f6-03bc-1139-5564-69e12ce8ce3b@huawei.com> (raw)
In-Reply-To: <20230701021611.8269-1-stephen@networkplumber.org>

Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2023/7/1 10:16, Stephen Hemminger wrote:
> Simpler version of earlier patch which had a good idea, was just
> implemented with more code than necessary.
> If no device is specified don't start the capture loop.
> 
> Reported-by: usman.tanveer <usman.tanveer@emumba.com>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>  app/pdump/main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/app/pdump/main.c b/app/pdump/main.c
> index c94606275b28..7a1c7bdf6011 100644
> --- a/app/pdump/main.c
> +++ b/app/pdump/main.c
> @@ -915,6 +915,9 @@ dump_packets(void)
>  	int i;
>  	unsigned int lcore_id = 0;
>  
> +	if (num_tuples == 0)
> +		rte_exit(EXIT_FAILURE, "No device specified for capture\n");
> +
>  	if (!multiple_core_capture) {
>  		printf(" core (%u), capture for (%d) tuples\n",
>  				rte_lcore_id(), num_tuples);
> 

  reply	other threads:[~2023-07-03  6:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02  9:26 [PATCH] app/pdump: close program if --pdump argument is missing usman.tanveer
2022-03-02 16:52 ` Stephen Hemminger
2022-03-31 12:59   ` Usman Tanveer
2023-07-01  2:16 ` [PATCH v2] app/pdump: exit if no device specified Stephen Hemminger
2023-07-03  6:29   ` fengchengwen [this message]
2023-07-06 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=d096a9f6-03bc-1139-5564-69e12ce8ce3b@huawei.com \
    --to=fengchengwen@huawei.com \
    --cc=dev@dpdk.org \
    --cc=reshma.pattan@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=usman.tanveer@emumba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).