From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 910F0A0C42; Tue, 11 May 2021 10:44:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4FC1410ED; Tue, 11 May 2021 10:44:10 +0200 (CEST) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by mails.dpdk.org (Postfix) with ESMTP id D208F40040 for ; Fri, 7 May 2021 21:13:25 +0200 (CEST) Received: from ovn.org (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id A5908200007; Fri, 7 May 2021 19:13:22 +0000 (UTC) Date: Fri, 7 May 2021 12:13:19 -0700 From: Ben Pfaff To: David Marchand Cc: Dmitry Kozlyuk , dev , Ian Stokes , Kevin Traynor , Olivier Matz , Ranjit Menon , Bruce Richardson Message-ID: References: <20210506151426.28202-1-david.marchand@redhat.com> <20210506151426.28202-3-david.marchand@redhat.com> <20210507012356.216f1f49@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Approved-At: Tue, 11 May 2021 10:44:08 +0200 Subject: Re: [dpdk-dev] [PATCH 2/2] net: fix header include order for FreeBSD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, May 07, 2021 at 12:12:09PM -0700, Ben Pfaff wrote: > On Fri, May 07, 2021 at 11:06:38AM +0200, David Marchand wrote: > > On Fri, May 7, 2021 at 12:24 AM Dmitry Kozlyuk wrote: > > > > > > 2021-05-06 17:14 (UTC+0200), David Marchand: > > > > Spotted by sparse in OVS build: > > > > ../../lib/netdev-dpdk.c: note: in included file (through > > > > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_ip.h, > > > > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h, ...): > > > > ../../include/sparse/arpa/inet.h:22:2: error: "Must include > > > > before for FreeBSD support" > > > > > > > > This is a check enforced by OVS itself. > > > > See [1] for some context. > > > > > > > > 1: https://github.com/openvswitch/ovs/commit/b2befd5bb2db > > > > > > > > Fixes: 89813a522e68 ("net: provide IP-related API on any OS") > > > > > > > > Signed-off-by: David Marchand > > > > --- > > > > lib/net/rte_ip.h | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h > > > > index 8c189009b0..4b728969c1 100644 > > > > --- a/lib/net/rte_ip.h > > > > +++ b/lib/net/rte_ip.h > > > > @@ -22,8 +22,8 @@ > > > > #else > > > > #include > > > > #include > > > > -#include > > > > #include > > > > +#include > > > > #include > > > > #endif > > > > > > > > > > Acked-by: Dmitry Kozlyuk > > > > > > It would be interesting to know exact issue this solves for OVS. > > > Referenced commit only says FreeBSD "insists" on this include order, > > > but DPDK and standalone files with these includes build either way. > > > > Indeed, I tried building with FreeBSD 13.0 and I can see no pb. > > This might be something that has been fixed in FreeBSD. > > > > Ben, would you have details on this header inclusion order? > > Using the wrong order caused a compiler error on whatever version of > FreeBSD was current at the time of those commits. I think it was a > historical BSD issue, since I remember running into this for many years > across multiple BSD versions. > > If it's fixed now, we can drop the constraint. Oh, Mac OS X appears to also have this or a related problem: commit ff6aa424ef1f46d2d1c468940219e187632ec894 Author: Borja Marcos EA2EKH Date: Mon Nov 6 10:32:12 2017 +0100 conntrack: Include before . FreeBSD and Mac OS X require this. Signed-off-by: Ben Pfaff