public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [tip:perf/core] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header
@ 2017-08-10 16:29 tip-bot for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2017-08-10 16:29 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: dsahern, mingo, wangnan0, jolsa, adrian.hunter, hpa, acme, davem,
	daniel, linux-kernel, tglx, namhyung

Commit-ID:  d62c1d7213b77eb4952a873ad57727e991ac3306
Gitweb:     http://git.kernel.org/tip/d62c1d7213b77eb4952a873ad57727e991ac3306
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 31 Jul 2017 10:45:07 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 31 Jul 2017 10:45:07 -0300

tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header

In 2be7e212d541 ("bpf: add bpf_skb_adjust_room helper") BPF_ADJ_ROOM_NET was
added to include/uapi/linux/bpf.h but BPF_ADJ_ROOM_NET_OPS was added to
tools/include/uapi/linux/bpf.h, making these files differ, fix it by using the
same name in both, BPF_ADJ_ROOM_NET, the one in the kernel headers copy.

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: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 2be7e212d541 ("bpf: add bpf_skb_adjust_room helper")
Link: http://lkml.kernel.org/n/tip-2bmwovi9lymplyz6wsszppyf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/include/uapi/linux/bpf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index ce2988b..8ff155f 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -643,7 +643,7 @@ enum bpf_func_id {
 
 /* Mode for BPF_FUNC_skb_adjust_room helper. */
 enum bpf_adj_room_mode {
-	BPF_ADJ_ROOM_NET_OPTS,
+	BPF_ADJ_ROOM_NET,
 };
 
 /* user accessible mirror of in-kernel sk_buff.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip:perf/core] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header
@ 2017-08-10 16:30 tip-bot for Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2017-08-10 16:30 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: davem, dsahern, tglx, acme, jolsa, linux-kernel, brakmo, mingo,
	namhyung, hpa, daniel, wangnan0, adrian.hunter

Commit-ID:  f1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774
Gitweb:     http://git.kernel.org/tip/f1d6cb2d8cdfb210f9b4a0f59e9168ac0f5db774
Author:     Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 31 Jul 2017 10:45:07 -0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
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 <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 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.

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-10 16:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 16:29 [tip:perf/core] tools headers: Fixup tools/include/uapi/linux/bpf.h copy of kernel ABI header tip-bot for Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2017-08-10 16:30 tip-bot for Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox