DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Pattan, Reshma" <reshma.pattan@intel.com>
To: "Varghese, Vipin" <vipin.varghese@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Mcnamara, John" <john.mcnamara@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/pdump: check for ports
Date: Mon, 26 Feb 2018 11:02:26 +0000	[thread overview]
Message-ID: <3AEA2BF9852C6F48A459DA490692831F2A2A4011@irsmsx110.ger.corp.intel.com> (raw)
In-Reply-To: <1519662622-10011-1-git-send-email-vipin.varghese@intel.com>



> -----Original Message-----
> From: Varghese, Vipin
> Sent: Monday, February 26, 2018 4:30 PM
> To: dev@dpdk.org; Pattan, Reshma <reshma.pattan@intel.com>
> Cc: Mcnamara, John <john.mcnamara@intel.com>; Varghese, Vipin
> <vipin.varghese@intel.com>
> Subject: [PATCH] app/pdump: check for ports
> 
> In case of application build with shared library mode unless option '-d' is
> passed, poll mode driver for devices is not initialized. Notifying the user just
> after rte_eal_init is pro active way of intimating the user.
> 
> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
> ---
>  app/pdump/main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/app/pdump/main.c b/app/pdump/main.c index f6865bd..4242a19
> 100644
> --- a/app/pdump/main.c
> +++ b/app/pdump/main.c
> @@ -863,6 +863,9 @@ struct parse_val {
>  	if (diag < 0)
>  		rte_panic("Cannot init EAL\n");
> 
> +	if (rte_eth_dev_count() == 0)
> +		rte_exit(EXIT_FAILURE, "Failed to fetch ports for PDUMP!\n");
> +

Good one, can you just change the failure log to rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n"); 
As, I see most of the other examples and apps do use the similar check and log as above. :-)

Thanks,
Reshma

  parent reply	other threads:[~2018-02-26 11:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 16:30 Vipin Varghese
2018-02-26  6:22 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
2018-02-28 11:04   ` Pattan, Reshma
2018-04-22 23:13     ` Thomas Monjalon
2018-02-26 11:02 ` Pattan, Reshma [this message]
2018-02-26 11:48   ` [dpdk-dev] [PATCH] " Varghese, Vipin

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=3AEA2BF9852C6F48A459DA490692831F2A2A4011@irsmsx110.ger.corp.intel.com \
    --to=reshma.pattan@intel.com \
    --cc=dev@dpdk.org \
    --cc=john.mcnamara@intel.com \
    --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 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).