Skip to content

Commit e7b2823

Browse files
netoptimizerborkmann
authored andcommitted
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: 02dd329 ("bpf: finally expose xdp_rxq_info to XDP bpf-programs") Fixes: f19397a ("bpf: Add access to snd_cwnd and others in sock_ops") Fixes: 06ef0cc ("bpf/cgroup: fix a verification error for a CGROUP_DEVICE type prog") Signed-off-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent b223e3b commit e7b2823

File tree

1 file changed

+11
-1
lines changed
  • tools/include/uapi/linux

1 file changed

+11
-1
lines changed

tools/include/uapi/linux/bpf.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,9 @@ struct xdp_md {
900900
__u32 data;
901901
__u32 data_end;
902902
__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 */
903906
};
904907

905908
enum sk_action {
@@ -956,6 +959,12 @@ struct bpf_sock_ops {
956959
__u32 local_ip6[4]; /* Stored in network byte order */
957960
__u32 remote_port; /* Stored in network byte order */
958961
__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 */
959968
};
960969

961970
/* List of known BPF sock_ops operators.
@@ -1010,7 +1019,8 @@ struct bpf_perf_event_value {
10101019
#define BPF_DEVCG_DEV_CHAR (1ULL << 1)
10111020

10121021
struct 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;
10141024
__u32 major;
10151025
__u32 minor;
10161026
};

0 commit comments

Comments
 (0)