DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
@ 2015-09-26 13:09 Christoph Gysin
  2015-09-29  6:24 ` David Marchand
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Gysin @ 2015-09-26 13:09 UTC (permalink / raw)
  To: dev

'virtual' is a keyword and can't be used if the code is to compile with
C++ compilers.

If rte_devargs.h was included in C++ code, compilation with clang++
failed with an error. g++ did not fail, but only because of a bug
that treats it as an anonymous struct with a decl-specifier which it
ignores.

This simply renames the member to 'virt'.
---
 app/test/test_devargs.c                     | 4 ++--
 lib/librte_eal/common/eal_common_dev.c      | 4 ++--
 lib/librte_eal/common/eal_common_devargs.c  | 8 ++++----
 lib/librte_eal/common/include/rte_devargs.h | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index f7fc59c..049f32d 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -91,8 +91,8 @@ test_devargs(void)
 	if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
 		goto fail;
 	devargs = TAILQ_FIRST(&devargs_list);
-	if (strncmp(devargs->virtual.drv_name, "eth_ring1",
-			sizeof(devargs->virtual.drv_name)) != 0)
+	if (strncmp(devargs->virt.drv_name, "eth_ring1",
+			sizeof(devargs->virt.drv_name)) != 0)
 		goto fail;
 	if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
 		goto fail;
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 4089d66..a8a4146 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -107,10 +107,10 @@ rte_eal_dev_init(void)
 		if (devargs->type != RTE_DEVTYPE_VIRTUAL)
 			continue;
 
-		if (rte_eal_vdev_init(devargs->virtual.drv_name,
+		if (rte_eal_vdev_init(devargs->virt.drv_name,
 					devargs->args)) {
 			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-					devargs->virtual.drv_name);
+					devargs->virt.drv_name);
 			return -1;
 		}
 	}
diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index ec56165..5d075d0 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -107,9 +107,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)
 		break;
 	case RTE_DEVTYPE_VIRTUAL:
 		/* save driver name */
-		ret = snprintf(devargs->virtual.drv_name,
-			       sizeof(devargs->virtual.drv_name), "%s", buf);
-		if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))
+		ret = snprintf(devargs->virt.drv_name,
+			       sizeof(devargs->virt.drv_name), "%s", buf);
+		if (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))
 			goto fail;
 
 		break;
@@ -169,7 +169,7 @@ rte_eal_devargs_dump(FILE *f)
 			       devargs->args);
 		else if (devargs->type == RTE_DEVTYPE_VIRTUAL)
 			fprintf(f, "  VIRTUAL %s %s\n",
-			       devargs->virtual.drv_name,
+			       devargs->virt.drv_name,
 			       devargs->args);
 		else
 			fprintf(f, "  UNKNOWN %s\n", devargs->args);
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 7084ae2..53c59f5 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -86,7 +86,7 @@ struct rte_devargs {
 		struct {
 			/** Driver name. */
 			char drv_name[32];
-		} virtual;
+		} virt;
 	};
 	/** Arguments string as given by user or "" for no argument. */
 	char *args;
-- 
2.5.3

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-09-26 13:09 [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual) Christoph Gysin
@ 2015-09-29  6:24 ` David Marchand
  2015-09-29  6:53   ` Christoph Gysin
  0 siblings, 1 reply; 11+ messages in thread
From: David Marchand @ 2015-09-29  6:24 UTC (permalink / raw)
  To: Christoph Gysin; +Cc: dev

Hello Christoph,

On Sat, Sep 26, 2015 at 3:09 PM, Christoph Gysin <christoph.gysin@gmail.com>
wrote:

> 'virtual' is a keyword and can't be used if the code is to compile with
> C++ compilers.
>
> If rte_devargs.h was included in C++ code, compilation with clang++
> failed with an error. g++ did not fail, but only because of a bug
> that treats it as an anonymous struct with a decl-specifier which it
> ignores.
>
> This simply renames the member to 'virt'.
>

Ack with your signed-off.

-- 
David Marchand

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

* [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-09-29  6:24 ` David Marchand
@ 2015-09-29  6:53   ` Christoph Gysin
  2015-10-03 10:14     ` Christoph Gysin
  2015-10-05  9:44     ` Dumitrescu, Cristian
  0 siblings, 2 replies; 11+ messages in thread
From: Christoph Gysin @ 2015-09-29  6:53 UTC (permalink / raw)
  To: dev

'virtual' is a keyword and can't be used if the code is to compile with
C++ compilers.

If rte_devargs.h was included in C++ code, compilation with clang++
failed with an error. g++ did not fail, but only because of a bug
that treats it as an anonymous struct with a decl-specifier which it
ignores.

This simply renames the member to 'virt'.

Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com>
---
 app/test/test_devargs.c                     | 4 ++--
 lib/librte_eal/common/eal_common_dev.c      | 4 ++--
 lib/librte_eal/common/eal_common_devargs.c  | 8 ++++----
 lib/librte_eal/common/include/rte_devargs.h | 2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
index f7fc59c..049f32d 100644
--- a/app/test/test_devargs.c
+++ b/app/test/test_devargs.c
@@ -91,8 +91,8 @@ test_devargs(void)
 	if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
 		goto fail;
 	devargs = TAILQ_FIRST(&devargs_list);
-	if (strncmp(devargs->virtual.drv_name, "eth_ring1",
-			sizeof(devargs->virtual.drv_name)) != 0)
+	if (strncmp(devargs->virt.drv_name, "eth_ring1",
+			sizeof(devargs->virt.drv_name)) != 0)
 		goto fail;
 	if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
 		goto fail;
diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 4089d66..a8a4146 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -107,10 +107,10 @@ rte_eal_dev_init(void)
 		if (devargs->type != RTE_DEVTYPE_VIRTUAL)
 			continue;
 
-		if (rte_eal_vdev_init(devargs->virtual.drv_name,
+		if (rte_eal_vdev_init(devargs->virt.drv_name,
 					devargs->args)) {
 			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-					devargs->virtual.drv_name);
+					devargs->virt.drv_name);
 			return -1;
 		}
 	}
diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index ec56165..5d075d0 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -107,9 +107,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)
 		break;
 	case RTE_DEVTYPE_VIRTUAL:
 		/* save driver name */
-		ret = snprintf(devargs->virtual.drv_name,
-			       sizeof(devargs->virtual.drv_name), "%s", buf);
-		if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))
+		ret = snprintf(devargs->virt.drv_name,
+			       sizeof(devargs->virt.drv_name), "%s", buf);
+		if (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))
 			goto fail;
 
 		break;
@@ -169,7 +169,7 @@ rte_eal_devargs_dump(FILE *f)
 			       devargs->args);
 		else if (devargs->type == RTE_DEVTYPE_VIRTUAL)
 			fprintf(f, "  VIRTUAL %s %s\n",
-			       devargs->virtual.drv_name,
+			       devargs->virt.drv_name,
 			       devargs->args);
 		else
 			fprintf(f, "  UNKNOWN %s\n", devargs->args);
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 7084ae2..53c59f5 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -86,7 +86,7 @@ struct rte_devargs {
 		struct {
 			/** Driver name. */
 			char drv_name[32];
-		} virtual;
+		} virt;
 	};
 	/** Arguments string as given by user or "" for no argument. */
 	char *args;
-- 
2.5.3

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-09-29  6:53   ` Christoph Gysin
@ 2015-10-03 10:14     ` Christoph Gysin
  2015-10-05  9:44     ` Dumitrescu, Cristian
  1 sibling, 0 replies; 11+ messages in thread
From: Christoph Gysin @ 2015-10-03 10:14 UTC (permalink / raw)
  To: dev

I added the Signed-off, is there anything else missing?

Any chance to get this merged?

On Tue, Sep 29, 2015 at 9:53 AM, Christoph Gysin
<christoph.gysin@gmail.com> wrote:
> 'virtual' is a keyword and can't be used if the code is to compile with
> C++ compilers.
>
> If rte_devargs.h was included in C++ code, compilation with clang++
> failed with an error. g++ did not fail, but only because of a bug
> that treats it as an anonymous struct with a decl-specifier which it
> ignores.
>
> This simply renames the member to 'virt'.
>
> Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com>
> ---
>  app/test/test_devargs.c                     | 4 ++--
>  lib/librte_eal/common/eal_common_dev.c      | 4 ++--
>  lib/librte_eal/common/eal_common_devargs.c  | 8 ++++----
>  lib/librte_eal/common/include/rte_devargs.h | 2 +-
>  4 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/app/test/test_devargs.c b/app/test/test_devargs.c
> index f7fc59c..049f32d 100644
> --- a/app/test/test_devargs.c
> +++ b/app/test/test_devargs.c
> @@ -91,8 +91,8 @@ test_devargs(void)
>         if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "eth_ring1,k1=val,k2=val2") < 0)
>                 goto fail;
>         devargs = TAILQ_FIRST(&devargs_list);
> -       if (strncmp(devargs->virtual.drv_name, "eth_ring1",
> -                       sizeof(devargs->virtual.drv_name)) != 0)
> +       if (strncmp(devargs->virt.drv_name, "eth_ring1",
> +                       sizeof(devargs->virt.drv_name)) != 0)
>                 goto fail;
>         if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0)
>                 goto fail;
> diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
> index 4089d66..a8a4146 100644
> --- a/lib/librte_eal/common/eal_common_dev.c
> +++ b/lib/librte_eal/common/eal_common_dev.c
> @@ -107,10 +107,10 @@ rte_eal_dev_init(void)
>                 if (devargs->type != RTE_DEVTYPE_VIRTUAL)
>                         continue;
>
> -               if (rte_eal_vdev_init(devargs->virtual.drv_name,
> +               if (rte_eal_vdev_init(devargs->virt.drv_name,
>                                         devargs->args)) {
>                         RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
> -                                       devargs->virtual.drv_name);
> +                                       devargs->virt.drv_name);
>                         return -1;
>                 }
>         }
> diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
> index ec56165..5d075d0 100644
> --- a/lib/librte_eal/common/eal_common_devargs.c
> +++ b/lib/librte_eal/common/eal_common_devargs.c
> @@ -107,9 +107,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)
>                 break;
>         case RTE_DEVTYPE_VIRTUAL:
>                 /* save driver name */
> -               ret = snprintf(devargs->virtual.drv_name,
> -                              sizeof(devargs->virtual.drv_name), "%s", buf);
> -               if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))
> +               ret = snprintf(devargs->virt.drv_name,
> +                              sizeof(devargs->virt.drv_name), "%s", buf);
> +               if (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))
>                         goto fail;
>
>                 break;
> @@ -169,7 +169,7 @@ rte_eal_devargs_dump(FILE *f)
>                                devargs->args);
>                 else if (devargs->type == RTE_DEVTYPE_VIRTUAL)
>                         fprintf(f, "  VIRTUAL %s %s\n",
> -                              devargs->virtual.drv_name,
> +                              devargs->virt.drv_name,
>                                devargs->args);
>                 else
>                         fprintf(f, "  UNKNOWN %s\n", devargs->args);
> diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
> index 7084ae2..53c59f5 100644
> --- a/lib/librte_eal/common/include/rte_devargs.h
> +++ b/lib/librte_eal/common/include/rte_devargs.h
> @@ -86,7 +86,7 @@ struct rte_devargs {
>                 struct {
>                         /** Driver name. */
>                         char drv_name[32];
> -               } virtual;
> +               } virt;
>         };
>         /** Arguments string as given by user or "" for no argument. */
>         char *args;
> --
> 2.5.3
>



-- 
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-09-29  6:53   ` Christoph Gysin
  2015-10-03 10:14     ` Christoph Gysin
@ 2015-10-05  9:44     ` Dumitrescu, Cristian
  2015-10-13  9:10       ` Christoph Gysin
  1 sibling, 1 reply; 11+ messages in thread
From: Dumitrescu, Cristian @ 2015-10-05  9:44 UTC (permalink / raw)
  To: Christoph Gysin, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Christoph Gysin
> Sent: Tuesday, September 29, 2015 7:53 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
> 
> 'virtual' is a keyword and can't be used if the code is to compile with
> C++ compilers.
> 
> If rte_devargs.h was included in C++ code, compilation with clang++
> failed with an error. g++ did not fail, but only because of a bug
> that treats it as an anonymous struct with a decl-specifier which it
> ignores.
> 
> This simply renames the member to 'virt'.
> 
> Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com>
> ---

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Christoph, please also copy David Marchand for further updates of this patch, as David is the maintainer of this component. Whenever in doubt about the maintainer, you can check file MAINTAINERS from DPDK root folder.

Regards,
Cristian

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-10-05  9:44     ` Dumitrescu, Cristian
@ 2015-10-13  9:10       ` Christoph Gysin
  2015-10-13  9:13         ` David Marchand
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Gysin @ 2015-10-13  9:10 UTC (permalink / raw)
  To: David Marchand; +Cc: dev

Hi David

Is there anything I can do to help getting this merged?

Thanks,
Chris

On Mon, Oct 5, 2015 at 12:44 PM, Dumitrescu, Cristian
<cristian.dumitrescu@intel.com> wrote:
>
>
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Christoph Gysin
>> Sent: Tuesday, September 29, 2015 7:53 AM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
>>
>> 'virtual' is a keyword and can't be used if the code is to compile with
>> C++ compilers.
>>
>> If rte_devargs.h was included in C++ code, compilation with clang++
>> failed with an error. g++ did not fail, but only because of a bug
>> that treats it as an anonymous struct with a decl-specifier which it
>> ignores.
>>
>> This simply renames the member to 'virt'.
>>
>> Signed-off-by: Christoph Gysin <christoph.gysin@gmail.com>
>> ---
>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>
> Christoph, please also copy David Marchand for further updates of this patch, as David is the maintainer of this component. Whenever in doubt about the maintainer, you can check file MAINTAINERS from DPDK root folder.
>
> Regards,
> Cristian
>



-- 
echo mailto: NOSPAM !#$.'<*>'|sed 's. ..'|tr "<*> !#:2" org@fr33z3

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-10-13  9:10       ` Christoph Gysin
@ 2015-10-13  9:13         ` David Marchand
  2015-10-13 12:23           ` David Marchand
  0 siblings, 1 reply; 11+ messages in thread
From: David Marchand @ 2015-10-13  9:13 UTC (permalink / raw)
  To: Christoph Gysin; +Cc: dev

Hello Christoph,

On Tue, Oct 13, 2015 at 11:10 AM, Christoph Gysin <christoph.gysin@gmail.com
> wrote:

>
> Is there anything I can do to help getting this merged?
>

This is ok for me, cc-ing Thomas.


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-10-13  9:13         ` David Marchand
@ 2015-10-13 12:23           ` David Marchand
  2015-10-22 15:52             ` Thomas Monjalon
  0 siblings, 1 reply; 11+ messages in thread
From: David Marchand @ 2015-10-13 12:23 UTC (permalink / raw)
  To: Christoph Gysin; +Cc: dev

On Tue, Oct 13, 2015 at 11:13 AM, David Marchand <david.marchand@6wind.com>
wrote:

> Hello Christoph,
>
> On Tue, Oct 13, 2015 at 11:10 AM, Christoph Gysin <
> christoph.gysin@gmail.com> wrote:
>
>>
>> Is there anything I can do to help getting this merged?
>>
>
> This is ok for me, cc-ing Thomas.
>

Thought I already did, but just in case,
Acked-by: David Marchand <david.marchand@6wind.com>

-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-10-13 12:23           ` David Marchand
@ 2015-10-22 15:52             ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2015-10-22 15:52 UTC (permalink / raw)
  To: Christoph Gysin; +Cc: dev

2015-10-13 14:23, David Marchand:
> On Tue, Oct 13, 2015 at 11:13 AM, David Marchand <david.marchand@6wind.com>
> > christoph.gysin@gmail.com> wrote:
> >> Is there anything I can do to help getting this merged?
> >
> > This is ok for me, cc-ing Thomas.
> 
> Thought I already did, but just in case,
> Acked-by: David Marchand <david.marchand@6wind.com>

Applied, thanks
The release notes has been updated to notify the API change.

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

* Re: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
  2015-09-26 13:09 Christoph Gysin
@ 2015-09-28 20:04 ` Dumitrescu, Cristian
  0 siblings, 0 replies; 11+ messages in thread
From: Dumitrescu, Cristian @ 2015-09-28 20:04 UTC (permalink / raw)
  To: Christoph Gysin, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Christoph Gysin
> Sent: Saturday, September 26, 2015 2:10 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
> 
> 'virtual' is a keyword and can't be used if the code is to compile with
> C++ compilers.
> 
> If rte_devargs.h was included in C++ code, compilation with clang++
> failed with an error. g++ did not fail, but only because of a bug
> that treats it as an anonymous struct with a decl-specifier which it
> ignores.
> 
> This simply renames the member to 'virt'.
> ---

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

David, Thomas, are you OK with this change? Thanks, Cristian

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

* [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual)
@ 2015-09-26 13:09 Christoph Gysin
  2015-09-28 20:04 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 11+ messages in thread
From: Christoph Gysin @ 2015-09-26 13:09 UTC (permalink / raw)
  To: dev

'virtual' is a keyword and can't be used if the code is to compile with
C++ compilers.

If rte_devargs.h was included in C++ code, compilation with clang++
failed with an error. g++ did not fail, but only because of a bug
that treats it as an anonymous struct with a decl-specifier which it
ignores.

This simply renames the member to 'virt'.
---
 lib/librte_eal/common/eal_common_dev.c      | 4 ++--
 lib/librte_eal/common/eal_common_devargs.c  | 8 ++++----
 lib/librte_eal/common/include/rte_devargs.h | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 4089d66..a8a4146 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -107,10 +107,10 @@ rte_eal_dev_init(void)
 		if (devargs->type != RTE_DEVTYPE_VIRTUAL)
 			continue;
 
-		if (rte_eal_vdev_init(devargs->virtual.drv_name,
+		if (rte_eal_vdev_init(devargs->virt.drv_name,
 					devargs->args)) {
 			RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
-					devargs->virtual.drv_name);
+					devargs->virt.drv_name);
 			return -1;
 		}
 	}
diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index ec56165..5d075d0 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -107,9 +107,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str)
 		break;
 	case RTE_DEVTYPE_VIRTUAL:
 		/* save driver name */
-		ret = snprintf(devargs->virtual.drv_name,
-			       sizeof(devargs->virtual.drv_name), "%s", buf);
-		if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name))
+		ret = snprintf(devargs->virt.drv_name,
+			       sizeof(devargs->virt.drv_name), "%s", buf);
+		if (ret < 0 || ret >= (int)sizeof(devargs->virt.drv_name))
 			goto fail;
 
 		break;
@@ -169,7 +169,7 @@ rte_eal_devargs_dump(FILE *f)
 			       devargs->args);
 		else if (devargs->type == RTE_DEVTYPE_VIRTUAL)
 			fprintf(f, "  VIRTUAL %s %s\n",
-			       devargs->virtual.drv_name,
+			       devargs->virt.drv_name,
 			       devargs->args);
 		else
 			fprintf(f, "  UNKNOWN %s\n", devargs->args);
diff --git a/lib/librte_eal/common/include/rte_devargs.h b/lib/librte_eal/common/include/rte_devargs.h
index 7084ae2..53c59f5 100644
--- a/lib/librte_eal/common/include/rte_devargs.h
+++ b/lib/librte_eal/common/include/rte_devargs.h
@@ -86,7 +86,7 @@ struct rte_devargs {
 		struct {
 			/** Driver name. */
 			char drv_name[32];
-		} virtual;
+		} virt;
 	};
 	/** Arguments string as given by user or "" for no argument. */
 	char *args;
-- 
2.5.3

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

end of thread, other threads:[~2015-10-22 15:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-26 13:09 [dpdk-dev] [PATCH] eal: fix C++ build (struct member: virtual) Christoph Gysin
2015-09-29  6:24 ` David Marchand
2015-09-29  6:53   ` Christoph Gysin
2015-10-03 10:14     ` Christoph Gysin
2015-10-05  9:44     ` Dumitrescu, Cristian
2015-10-13  9:10       ` Christoph Gysin
2015-10-13  9:13         ` David Marchand
2015-10-13 12:23           ` David Marchand
2015-10-22 15:52             ` Thomas Monjalon
2015-09-26 13:09 Christoph Gysin
2015-09-28 20:04 ` Dumitrescu, Cristian

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