Received: by 10.223.164.202 with SMTP id h10csp4234465wrb; Wed, 29 Nov 2017 03:14:56 -0800 (PST) X-Google-Smtp-Source: AGs4zMYnwdDifgA9ReiSh6k5/L5Sc/Q8oquDfdUkdicjNHMqT3vxX86/AfYOGWEeIM/9TsMZuGUB X-Received: by 10.84.238.193 with SMTP id l1mr2574046pln.106.1511954096067; Wed, 29 Nov 2017 03:14:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511954096; cv=none; d=google.com; s=arc-20160816; b=EVSmBCRj1tGYIa7/oNswrtx82tpoO9f0lMu6uYlZE1qVCoNAPKuJ9NwjWmzfLp5vVX RNtx7mrPIaJ9cPWHwBVMhVBf1+XetgY7mVrI7ZvptXu7YZd2nP0vHJQ79BVVJ8LhDKDE /EZ9AZU05fzjMypfgn9nxl66JYdTov5AIao6WakUvjCOx9e6bfURnnvyHul4xMLmOLOI Ruu/nFpsAyEIc8+SwCOhnjr6dFdB2gEZTH6TzvPqRcgVHI6oy3kuFuQeqvyCKtWqsAw2 dj2qFuN/wOZgxrIaV0ifHQuf8eccj6qKYdfe457M7a5/O6Zu1E/OLZlav99yvp7Vj/Bd EuqA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=+COyMix5l8HIE5WmePzs8aflqXQADCUim/2Jv+WXXaE=; b=dqF7VZ3t1MvTSo3H7udJXdwNL739r0K8EKd7+LehX12cow/dsJwJyHRJ7TPk1DYxjf IVMPx8bb5e+AX3PFTKXorvKnCdeIhbDiUYQiEUxb92N68ZgcMn1V5bNr7sad3KqsHXoi OG/1aJNvNOB5VrT1/znluZeTlcFxKaPZ0gp6UR62zSfdf3OZwb0kwPHeUaKQTZosUa2m +A3ClnCIoQE+3u5ZG60Ka2tyr6kVjkyBX8b8WcTzQ2XZDSdqVtOq3+PQ8NqkZyMg9zZb 0fzP2ujcuFr4va2fVymb9SRWshI0ZeyzcML2KcQi0eAqcXLa7EW6YpSKUIKDWBkbbHTI FAoA== 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 k8si1041193pln.310.2017.11.29.03.14.45; Wed, 29 Nov 2017 03:14:55 -0800 (PST) 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 S1754479AbdK2LOF (ORCPT + 70 others); Wed, 29 Nov 2017 06:14:05 -0500 Received: from www62.your-server.de ([213.133.104.62]:57602 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751623AbdK2LOD (ORCPT ); Wed, 29 Nov 2017 06:14:03 -0500 Received: from [194.230.159.120] (helo=localhost.localdomain) by www62.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-SHA:256) (Exim 4.85_2) (envelope-from ) id 1eK0JF-0003P7-Lw; Wed, 29 Nov 2017 12:13:45 +0100 Subject: =?UTF-8?Q?Re:_[PATCH]_trace/xdp:_fix_compile_warning:_=e2=80=98stru?= =?UTF-8?Q?ct_bpf=5fmap=e2=80=99_declared_inside_parameter_list?= To: Jesper Dangaard Brouer , Xie XiuQi Cc: rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, ast@kernel.org, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, john.fastabend@gmail.com, linux-kernel@vger.kernel.org, huangdaode@hisilicon.com, Hanjun Guo , "netdev@vger.kernel.org" References: <1511944501-160820-1-git-send-email-xiexiuqi@huawei.com> <20171129101530.75261e91@redhat.com> From: Daniel Borkmann Message-ID: <1a544a0e-3dae-9b3c-338a-6267cddfc477@iogearbox.net> Date: Wed, 29 Nov 2017 12:13:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171129101530.75261e91@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.99.2/24084/Wed Nov 29 10:02:52 2017) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/2017 10:15 AM, Jesper Dangaard Brouer wrote: > On Wed, 29 Nov 2017 16:35:01 +0800 > Xie XiuQi wrote: > >> We meet this compile warning, which caused by missing bpf.h in xdp.h. >> >> In file included from ./include/trace/events/xdp.h:10:0, >> from ./include/linux/bpf_trace.h:6, >> from drivers/net/ethernet/intel/i40e/i40e_txrx.c:29: >> ./include/trace/events/xdp.h:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration >> const struct bpf_map *map, u32 map_index), >> ^ >> ./include/linux/tracepoint.h:187:34: note: in definition of macro ‘__DECLARE_TRACE’ >> static inline void trace_##name(proto) \ >> ^~~~~ >> ./include/linux/tracepoint.h:352:24: note: in expansion of macro ‘PARAMS’ >> __DECLARE_TRACE(name, PARAMS(proto), PARAMS(args), \ >> ^~~~~~ >> ./include/linux/tracepoint.h:477:2: note: in expansion of macro ‘DECLARE_TRACE’ >> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) >> ^~~~~~~~~~~~~ >> ./include/linux/tracepoint.h:477:22: note: in expansion of macro ‘PARAMS’ >> DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) >> ^~~~~~ >> ./include/trace/events/xdp.h:89:1: note: in expansion of macro ‘DEFINE_EVENT’ >> DEFINE_EVENT(xdp_redirect_template, xdp_redirect, >> ^~~~~~~~~~~~ >> ./include/trace/events/xdp.h:90:2: note: in expansion of macro ‘TP_PROTO’ >> TP_PROTO(const struct net_device *dev, >> ^~~~~~~~ >> ./include/trace/events/xdp.h:93:17: warning: ‘struct bpf_map’ declared inside parameter list will not be visible outside of this definition or declaration >> const struct bpf_map *map, u32 map_index), >> ^ >> ./include/linux/tracepoint.h:203:38: note: in definition of macro ‘__DECLARE_TRACE’ >> register_trace_##name(void (*probe)(data_proto), void *data) \ >> ^~~~~~~~~~ >> ./include/linux/tracepoint.h:354:4: note: in expansion of macro ‘PARAMS’ >> PARAMS(void *__data, proto), \ >> ^~~~~~ >> >> Reported-by: Huang Daode >> Cc: Hanjun Guo >> Signed-off-by: Xie XiuQi >> --- >> include/trace/events/xdp.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h >> index 4cd0f05..8989a92 100644 >> --- a/include/trace/events/xdp.h >> +++ b/include/trace/events/xdp.h >> @@ -8,6 +8,7 @@ >> #include >> #include >> #include >> +#include >> >> #define __XDP_ACT_MAP(FN) \ >> FN(ABORTED) \ > > Strange that I'm not see this compile issue, and kbuild-bot also didn't > report it, but the patch looks okay to me... I guess I introduced the > issue in below "fixes" commit. Can the person applying this include > the fixes line? Xie, thanks for the patch! We could route this fix via bpf tree if you want. Could you resend your patch with below Fixes and Acked-by tag added to netdev@vger.kernel.org in Cc, so that it ends up in patchwork there? > Fixes: 8d3b778ff544 ("xdp: tracepoint xdp_redirect also need a map argument") > > Acked-by: Jesper Dangaard Brouer Thanks, Daniel From 1585391394857931013@xxx Wed Nov 29 09:17:34 +0000 2017 X-GM-THRID: 1585388763194753307 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread