DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
@ 2019-06-05  9:06 David Marchand
  2019-06-05  9:25 ` Thomas Monjalon
  2019-06-05 11:30 ` [dpdk-dev] [PATCH v2] " David Marchand
  0 siblings, 2 replies; 8+ messages in thread
From: David Marchand @ 2019-06-05  9:06 UTC (permalink / raw)
  To: dev; +Cc: thomas, bruce.richardson, Anatoly Burakov

Caught on FreeBSD 12:

/usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
  struct in_addr ip_src,ip_dst; /* source and dest address */
                 ^~~~~~

POSIX defines netinet/in.h as the right header for in_addr.
Linux seems fine without it but let's include it explicitly.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 examples/multi_process/client_server_mp/mp_server/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 9a8e422..b1e8a8c 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -11,6 +11,7 @@
 #include <inttypes.h>
 #include <sys/queue.h>
 #include <errno.h>
+#include <netinet/in.h>
 #include <netinet/ip.h>
 #include <signal.h>
 
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05  9:06 [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD David Marchand
@ 2019-06-05  9:25 ` Thomas Monjalon
  2019-06-05  9:36   ` David Marchand
  2019-06-05 11:30 ` [dpdk-dev] [PATCH v2] " David Marchand
  1 sibling, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2019-06-05  9:25 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, bruce.richardson, Anatoly Burakov

05/06/2019 11:06, David Marchand:
> Caught on FreeBSD 12:
> 
> /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
>   struct in_addr ip_src,ip_dst; /* source and dest address */
>                  ^~~~~~
> 
> POSIX defines netinet/in.h as the right header for in_addr.
> Linux seems fine without it but let's include it explicitly.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Please could you add a "Fixes:" tag with Cc stable?



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

* Re: [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05  9:25 ` Thomas Monjalon
@ 2019-06-05  9:36   ` David Marchand
  2019-06-05  9:52     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: David Marchand @ 2019-06-05  9:36 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson, Anatoly Burakov

On Wed, Jun 5, 2019 at 11:26 AM Thomas Monjalon <thomas@monjalon.net> wrote:

> 05/06/2019 11:06, David Marchand:
> > Caught on FreeBSD 12:
> >
> > /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete
> type
> >   struct in_addr ip_src,ip_dst; /* source and dest address */
> >                  ^~~~~~
> >
> > POSIX defines netinet/in.h as the right header for in_addr.
> > Linux seems fine without it but let's include it explicitly.
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Please could you add a "Fixes:" tag with Cc stable?
>

We did not build the examples before.
Not sure what to tag as the "culprit".
The one that adds FreeBSD support ?


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05  9:36   ` David Marchand
@ 2019-06-05  9:52     ` Thomas Monjalon
  2019-06-05 10:32       ` David Marchand
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2019-06-05  9:52 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, Bruce Richardson, Anatoly Burakov

05/06/2019 11:36, David Marchand:
> On Wed, Jun 5, 2019 at 11:26 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> > 05/06/2019 11:06, David Marchand:
> > > Caught on FreeBSD 12:
> > >
> > > /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete
> > type
> > >   struct in_addr ip_src,ip_dst; /* source and dest address */
> > >                  ^~~~~~
> > >
> > > POSIX defines netinet/in.h as the right header for in_addr.
> > > Linux seems fine without it but let's include it explicitly.
> > >
> > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> >
> > Please could you add a "Fixes:" tag with Cc stable?
> >
> 
> We did not build the examples before.
> Not sure what to tag as the "culprit".
> The one that adds FreeBSD support ?

I was thinking about the patch using in_addr so we can have a meaningful backport.



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

* Re: [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05  9:52     ` Thomas Monjalon
@ 2019-06-05 10:32       ` David Marchand
  0 siblings, 0 replies; 8+ messages in thread
From: David Marchand @ 2019-06-05 10:32 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Bruce Richardson, Anatoly Burakov

On Wed, Jun 5, 2019 at 11:52 AM Thomas Monjalon <thomas@monjalon.net> wrote:

> 05/06/2019 11:36, David Marchand:
> > On Wed, Jun 5, 2019 at 11:26 AM Thomas Monjalon <thomas@monjalon.net>
> wrote:
> >
> > > 05/06/2019 11:06, David Marchand:
> > > > Caught on FreeBSD 12:
> > > >
> > > > /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete
> > > type
> > > >   struct in_addr ip_src,ip_dst; /* source and dest address */
> > > >                  ^~~~~~
> > > >
> > > > POSIX defines netinet/in.h as the right header for in_addr.
> > > > Linux seems fine without it but let's include it explicitly.
> > > >
> > > > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > >
> > > Please could you add a "Fixes:" tag with Cc stable?
> > >
> >
> > We did not build the examples before.
> > Not sure what to tag as the "culprit".
> > The one that adds FreeBSD support ?
>
> I was thinking about the patch using in_addr so we can have a meaningful
> backport.
>

I can't find the reason why this header is included and it goes back to the
initial release.
Removed this header include with a 1.2.3r0 and it builds fine :-)


-- 
David Marchand

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

* [dpdk-dev] [PATCH v2] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05  9:06 [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD David Marchand
  2019-06-05  9:25 ` Thomas Monjalon
@ 2019-06-05 11:30 ` David Marchand
  2019-06-05 12:50   ` Bruce Richardson
  1 sibling, 1 reply; 8+ messages in thread
From: David Marchand @ 2019-06-05 11:30 UTC (permalink / raw)
  To: dev; +Cc: thomas, bruce.richardson, stable, Anatoly Burakov

Caught on FreeBSD 12:

/usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
  struct in_addr ip_src,ip_dst; /* source and dest address */
                 ^~~~~~

On FreeBSD, netinet/ip.h is not auto sufficient like on Linux.
But actually, this header is not used in the example, just remove it.

Fixes: 764bf26873b9 ("add FreeBSD support")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changelog since v1:
- took the opposite approach, rather than fix the netinet/ip.h inclusion,
  dropped it as it is unused
- added Fixes: tag

---
 examples/multi_process/client_server_mp/mp_server/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 9a8e422..0150533 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -11,7 +11,6 @@
 #include <inttypes.h>
 #include <sys/queue.h>
 #include <errno.h>
-#include <netinet/ip.h>
 #include <signal.h>
 
 #include <rte_common.h>
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH v2] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05 11:30 ` [dpdk-dev] [PATCH v2] " David Marchand
@ 2019-06-05 12:50   ` Bruce Richardson
  2019-06-05 13:14     ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2019-06-05 12:50 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, thomas, stable, Anatoly Burakov

On Wed, Jun 05, 2019 at 01:30:26PM +0200, David Marchand wrote:
> Caught on FreeBSD 12:
> 
> /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
>   struct in_addr ip_src,ip_dst; /* source and dest address */
>                  ^~~~~~
> 
> On FreeBSD, netinet/ip.h is not auto sufficient like on Linux.
> But actually, this header is not used in the example, just remove it.
> 
> Fixes: 764bf26873b9 ("add FreeBSD support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Tested-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

This should knock off one of the CI build errors once merged, I hope!
Thanks for doing the patch.

/Bruce

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

* Re: [dpdk-dev] [PATCH v2] examples/multi_process: fix compilation error on FreeBSD
  2019-06-05 12:50   ` Bruce Richardson
@ 2019-06-05 13:14     ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2019-06-05 13:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Bruce Richardson, dev, stable, Anatoly Burakov

05/06/2019 14:50, Bruce Richardson:
> On Wed, Jun 05, 2019 at 01:30:26PM +0200, David Marchand wrote:
> > Caught on FreeBSD 12:
> > 
> > /usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
> >   struct in_addr ip_src,ip_dst; /* source and dest address */
> >                  ^~~~~~
> > 
> > On FreeBSD, netinet/ip.h is not auto sufficient like on Linux.
> > But actually, this header is not used in the example, just remove it.
> > 
> > Fixes: 764bf26873b9 ("add FreeBSD support")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> Tested-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> This should knock off one of the CI build errors once merged, I hope!
> Thanks for doing the patch.

Applied, thanks



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

end of thread, other threads:[~2019-06-05 13:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-05  9:06 [dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD David Marchand
2019-06-05  9:25 ` Thomas Monjalon
2019-06-05  9:36   ` David Marchand
2019-06-05  9:52     ` Thomas Monjalon
2019-06-05 10:32       ` David Marchand
2019-06-05 11:30 ` [dpdk-dev] [PATCH v2] " David Marchand
2019-06-05 12:50   ` Bruce Richardson
2019-06-05 13:14     ` 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).