From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936176AbdEWDS2 (ORCPT ); Mon, 22 May 2017 23:18:28 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:49969 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932968AbdEWDSY (ORCPT ); Mon, 22 May 2017 23:18:24 -0400 From: Teng Qin To: David Miller CC: "peterz@infradead.org" , "bgregg@netflix.com" , "daniel@iogearbox.net" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Kernel Team , Alexei Starovoitov Subject: Re: [PATCH net-next] bpf: update perf event helper function signature and documentation Thread-Topic: [PATCH net-next] bpf: update perf event helper function signature and documentation Thread-Index: AQHS010Mg9ZE0fNoskCvU5ua9kAkG6IBPRGA//+NFQA= Date: Tue, 23 May 2017 03:17:31 +0000 Message-ID: References: <20170522.230849.1056416550811494880.davem@davemloft.net> In-Reply-To: <20170522.230849.1056416550811494880.davem@davemloft.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: davemloft.net; dkim=none (message not signed) header.d=none;davemloft.net; dmarc=none action=none header.from=fb.com; x-originating-ip: [2620:10d:c091:200::1:3d01] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CO1PR15MB0967;20:KrpKpqa158jTrDlCFJJSTenQcO+5xHjTstuoo0Zs8zxfMu7hjzt4LnV0+YPZOMisEEI49L6QQiXUFfmnk9POfvw6/hMndieRiAK05upAE5rOopt/JvpABnraj+eLPMWowUvttXJct2jA8gp7P1G3HcE6EZwV71SZsxZujnKiiQ8= x-ms-traffictypediagnostic: CO1PR15MB0967: x-ms-office365-filtering-correlation-id: 286617a5-9dde-4edf-8912-08d4a18a400c x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:CO1PR15MB0967; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(67672495146484); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(100000700043)(100105000095)(100000701043)(100105300095)(100000702043)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(100000703043)(100105400095)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704043)(100105200095)(100000705043)(100105500095);SRVR:CO1PR15MB0967;BCL:0;PCL:0;RULEID:(100000800043)(100110000095)(100000801043)(100110300095)(100000802043)(100110100095)(100000803043)(100110400095)(100000804043)(100110200095);SRVR:CO1PR15MB0967; x-forefront-prvs: 0316567485 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(39850400002)(39450400003)(39410400002)(39840400002)(39400400002)(24454002)(8676002)(122556002)(53546009)(81166006)(33656002)(86362001)(8936002)(25786009)(4326008)(229853002)(68736007)(2900100001)(76176999)(99286003)(54906002)(6436002)(6486002)(77096006)(82746002)(50986999)(6512007)(36756003)(6246003)(6916009)(2950100002)(38730400002)(110136004)(6506006)(83716003)(53936002)(478600001)(6116002)(102836003)(2906002)(5660300001)(305945005)(7736002)(189998001)(54356999)(3280700002)(3660700001)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR15MB0967;H:DM5PR15MB1915.namprd15.prod.outlook.com;FPR:;SPF:None;MLV:ovrnspm;PTR:InfoNoRecords;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-ID: MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2017 03:17:31.7363 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB0967 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-05-23_02:,, signatures=0 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 v4N3IgVX004655 On 5/22/17, 20:08, "David Miller" wrote: From: Teng Qin Date: Tue, 23 May 2017 00:39:34 +0000 > diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h > index 9a9c95f..a94ce42 100644 > --- a/samples/bpf/bpf_helpers.h > +++ b/samples/bpf/bpf_helpers.h > @@ -37,9 +37,8 @@ static int (*bpf_clone_redirect)(void *ctx, int ifindex, int flags) = > (void *) BPF_FUNC_clone_redirect; > static int (*bpf_redirect)(int ifindex, int flags) = > (void *) BPF_FUNC_redirect; > -static int (*bpf_perf_event_output)(void *ctx, void *map, > - unsigned long long flags, void *data, > - int size) = > +static int (*bpf_perf_event_output)(void *ctx, void *map, u64 flags, > + void *data, int size) = > (void *) BPF_FUNC_perf_event_output; > static int (*bpf_get_stackid)(void *ctx, void *map, int flags) = > (void *) BPF_FUNC_get_stackid; I think we've been intentionally avoiding the use of "u64", "u32", etc. in this file. But what do I know. 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......