From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=V3gHACbm; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id A9F735A004C for ; Thu, 31 Oct 2024 07:56:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730357771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HWfkzZbEr1/gbVmFkhy26MiAoPImJP+eBUcLlRsAOGQ=; b=V3gHACbmQ+A+GrTNEQVnZb9X/qFpmqh4KupIedZoVlAZMR1v593nGVgWP2Eeb5bqnZdLBa URL8+AwZCp07xZ0sWu7NDEwIVoFUlYtxzFz7vqBrGVFCCBJ8WNRbvxZVyECLcwWxLsE1lF ZYtzhnWxffuKofemp2yDnpsVPJqz9VQ= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-nWf3LHDvOTqQGBYOnKYsDw-1; Thu, 31 Oct 2024 02:56:09 -0400 X-MC-Unique: nWf3LHDvOTqQGBYOnKYsDw-1 Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-37d5016d21eso300916f8f.3 for ; Wed, 30 Oct 2024 23:56:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730357768; x=1730962568; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HWfkzZbEr1/gbVmFkhy26MiAoPImJP+eBUcLlRsAOGQ=; b=FpyzJlyRmPNxdCFcfv/5YO83j7+2Ma/RT/I7Ql5ADjU1VubLShkFk6xVtGtqd4BmbA crD7q+REW4T5m4oiu2Ou/C1yJja2Pd9i0hu25etXV/d7afFb9cc5wXLZBhRe9tEyGTxZ VtN6skVNLhEXlFtckC8qXNoPLGiwUdZ79UoJKgpumtqJW0+XvjbK3JDHEYrYTl/LqzBo F398PGck0Cv5kXnIJkrCJH3/tM/RjmxflrBL8WPCGB/P6KYUcvuyPvfFVeWlYrdDIFIm QoKSYqOqR5ZW/xmEFqnKJGC60qtSOxYymD7l+/2/Sa+cht5xRxJpFe0mIl/Cps0N8Al9 3O+A== X-Gm-Message-State: AOJu0Yw/CnQWd7aaNiBaWGHiC8TZZiR661ZnCXwO1H4atct7YYsC1H40 2b2g5vzF34YYaxHFmVqF0yMrkSnmGNDUMpWGXOy3fohXNNMK0ne65B9bbJHC4MzC54tx+F/6uSW p/8fvR/vP9Nz+PIe5CuCkHgkiqOo1y/AvLwa3p4FXYzdB5jNr5g== X-Received: by 2002:adf:e84f:0:b0:37d:4956:b0c2 with SMTP id ffacd0b85a97d-3806122f97emr12464378f8f.58.1730357768644; Wed, 30 Oct 2024 23:56:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH62+zGFXUzQwGiMDr47pzrROuGTkiOUdVTNlI/TL7pSquRAoZKy3rO+e7VZsOGqiTaL5bmxg== X-Received: by 2002:adf:e84f:0:b0:37d:4956:b0c2 with SMTP id ffacd0b85a97d-3806122f97emr12464366f8f.58.1730357768271; Wed, 30 Oct 2024 23:56:08 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e8a8sm1106989f8f.72.2024.10.30.23.56.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 23:56:07 -0700 (PDT) Date: Thu, 31 Oct 2024 07:56:06 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] tcp: Fix build against musl, __sum16 comes from linux/types.h Message-ID: <20241031075606.7d89109d@elisabeth> In-Reply-To: References: <20241030205010.325338-1-sbrivio@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: TX37KFV76BW5P7K4PABWPXVJ3SEFXVKE X-Message-ID-Hash: TX37KFV76BW5P7K4PABWPXVJ3SEFXVKE X-MailFrom: sbrivio@redhat.com 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: On Thu, 31 Oct 2024 11:34:38 +1100 David Gibson wrote: > 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. True, but I thought we would want to keep the 'bitwise' attribute that comes with __sum16. On the other hand, I see it's only used by sparse(1), not by gcc itself: https://gcc.gnu.org/legacy-ml/gcc-help/2008-03/msg00267.html so it's rather pointless outside the kernel and we can drop it as well. I'll change checksum pointers to uint16_t *. -- Stefano