From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753066AbdHJQct (ORCPT ); Thu, 10 Aug 2017 12:32:49 -0400 Received: from terminus.zytor.com ([65.50.211.136]:34515 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752357AbdHJQcs (ORCPT ); Thu, 10 Aug 2017 12:32:48 -0400 Date: Thu, 10 Aug 2017 09:30:13 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: davem@davemloft.net, dsahern@gmail.com, tglx@linutronix.de, acme@redhat.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, brakmo@fb.com, mingo@kernel.org, namhyung@kernel.org, hpa@zytor.com, daniel@iogearbox.net, wangnan0@huawei.com, adrian.hunter@intel.com Reply-To: jolsa@kernel.org, acme@redhat.com, davem@davemloft.net, dsahern@gmail.com, tglx@linutronix.de, daniel@iogearbox.net, wangnan0@huawei.com, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, brakmo@fb.com, mingo@kernel.org, namhyung@kernel.org, hpa@zytor.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header Git-Commit-ID: f1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: f1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774 Gitweb: http://git.kernel.org/tip/f1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774 Author: Arnaldo Carvalho de Melo AuthorDate: Mon, 31 Jul 2017 10:45:07 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 31 Jul 2017 23:05:00 -0300 tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header In 04df41e343db ("bpf: update tools/include/uapi/linux/bpf.h") the files added in 40304b2a1567 ("bpf: BPF support for sock_ops") were added to tools/include, but not in a verbatim way, missing the comments, which ends up triggering this warning when build tools/perf/: make: Entering directory '/home/acme/git/linux/tools/perf' BUILD: Doing 'make -j4' parallel build Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h' Make sure the the lines are equal, to fix the simple header copy drift detector in tools/perf/. Cc: Adrian Hunter Cc: Daniel Borkmann Cc: David Ahern Cc: David S. Miller Cc: Jiri Olsa Cc: Lawrence Brakmo Cc: Namhyung Kim Cc: Wang Nan Fixes: 04df41e343db ("bpf: update tools/include/uapi/linux/bpf.h") Link: http://lkml.kernel.org/n/tip-z9qyyqht9qq3yyxu76sfy0dh@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/include/uapi/linux/bpf.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index 8ff155f..e99e3e6 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -750,6 +750,8 @@ struct bpf_map_info { /* User bpf_sock_ops struct to access socket values and specify request ops * and their replies. + * Some of this fields are in network (bigendian) byte order and may need + * to be converted before use (bpf_ntohl() defined in samples/bpf/bpf_endian.h). * New fields can only be added at the end of this structure */ struct bpf_sock_ops { @@ -759,12 +761,12 @@ struct bpf_sock_ops { __u32 replylong[4]; }; __u32 family; - __u32 remote_ip4; - __u32 local_ip4; - __u32 remote_ip6[4]; - __u32 local_ip6[4]; - __u32 remote_port; - __u32 local_port; + __u32 remote_ip4; /* Stored in network byte order */ + __u32 local_ip4; /* Stored in network byte order */ + __u32 remote_ip6[4]; /* Stored in network byte order */ + __u32 local_ip6[4]; /* Stored in network byte order */ + __u32 remote_port; /* Stored in network byte order */ + __u32 local_port; /* stored in host byte order */ }; /* List of known BPF sock_ops operators.