From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202410 header.b=Hp0zhDcx; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id C200F5A004E for ; Thu, 31 Oct 2024 01:37:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730335068; bh=MEyyQywNWJ24dEsQfbWQt0L5wlIDSaKKih+BRSz98I4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hp0zhDcxjvAJW0X8fWyfYKB4Gza6Cktyn/ienmoEpDuuR+7IozU3onK63s3fOMeZ6 H0Y5ZwM9EdbxetKXoz7APOomHkJvoG/KAX8dSbGp1oq9XGiLbMRBQEIuC5EMLvvgSf aNL+sK+puUc8UO2GXAxbAhQA3kPM/k2ajn/wHv036jLs5cNVIV/DsuUCOBVl+3hnE4 X5fQ9qZVOCw/1fxaLwuncUOqoiMm0YYWPkjLHVafMZy6Io81TuOBUmvX9hDAKRhSbJ Xkp6S9NWLqIMhd37e/rXNh1w0uFtxhalMmkgXZd3UuR15OanJHobe1MTHB2UgNLCSi rUIgJ3suYR+QQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Xf4pN3c1yz4xNG; Thu, 31 Oct 2024 11:37:48 +1100 (AEDT) Date: Thu, 31 Oct 2024 11:34:38 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] tcp: Fix build against musl, __sum16 comes from linux/types.h Message-ID: References: <20241030205010.325338-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UfnfuPMPLVP0OEgW" Content-Disposition: inline In-Reply-To: <20241030205010.325338-1-sbrivio@redhat.com> Message-ID-Hash: JAH57RUF2EEA65WGJJRA5CWW27YMIPAR X-Message-ID-Hash: JAH57RUF2EEA65WGJJRA5CWW27YMIPAR X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier , omni X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --UfnfuPMPLVP0OEgW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 30, 2024 at 09:50:10PM +0100, Stefano Brivio wrote: > ...so we need to include that header explicitly. For some reason, it > works without it when building against glibc. Presumably because glibc indirectly imports linux/types.h at some point. But, I think there's a better way to fix this. We use __sum16 because it's the type of the checksum field in the linux/tcp.h version of struct tcphdr. But we've recently changed to using the netinet/tcp.h version, which just uses a plain uint16_t. We should change to match, and this will go away. >=20 > Reported-by: omni > Fixes: 3d484aa37090 ("tcp: Update TCP checksum using an iovec array") > Signed-off-by: Stefano Brivio > --- > tcp.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/tcp.c b/tcp.c > index 4e0a17e..429634a 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -287,6 +287,8 @@ > #include > #include > =20 > +#include /* For __sum16 */ > + > #include "checksum.h" > #include "util.h" > #include "iov.h" --=20 David Gibson (he or they) | 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 --UfnfuPMPLVP0OEgW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmci0J0ACgkQzQJF27ox 2Gdfzg/8CFY63jwbRvM/xF5c3wwnvRx0wSQwgxapqcFKF617znUtzZ3EJIEJ3z52 j9JqAehFq2YNCtZv1v+Cl7cWwDVEt4IW4Y4EqGQcYgCGueD0auLPXSFiFPpfenad TQamDO1C0r9Shjn0ykTLh0rtQJHH4KiS684+w/gcOWcPb/2utb//PgPC6o2zx/dw BTKkZkxqh257YHe63x2QAqLZdqkjDIvhZvyZQ4yKY3UVfDj5tgZr9V4PN4uwT+eK g5U7HmCuRR24qra7KNv4wEPmBkh0psTyTkjdUeXnD0fLiJBVjWa7f9BkhrxGmpYK paJ9ektPuOW2EFe+3uKhYVv3P+azz5+HYfsdX8vsfXLIKbmenAm3CohYU1VoqflE K+iIl/Q5mhKRR7XLt2rZtfq/ZJjkkgun5gwf9Og/ntJFjbrqKzwPbtyjV2eCKebt Bk06jnSKJwfI+RNRsgoWJPoSqRrl69C8EV8JLygqCdnghwXJMs0e3EOGNnWSAYoI twjpLGOnV7XOw2iCgXHY/anMZO5CGut7NB01TkLZKT3Kahz/bGYoctEUaAtnh/W9 et+D4Y6AdPqV1vxiByZYw8XHlxlUegHjzi/o2CNilzPHgMijNjGLCMvDLRIq3VKY xNdeXlp4CWeYrSDxDM2fzNLQQ2AgMB7zgK42Le+YBhxNRpavBeU= =pJJ1 -----END PGP SIGNATURE----- --UfnfuPMPLVP0OEgW--