* [dpdk-dev] [PATCH] app/pdump: check for ports
@ 2018-02-26 16:30 Vipin Varghese
2018-02-26 6:22 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
2018-02-26 11:02 ` [dpdk-dev] [PATCH] " Pattan, Reshma
0 siblings, 2 replies; 6+ messages in thread
From: Vipin Varghese @ 2018-02-26 16:30 UTC (permalink / raw)
To: dev, reshma.pattan; +Cc: john.mcnamara, Vipin Varghese
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");
+
argc -= diag;
argv += (diag - 3);
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [dpdk-dev] [PATCH v2] app/pdump: check for ports
2018-02-26 16:30 [dpdk-dev] [PATCH] app/pdump: check for ports Vipin Varghese
@ 2018-02-26 6:22 ` Vipin Varghese
2018-02-28 11:04 ` Pattan, Reshma
2018-02-26 11:02 ` [dpdk-dev] [PATCH] " Pattan, Reshma
1 sibling, 1 reply; 6+ messages in thread
From: Vipin Varghese @ 2018-02-26 6:22 UTC (permalink / raw)
To: dev, reshma.pattan; +Cc: john.mcnamara, Vipin Varghese
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>
---
Changes in V2:
- updated the exit message - Reshma
---
app/pdump/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app/pdump/main.c b/app/pdump/main.c
index f6865bd..203faa3 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, "No Ethernet ports - bye\n");
+
argc -= diag;
argv += (diag - 3);
--
1.9.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/pdump: check for ports
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
0 siblings, 1 reply; 6+ messages in thread
From: Pattan, Reshma @ 2018-02-28 11:04 UTC (permalink / raw)
To: Varghese, Vipin, dev; +Cc: Mcnamara, John
> -----Original Message-----
> From: Varghese, Vipin
> Sent: Monday, February 26, 2018 6:23 AM
> 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 v2] 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>
> ---
>
> Changes in V2:
> - updated the exit message - Reshma
> ---
> app/pdump/main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/app/pdump/main.c b/app/pdump/main.c index f6865bd..203faa3
> 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, "No Ethernet ports - bye\n");
> +
> argc -= diag;
> argv += (diag - 3);
>
> --
> 1.9.1
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH v2] app/pdump: check for ports
2018-02-28 11:04 ` Pattan, Reshma
@ 2018-04-22 23:13 ` Thomas Monjalon
0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-04-22 23:13 UTC (permalink / raw)
To: Varghese, Vipin; +Cc: dev, Pattan, Reshma, Mcnamara, John
> > 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>
> > ---
> > + if (rte_eth_dev_count() == 0)
> > + rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
Rebased to the new function rte_eth_dev_count_avail.
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] app/pdump: check for ports
2018-02-26 16:30 [dpdk-dev] [PATCH] app/pdump: check for ports Vipin Varghese
2018-02-26 6:22 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
@ 2018-02-26 11:02 ` Pattan, Reshma
2018-02-26 11:48 ` Varghese, Vipin
1 sibling, 1 reply; 6+ messages in thread
From: Pattan, Reshma @ 2018-02-26 11:02 UTC (permalink / raw)
To: Varghese, Vipin, dev; +Cc: Mcnamara, John
> -----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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [dpdk-dev] [PATCH] app/pdump: check for ports
2018-02-26 11:02 ` [dpdk-dev] [PATCH] " Pattan, Reshma
@ 2018-02-26 11:48 ` Varghese, Vipin
0 siblings, 0 replies; 6+ messages in thread
From: Varghese, Vipin @ 2018-02-26 11:48 UTC (permalink / raw)
To: Pattan, Reshma, dev; +Cc: Mcnamara, John
> -----Original Message-----
> From: Pattan, Reshma
> Sent: Monday, February 26, 2018 11:02 AM
> To: Varghese, Vipin <vipin.varghese@intel.com>; dev@dpdk.org
> Cc: Mcnamara, John <john.mcnamara@intel.com>
> Subject: RE: [PATCH] app/pdump: check for ports
>
>
>
> > -----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
> >
<snipped>
> > + 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. :-)
>
Sure, I will send a v2 patch with updated log information.
> Thanks,
> Reshma
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-04-22 23:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-26 16:30 [dpdk-dev] [PATCH] app/pdump: check for ports 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 ` [dpdk-dev] [PATCH] " Pattan, Reshma
2018-02-26 11:48 ` Varghese, Vipin
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).