Message ID | 20221031095517.100297-1-yangjihong1@huawei.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2221074wru; Mon, 31 Oct 2022 03:07:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6tejmalRf5i7q6FHgjHpe9RD5/UC7mwiiB958dSzmPHgx4dkGwGwI9enXy60LJ2xYq7UrA X-Received: by 2002:a17:902:f60d:b0:186:c6d7:6574 with SMTP id n13-20020a170902f60d00b00186c6d76574mr13313363plg.171.1667210820995; Mon, 31 Oct 2022 03:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667210820; cv=none; d=google.com; s=arc-20160816; b=Q/L1rDEjBRA8Vv8KdMnudavJvbcu+Sk30763mnciiq5ubx+rCLgouhaQVG91jeS/Wp KTwgxHNhVY9DJeCDuUBpMlbMAhq67ZAwfA4JEGGJ+YE2ud4t3V0QpXI7sXYSMZS4hWHO Mw0wAijFceGJJyR+vgSF+YvnaI+W1PzJ7wWZrm5ckA53Mp2wMI8jCqCPQgpxbBHt8qjO 4rCj1zkgktJQM6XrJHwJDCx5pOeSYrZJC+3at+jSjaRkPCvPpeznUT0RBV0D7beSg4eQ Le3pYYyS2m/8FOS0hnq6zklp83k4Ed2i64M/0Ty4XGiR5/gHrEpoNPT/BUuhokcC7BDb JcqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=UhA4M1JNMJ4Sjo6rW62SnuoirJyZeTBEupkmU3WUWtU=; b=rDyAvgX+PPwtZXLv/4Mm9xbITNs6UcNSw+EfxOU2/EAffN3oDaB9Y5ZilUndTu3pzH w18NgZ42tKawdiXuGfWOEpe7CD7Ra7LcsU3v0XzQ1CsgQXs/E+4rhvM12h02rrnN89Vj JKBS1AqVk9u1jtKKwPXtx+uD8vighGp1hL1+zLHE6ODkxo+QSLZqBz3vd7e9hPZ9hwt5 fTcTxupmswuTGyqJzxxXRjQKnU97jKpSPQqYWO9KYlDNjJqAU5sutdKoLJHFC29DTzJ+ skm1PXQ5a1qHtQa2643dnnfGNCXlIQ2LiSkPla6zhfxlcNAbl78S/kxJyl0NvKlOtODd 4g5Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a170902c1d200b00186f224d754si7621790plc.12.2022.10.31.03.06.47; Mon, 31 Oct 2022 03:07:00 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230098AbiJaJ6k (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Mon, 31 Oct 2022 05:58:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbiJaJ6h (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 31 Oct 2022 05:58:37 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D6427662; Mon, 31 Oct 2022 02:58:36 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4N17l83dwDzVjKs; Mon, 31 Oct 2022 17:53:40 +0800 (CST) Received: from kwepemm600003.china.huawei.com (7.193.23.202) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 17:58:35 +0800 Received: from ubuntu1804.huawei.com (10.67.174.61) by kwepemm600003.china.huawei.com (7.193.23.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 31 Oct 2022 17:58:34 +0800 From: Yang Jihong <yangjihong1@huawei.com> To: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>, <keescook@chromium.org>, <gustavoars@kernel.org>, <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <bpf@vger.kernel.org>, <acme@kernel.org> CC: <yangjihong1@huawei.com> Subject: [PATCH] uapi: Add missing linux/stddef.h header file to in.h Date: Mon, 31 Oct 2022 17:55:17 +0800 Message-ID: <20221031095517.100297-1-yangjihong1@huawei.com> X-Mailer: git-send-email 2.30.GIT MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.174.61] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600003.china.huawei.com (7.193.23.202) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748197253654602658?= X-GMAIL-MSGID: =?utf-8?q?1748197253654602658?= |
Series |
uapi: Add missing linux/stddef.h header file to in.h
|
|
Commit Message
Yang Jihong
Oct. 31, 2022, 9:55 a.m. UTC
commit 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") does not
include "linux/stddef.h" header file, and tools headers update linux/in.h copy,
BPF prog fails to be compiled:
CLNG-BPF [test_maps] bpf_flow.bpf.o
CLNG-BPF [test_maps] cgroup_skb_sk_lookup_kern.bpf.o
In file included from progs/cgroup_skb_sk_lookup_kern.c:9:
/root/linux/tools/include/uapi/linux/in.h:199:3: error: type name requires a specifier or qualifier
__DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex);
^
/root/linux/tools/include/uapi/linux/in.h:199:32: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
__DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex);
^
2 errors generated.
To maintain consistency, add missing header file to kernel.
Fixes: 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper")
Signed-off-by: Yang Jihong <yangjihong1@huawei.com>
---
include/uapi/linux/in.h | 1 +
1 file changed, 1 insertion(+)
Comments
On Mon, 2022-10-31 at 17:55 +0800, Yang Jihong wrote: > commit 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") does not > include "linux/stddef.h" header file, and tools headers update linux/in.h copy, > BPF prog fails to be compiled: > > CLNG-BPF [test_maps] bpf_flow.bpf.o > CLNG-BPF [test_maps] cgroup_skb_sk_lookup_kern.bpf.o > In file included from progs/cgroup_skb_sk_lookup_kern.c:9: > /root/linux/tools/include/uapi/linux/in.h:199:3: error: type name requires a specifier or qualifier > __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); > ^ > /root/linux/tools/include/uapi/linux/in.h:199:32: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] > __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); > ^ > 2 errors generated. > > To maintain consistency, add missing header file to kernel. > Fixes: 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") > > Signed-off-by: Yang Jihong <yangjihong1@huawei.com> The 'Fixes' tag must be separated by the commit message by a blank line, and you need to remove the empty line between 'Fixes' and SoB. Additionally, on repost, please specify the target tree in the patch subj, and wrap the commit message text to 75 chars per line (that does not apply to the build output). Thanks, Paolo
Hello Paolo, On 2022/11/3 16:25, Paolo Abeni wrote: > On Mon, 2022-10-31 at 17:55 +0800, Yang Jihong wrote: >> commit 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") does not >> include "linux/stddef.h" header file, and tools headers update linux/in.h copy, >> BPF prog fails to be compiled: >> >> CLNG-BPF [test_maps] bpf_flow.bpf.o >> CLNG-BPF [test_maps] cgroup_skb_sk_lookup_kern.bpf.o >> In file included from progs/cgroup_skb_sk_lookup_kern.c:9: >> /root/linux/tools/include/uapi/linux/in.h:199:3: error: type name requires a specifier or qualifier >> __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); >> ^ >> /root/linux/tools/include/uapi/linux/in.h:199:32: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int] >> __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex); >> ^ >> 2 errors generated. >> >> To maintain consistency, add missing header file to kernel. >> Fixes: 5854a09b4957 ("net/ipv4: Use __DECLARE_FLEX_ARRAY() helper") >> >> Signed-off-by: Yang Jihong <yangjihong1@huawei.com> > > The 'Fixes' tag must be separated by the commit message by a blank > line, and you need to remove the empty line between 'Fixes' and SoB. > > Additionally, on repost, please specify the target tree in the patch > subj, and wrap the commit message text to 75 chars per line (that does > not apply to the build output). > OK, will fix these issues in the next version, thanks for your advice. Thanks, Yang > Thanks, > > Paolo > > > . >
diff --git a/include/uapi/linux/in.h b/include/uapi/linux/in.h index f243ce665f74..79015665daf1 100644 --- a/include/uapi/linux/in.h +++ b/include/uapi/linux/in.h @@ -22,6 +22,7 @@ #include <linux/types.h> #include <linux/libc-compat.h> #include <linux/socket.h> +#include <linux/stddef.h> #if __UAPI_DEF_IN_IPPROTO /* Standard well-defined IP protocols. */