Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp411926rwe; Fri, 26 Aug 2022 07:18:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6bg1RKkOCuAlrpi2jGARMAWTBL7VO+NiYHCAu/R7uDbt+O1BMslunHJkBo8k/4+HDN98Fy X-Received: by 2002:a05:6402:c45:b0:442:c549:8e6b with SMTP id cs5-20020a0564020c4500b00442c5498e6bmr7007985edb.123.1661523491820; Fri, 26 Aug 2022 07:18:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661523491; cv=none; d=google.com; s=arc-20160816; b=cv5K6ncarxkCG2WzSH1hGlsZSf3oTV3JgFqvDHK03+ISjBHE8idMMhqj8UDNy8o7Wv zP+1k1bHYa+3ngNxQ2JsaOFmfEMg9EkaR3gjSxPOiuQFw2JUV6f+8PCJysmvVaNAh21f UqLBdS0/42KCT6fE/yeR0x1+nEGO259D4ECuNG0Y4vLrnuhNy34Jt6v0gAKG1pQ7kJ7i pNwiTuBqhD7WL7xTMoKNs+a9yu0xhcu9wb2OeME4/VP/1I3K2QlQS6lJEwXqsaLjKjvE fzG8naRYZw533Gumc/yQDaI4ZopLP7inzCHOz4ByUn4DF9hA8VslCr9ejiICcpnqAW+y 9Rmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=JpxvSGOb3ufy600g4QrMOLlAGOygRUO3yzmXyPrg5Cs=; b=LU26bckPcWDtTEd1jKYWiao0v+5Ozcv+7OXhGkq322HfgASf0wODE8ul86jV3cp/eo 6XTfOzerkztr/igoxVMTT1BLRocrPBtrUxgSWMrjYjB6Jz1h4B+JJIe/YX5xjXvqEFar 0Uepd+CE3PxIO5xDAJ/TsetBSxYnx5JaYLMmNlmWpX0EK5MQHKe2jhVor/xaO9yCZGz9 8nvEdlNN4swvALBqyK/vLChhxcN/nRWZJkfercbGrUcRRZ/korySwHyLMzfTTLWwEA3X +QmXXKNGk7QdDNbDaJPXzPe5U8eK6jlbaCuhgMJJQJvyHJh0luSypfjk4E0BaZYWAFPK AnDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IgmxoTsg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13-20020a1709066a8d00b0073d5b737a78si1207332ejr.752.2022.08.26.07.17.33; Fri, 26 Aug 2022 07:18:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=IgmxoTsg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240616AbiHZNsy (ORCPT + 99 others); Fri, 26 Aug 2022 09:48:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbiHZNsw (ORCPT ); Fri, 26 Aug 2022 09:48:52 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7B0B8053C; Fri, 26 Aug 2022 06:48:51 -0700 (PDT) Received: from [192.168.10.7] (unknown [39.53.61.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by madras.collabora.co.uk (Postfix) with ESMTPSA id 661336601ECE; Fri, 26 Aug 2022 14:48:46 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1661521730; bh=wyZTBkl/LljdYgt4Tb8GKYj0jjhaykvQW272r+/nshQ=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=IgmxoTsgUfOVWXf/KEJQDzoqZeRe0KKtoYXfGSkmDpS70G0baYwxBg3F2BqF2MGbE XzjP1GFlFTKafCVRBVyvmR/osEtcgutNdIrT5s55ThREBgT9h4SB0EvlgEdJ5yzfGO CGfa5OvyJcoXrqEJ+FXFd/ZE6EsVOGYEGWMn4HxMruXKB4qMsJQK8gSeXiYeFsEocE zKgDqcRM8SmS71qVZlBhlcO9Y0g4N82giiCEfnxosfGX/mKS1RoZaQdfU7QB62J8s4 KhVwkhQEw+whtbjPQJbw8/7MSt6j+zOEpeZ2zNmqXqr0KRujOsrHigOsvkAajkarA6 FififvfrelAew== Message-ID: Date: Fri, 26 Aug 2022 18:48:41 +0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Cc: usama.anjum@collabora.com, Andrii Nakryiko , Mykola Lysenko , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Shuah Khan , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] selftests/bpf: Fix bind{4,6} tcp/socket header type conflict Content-Language: en-US To: James Hilliard , bpf@vger.kernel.org References: <20220825221751.258958-1-james.hilliard1@gmail.com> From: Muhammad Usama Anjum In-Reply-To: <20220825221751.258958-1-james.hilliard1@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/26/22 3:17 AM, James Hilliard wrote: > There is a potential for us to hit a type conflict when including > netinet/tcp.h with sys/socket.h, we can replace both of these includes > with linux/tcp.h to avoid this conflict. > > Fixes errors like: > In file included from /usr/include/netinet/tcp.h:91, > from progs/bind4_prog.c:10: > /home/buildroot/opt/cross/lib/gcc/bpf/13.0.0/include/stdint.h:34:23: error: conflicting types for 'int8_t'; have 'char' > 34 | typedef __INT8_TYPE__ int8_t; > | ^~~~~~ > In file included from /usr/include/x86_64-linux-gnu/sys/types.h:155, > from /usr/include/x86_64-linux-gnu/bits/socket.h:29, > from /usr/include/x86_64-linux-gnu/sys/socket.h:33, > from progs/bind4_prog.c:9: > /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:24:18: note: previous declaration of 'int8_t' with type 'int8_t' {aka 'signed char'} > 24 | typedef __int8_t int8_t; > | ^~~~~~ > /home/buildroot/opt/cross/lib/gcc/bpf/13.0.0/include/stdint.h:43:24: error: conflicting types for 'int64_t'; have 'long int' > 43 | typedef __INT64_TYPE__ int64_t; > | ^~~~~~~ > /usr/include/x86_64-linux-gnu/bits/stdint-intn.h:27:19: note: previous declaration of 'int64_t' with type 'int64_t' {aka 'long long int'} > 27 | typedef __int64_t int64_t; > | ^~~~~~~ > make: *** [Makefile:537: /home/buildroot/bpf-next/tools/testing/selftests/bpf/bpf_gcc/bind4_prog.o] Error 1 > > Signed-off-by: James Hilliard Reviewed-by: Muhammad Usama Anjum > --- > tools/testing/selftests/bpf/progs/bind4_prog.c | 3 +-- > tools/testing/selftests/bpf/progs/bind6_prog.c | 3 +-- > 2 files changed, 2 insertions(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/bpf/progs/bind4_prog.c b/tools/testing/selftests/bpf/progs/bind4_prog.c > index 474c6a62078a..6bd20042fd53 100644 > --- a/tools/testing/selftests/bpf/progs/bind4_prog.c > +++ b/tools/testing/selftests/bpf/progs/bind4_prog.c > @@ -6,8 +6,7 @@ > #include > #include > #include > -#include > -#include > +#include > #include > #include > > diff --git a/tools/testing/selftests/bpf/progs/bind6_prog.c b/tools/testing/selftests/bpf/progs/bind6_prog.c > index c19cfa869f30..f37617b35a55 100644 > --- a/tools/testing/selftests/bpf/progs/bind6_prog.c > +++ b/tools/testing/selftests/bpf/progs/bind6_prog.c > @@ -6,8 +6,7 @@ > #include > #include > #include > -#include > -#include > +#include > #include > #include > -- Muhammad Usama Anjum