Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701420
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 07/18] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header |
| Date | 2017-08-01 22:10 +0200 |
| Message-ID | <u9LEl-6p-5@gated-at.bofh.it> (permalink) |
| References | <u9LuF-8fR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
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 <adrian.hunter@intel.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Lawrence Brakmo <brakmo@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
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 <acme@redhat.com>
---
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 8ff155ffcd84..e99e3e6f8b37 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.
--
2.9.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/18] perf/core improvements Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 06/18] tools perf: Do not check spaces/blank lines when checking header file copy drift Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
Re: [PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-01 23:20 +0200
Re: [PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-02 16:20 +0200
Re: [PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h "Michael S. Tsirkin" <mst@redhat.com> - 2017-08-02 17:50 +0200
Re: [PATCH 16/18] tools include uapi: Grab a copy of linux/vhost.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-02 20:40 +0200
[PATCH 17/18] perf trace beautify ioctl: Beautify vhost virtio ioctl's 'cmd' arg Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 14/18] perf trace beautify ioctl: Beautify KVM ioctl's 'cmd' arg Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 18/18] perf trace beautify ioctl: Beautify perf ioctl's 'cmd' arg Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 15/18] perf trace beauty ioctl: Pass _IOC_DIR to the per _IOC_TYPE scnprintf Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 08/18] perf trace beauty ioctl: Improve 'cmd' beautifier Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 01/18] perf build: Clarify header version warning message Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:00 +0200
[PATCH 05/18] tools include uapi: Grab a copy of asm-generic/ioctls.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:10 +0200
[PATCH 07/18] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:10 +0200
Re: [PATCH 07/18] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header Daniel Borkmann <daniel@iogearbox.net> - 2017-08-01 22:20 +0200
[PATCH 10/18] perf trace beauty ioctl: Beautify DRM ioctl cmds Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-08-01 22:10 +0200
Re: [GIT PULL 00/18] perf/core improvements Ingo Molnar <mingo@kernel.org> - 2017-08-10 17:20 +0200
csiph-web