DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr
@ 2014-06-19 15:35 Pablo de Lara
  2014-06-19 15:51 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2014-06-19 15:35 UTC (permalink / raw)
  To: dev

From: Pablo de Lara <pablo.de.lara.guarch@intel.com>

When parsing EAL option --base-virtaddr
errno was not being set to 0 before calling strtoull,
therefore function might fail unnecesarily.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 lib/librte_eal/linuxapp/eal/eal.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 6994303..d204387 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -562,6 +562,7 @@ eal_parse_base_virtaddr(const char *arg)
 	char *end;
 	uint64_t addr;
 
+	errno = 0;
 	addr = strtoull(arg, &end, 16);
 
 	/* check for errors */
-- 
1.7.0.7

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr
  2014-06-19 15:35 [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr Pablo de Lara
@ 2014-06-19 15:51 ` Burakov, Anatoly
  2014-06-19 15:59   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2014-06-19 15:51 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Thursday, June 19, 2014 4:35 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr
> 
> From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> When parsing EAL option --base-virtaddr
> errno was not being set to 0 before calling strtoull, therefore function might
> fail unnecesarily.
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  lib/librte_eal/linuxapp/eal/eal.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
> index 6994303..d204387 100644
> --- a/lib/librte_eal/linuxapp/eal/eal.c
> +++ b/lib/librte_eal/linuxapp/eal/eal.c
> @@ -562,6 +562,7 @@ eal_parse_base_virtaddr(const char *arg)
>  	char *end;
>  	uint64_t addr;
> 
> +	errno = 0;
>  	addr = strtoull(arg, &end, 16);
> 
>  	/* check for errors */
> --
> 1.7.0.7

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Best regards,
Anatoly Burakov
DPDK SW Engineer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr
  2014-06-19 15:51 ` Burakov, Anatoly
@ 2014-06-19 15:59   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2014-06-19 15:59 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, Aaron Campbell; +Cc: dev

> > When parsing EAL option --base-virtaddr
> > errno was not being set to 0 before calling strtoull, therefore function
> > might fail unnecesarily.
> > 
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Signed-off-by: Aaron Campbell <aaron@arbor.net>
Whaoh! We received same patch from 2 guys in few minutes!

Applied for version 1.7.0.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-06-19 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-19 15:35 [dpdk-dev] [PATCH] eal: Fixed EAL option --base-virtaddr Pablo de Lara
2014-06-19 15:51 ` Burakov, Anatoly
2014-06-19 15:59   ` Thomas Monjalon

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).