From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424511AbdEYQHl (ORCPT ); Thu, 25 May 2017 12:07:41 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:58482 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S969867AbdEYQHi (ORCPT ); Thu, 25 May 2017 12:07:38 -0400 Date: Thu, 25 May 2017 12:07:35 -0400 (EDT) Message-Id: <20170525.120735.2136402827310294315.davem@davemloft.net> To: qinteng@fb.com Cc: peterz@infradead.org, bgregg@netflix.com, daniel@iogearbox.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kernel-team@fb.com, ast@fb.com Subject: Re: [PATCH net-next] bpf: update perf event helper function signature and documentation From: David Miller In-Reply-To: References: <20170522.230849.1056416550811494880.davem@davemloft.net> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-7 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 25 May 2017 08:26:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v4PG81XJ000460 From: Teng Qin Date: Tue, 23 May 2017 03:17:31 +0000 > Alexei said it was due to Clang not taking u64, u32 etc. for compilation. > I didnąt know the context and just used them. But apparently, something > changed and now they build and run OK...... These types are %100 compiler agnostic. Clang doesn't care. All compilers can understand: typedef unsigned int u32; So it's not a Clang specific issue. The problem could only have to do with whether the types get typdef'd or not with the header files that are used in conjunction with the file we are talking about here. And if we do get a proper set of defines from linux/types.h these days we should: 1) Make that explicit, by including linux/types.h in bpf_helpers.h 2) Use those types universally in this file where we were avoiding doing so This header file also uses "SEC" and expects to get this definition implicitly, and therefore there is another header file that bpf_helpers.h must include in order to explicitly and reliably have that definition. Just changing one prototype, and relying on getting the types indirectly by other header files including by whoever incudes bpf_helpers.h is not the way to go. Thanks.