Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp178197imm; Fri, 25 May 2018 19:27:35 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpSnEEf1XoolSOpw+OeewybyZoypNGP045JRi0vBN2hQjAO8/eKGHbsm8Bb7zBFm9AUdN+h X-Received: by 2002:a63:924f:: with SMTP id s15-v6mr3741508pgn.368.1527301655258; Fri, 25 May 2018 19:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527301655; cv=none; d=google.com; s=arc-20160816; b=kqVlyFf9imtqrmNvd4HeG7aHv2w4nQuHSmJ0kJCc2cqjIFiDIvdmAHfBtKP2qIMHSv HfYC7D1lyg1YRoDJoDUe6PjNKrqtM2ag7selxfzsLJy5zHAb63cKrlRW+T/HEAsu7DGG /zseFAfe12adgCScbTI1RoLnXmGaJD55M77Xb15ybyG646f4HUv5ttzFiMqo1e++uhVa 3NE9tiGF6qkqOI2zeFOO+mQmWQQ0Z1V5bApbIHfz66B0kNHzDWNX7Whe8xzMv5H9EDeG Li7iqTNyKuqIC9xk7OgP0bZ/E6hTFoRC1+UFmhyie0OJuVIGcd0uxl/tjwKXKx24Vd3y JtKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:arc-authentication-results; bh=2t9a/jmqH4mNDzoF7eMXcwMqVJ7MKxid3+/9QT7M0SU=; b=tVQtvYgKyNs80FsaH5wxbc1jFeH4Tu5tUmaWlW2jj9QHqDEHOAhKZ0bXY9giHUV3Mq jd0zDgf0GBiJxuzVlSQC0w+K/z3YOWZNQvlPeDbw82GyA9e6OuzLMLkiulibsZFxPGOf O2BMIxZj40ActzNATlF3EwWzYK9kzcv1I8UPOA0wP7NLaRF6hyGZJC2Ai88MAtSnRbUs 8x8zbKFg2Hdc23+1oVkUnTp6ttTqBh1SwzRN3EES0i5ZKhKpE1kxxKtoIwqPPd3nnV1e As7m+X78iRC8IA5eRJG8XSlXSOIGQx1fuj1NvPeMvUEdr7I7ByXfpifT4zM856DKU5Z0 3dcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f8-v6si18158553pgn.567.2018.05.25.19.27.20; Fri, 25 May 2018 19:27:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031025AbeEZC1M (ORCPT + 99 others); Fri, 25 May 2018 22:27:12 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:7749 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1030648AbeEZC1L (ORCPT ); Fri, 25 May 2018 22:27:11 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 8F00D14DB142E; Sat, 26 May 2018 10:26:57 +0800 (CST) Received: from [127.0.0.1] (10.177.31.96) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.382.0; Sat, 26 May 2018 10:26:55 +0800 Subject: Re: [PATCH net-next] bpfilter: fix a build err To: Alexei Starovoitov References: <20180525101757.13756-1-yuehaibing@huawei.com> <20180525161925.crdamzqjgs5wg77e@ast-mbp> CC: , , , From: YueHaibing Message-ID: <176ee190-ecda-9b3e-5066-ecf3fbaf32bb@huawei.com> Date: Sat, 26 May 2018 10:25:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20180525161925.crdamzqjgs5wg77e@ast-mbp> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.31.96] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/5/26 0:19, Alexei Starovoitov wrote: > On Fri, May 25, 2018 at 06:17:57PM +0800, YueHaibing wrote: >> gcc-7.3.0 report following err: >> >> HOSTCC net/bpfilter/main.o >> In file included from net/bpfilter/main.c:9:0: >> ./include/uapi/linux/bpf.h:12:10: fatal error: linux/bpf_common.h: No such file or directory >> #include >> >> remove it by adding a include path. >> Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") >> >> Signed-off-by: YueHaibing >> --- >> net/bpfilter/Makefile | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile >> index 2af752c..3f3cb87 100644 >> --- a/net/bpfilter/Makefile >> +++ b/net/bpfilter/Makefile >> @@ -5,7 +5,7 @@ >> >> hostprogs-y := bpfilter_umh >> bpfilter_umh-objs := main.o >> -HOSTCFLAGS += -I. -Itools/include/ >> +HOSTCFLAGS += -I. -Itools/include/ -Itools/include/uapi > > Strangely I don't see this error with gcc 7.3 > I've tried this patch and it doesn't hurt, > but before it gets applied could you please try > the top two patches from this tree: > https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git/?h=ipt_bpf > in your environment? > These two patches add the actual meat of bpfilter and I'd like > to make sure the build setup is good for everyone before > we proceed too far. after applied these two patches on net-next, the err still here: bpfilter: rough bpfilter codegen example hack bpfilter: add iptable get/set parsing HOSTCC net/bpfilter/main.o In file included from net/bpfilter/main.c:13:0: ./include/uapi/linux/bpf.h:12:10: fatal error: linux/bpf_common.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[2]: *** [net/bpfilter/main.o] Error 1 make[1]: *** [net/bpfilter] Error 2 make: *** [net] Error 2 Also I compile your tree, error is same my gcc version info as follow: [root@localhost net-next]# gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/home/yuehb/gcc-7.3.0-tools/libexec/gcc/x86_64-pc-linux-gnu/7.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-7.3.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib --prefix=/home/yuehb/gcc-7.3.0-tools Thread model: posix gcc version 7.3.0 (GCC) > > > . >