aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2018-01-18 11:49:08 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2018-01-18 16:17:08 -0500
commite7b2823a582a5bca5ee47644f448e317178e8824 (patch)
tree3077379bf3856c2e675907d47c2116487fa7f98b /tools
parentb223e3b4e03a13739ab462560b791a4c692fd86e (diff)
bpf: Sync kernel ABI header with tooling header
Update tools/include/uapi/linux/bpf.h to bring it in sync with include/uapi/linux/bpf.h. The listed commits forgot to update it. Fixes: 02dd3291b2f0 ("bpf: finally expose xdp_rxq_info to XDP bpf-programs") Fixes: f19397a5c656 ("bpf: Add access to snd_cwnd and others in sock_ops") Fixes: 06ef0ccb5a36 ("bpf/cgroup: fix a verification error for a CGROUP_DEVICE type prog") Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/include/uapi/linux/bpf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 69f96af4a569..7c2259e8bc54 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -900,6 +900,9 @@ struct xdp_md {
900 __u32 data; 900 __u32 data;
901 __u32 data_end; 901 __u32 data_end;
902 __u32 data_meta; 902 __u32 data_meta;
903 /* Below access go through struct xdp_rxq_info */
904 __u32 ingress_ifindex; /* rxq->dev->ifindex */
905 __u32 rx_queue_index; /* rxq->queue_index */
903}; 906};
904 907
905enum sk_action { 908enum sk_action {
@@ -956,6 +959,12 @@ struct bpf_sock_ops {
956 __u32 local_ip6[4]; /* Stored in network byte order */ 959 __u32 local_ip6[4]; /* Stored in network byte order */
957 __u32 remote_port; /* Stored in network byte order */ 960 __u32 remote_port; /* Stored in network byte order */
958 __u32 local_port; /* stored in host byte order */ 961 __u32 local_port; /* stored in host byte order */
962 __u32 is_fullsock; /* Some TCP fields are only valid if
963 * there is a full socket. If not, the
964 * fields read as zero.
965 */
966 __u32 snd_cwnd;
967 __u32 srtt_us; /* Averaged RTT << 3 in usecs */
959}; 968};
960 969
961/* List of known BPF sock_ops operators. 970/* List of known BPF sock_ops operators.
@@ -1010,7 +1019,8 @@ struct bpf_perf_event_value {
1010#define BPF_DEVCG_DEV_CHAR (1ULL << 1) 1019#define BPF_DEVCG_DEV_CHAR (1ULL << 1)
1011 1020
1012struct bpf_cgroup_dev_ctx { 1021struct bpf_cgroup_dev_ctx {
1013 __u32 access_type; /* (access << 16) | type */ 1022 /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */
1023 __u32 access_type;
1014 __u32 major; 1024 __u32 major;
1015 __u32 minor; 1025 __u32 minor;
1016}; 1026};