From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: Re: [PATCH 3/8] passt.h: Include netinet/if_ether.h before struct ctx declaration Date: Fri, 07 Oct 2022 17:23:30 +1100 Message-ID: In-Reply-To: <20221007004742.1188933-4-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6687495942817566518==" --===============6687495942817566518== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Fri, Oct 07, 2022 at 02:47:37AM +0200, Stefano Brivio wrote: > This saves some hassle when including passt.h, as we need ETH_ALEN > there. > > Signed-off-by: Stefano Brivio Hrm. So I had the impression that passt was using the convention that it's the top level files responsibility to include all the dependencies for a header before including the header, rather than having headers include other headers they need. Was I mistaken? I'm ok with either model, they each have their advantages, but I find sticking to one or the other is generally better than a mix of both. That is, it would be helpful to me for you to clarify the policy, but for this specific patch Reviewed-by: David Gibson > --- > passt.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/passt.h b/passt.h > index 48e1096..de79e7b 100644 > --- a/passt.h > +++ b/passt.h > @@ -133,6 +133,8 @@ struct ip6_ctx { > struct in6_addr dns_fwd; > }; > > +#include > + > /** > * struct ctx - Execution context > * @mode: Operation mode, qemu/UNIX domain socket or namespace/tap -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --===============6687495942817566518== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KCmlRSXpCQUVCQ0FBZEZpRUVvVUx4V3U0L1dz MGRCK1h0Z3lwWTRnRXdZU0lGQW1NL3hkc0FDZ2tRZ3lwWTRnRXcKWVNJcUpnLy9jSkdrKzMxSTVp Uk5CRkpQU0ExWGVXMktkOE85T1lPVXIxa3RMRGlnRG1WZEU0d3k4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