update uapi headers from 4.14-rc4 net-next
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
92503441cc
commit
f53da99ad7
|
|
@ -92,6 +92,7 @@ enum bpf_cmd {
|
|||
BPF_PROG_GET_FD_BY_ID,
|
||||
BPF_MAP_GET_FD_BY_ID,
|
||||
BPF_OBJ_GET_INFO_BY_FD,
|
||||
BPF_PROG_QUERY,
|
||||
};
|
||||
|
||||
enum bpf_map_type {
|
||||
|
|
@ -143,11 +144,47 @@ enum bpf_attach_type {
|
|||
|
||||
#define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE
|
||||
|
||||
/* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command
|
||||
* to the given target_fd cgroup the descendent cgroup will be able to
|
||||
* override effective bpf program that was inherited from this cgroup
|
||||
/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command
|
||||
*
|
||||
* NONE(default): No further bpf programs allowed in the subtree.
|
||||
*
|
||||
* BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program,
|
||||
* the program in this cgroup yields to sub-cgroup program.
|
||||
*
|
||||
* BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program,
|
||||
* that cgroup program gets run in addition to the program in this cgroup.
|
||||
*
|
||||
* Only one program is allowed to be attached to a cgroup with
|
||||
* NONE or BPF_F_ALLOW_OVERRIDE flag.
|
||||
* Attaching another program on top of NONE or BPF_F_ALLOW_OVERRIDE will
|
||||
* release old program and attach the new one. Attach flags has to match.
|
||||
*
|
||||
* Multiple programs are allowed to be attached to a cgroup with
|
||||
* BPF_F_ALLOW_MULTI flag. They are executed in FIFO order
|
||||
* (those that were attached first, run first)
|
||||
* The programs of sub-cgroup are executed first, then programs of
|
||||
* this cgroup and then programs of parent cgroup.
|
||||
* When children program makes decision (like picking TCP CA or sock bind)
|
||||
* parent program has a chance to override it.
|
||||
*
|
||||
* A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups.
|
||||
* A cgroup with NONE doesn't allow any programs in sub-cgroups.
|
||||
* Ex1:
|
||||
* cgrp1 (MULTI progs A, B) ->
|
||||
* cgrp2 (OVERRIDE prog C) ->
|
||||
* cgrp3 (MULTI prog D) ->
|
||||
* cgrp4 (OVERRIDE prog E) ->
|
||||
* cgrp5 (NONE prog F)
|
||||
* the event in cgrp5 triggers execution of F,D,A,B in that order.
|
||||
* if prog F is detached, the execution is E,D,A,B
|
||||
* if prog F and D are detached, the execution is E,A,B
|
||||
* if prog F, E and D are detached, the execution is C,A,B
|
||||
*
|
||||
* All eligible programs are executed regardless of return code from
|
||||
* earlier programs.
|
||||
*/
|
||||
#define BPF_F_ALLOW_OVERRIDE (1U << 0)
|
||||
#define BPF_F_ALLOW_MULTI (1U << 1)
|
||||
|
||||
/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
|
||||
* verifier will perform strict alignment checking as if the kernel
|
||||
|
|
@ -175,6 +212,9 @@ enum bpf_attach_type {
|
|||
/* Specify numa node during map creation */
|
||||
#define BPF_F_NUMA_NODE (1U << 2)
|
||||
|
||||
/* flags for BPF_PROG_QUERY */
|
||||
#define BPF_F_QUERY_EFFECTIVE (1U << 0)
|
||||
|
||||
#define BPF_OBJ_NAME_LEN 16U
|
||||
|
||||
union bpf_attr {
|
||||
|
|
@ -190,7 +230,7 @@ union bpf_attr {
|
|||
__u32 numa_node; /* numa node (effective only if
|
||||
* BPF_F_NUMA_NODE is set).
|
||||
*/
|
||||
__u8 map_name[BPF_OBJ_NAME_LEN];
|
||||
char map_name[BPF_OBJ_NAME_LEN];
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */
|
||||
|
|
@ -213,7 +253,7 @@ union bpf_attr {
|
|||
__aligned_u64 log_buf; /* user supplied buffer */
|
||||
__u32 kern_version; /* checked when prog_type=kprobe */
|
||||
__u32 prog_flags;
|
||||
__u8 prog_name[BPF_OBJ_NAME_LEN];
|
||||
char prog_name[BPF_OBJ_NAME_LEN];
|
||||
};
|
||||
|
||||
struct { /* anonymous struct used by BPF_OBJ_* commands */
|
||||
|
|
@ -253,6 +293,15 @@ union bpf_attr {
|
|||
__u32 info_len;
|
||||
__aligned_u64 info;
|
||||
} info;
|
||||
|
||||
struct { /* anonymous struct used by BPF_PROG_QUERY command */
|
||||
__u32 target_fd; /* container object to query */
|
||||
__u32 attach_type;
|
||||
__u32 query_flags;
|
||||
__u32 attach_flags;
|
||||
__aligned_u64 prog_ids;
|
||||
__u32 prog_cnt;
|
||||
} query;
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
/* BPF helper function descriptions:
|
||||
|
|
@ -316,7 +365,7 @@ union bpf_attr {
|
|||
* jump into another BPF program
|
||||
* @ctx: context pointer passed to next program
|
||||
* @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY
|
||||
* @index: index inside array that selects specific program to run
|
||||
* @index: 32-bit index inside array that selects specific program to run
|
||||
* Return: 0 on success or negative error
|
||||
*
|
||||
* int bpf_clone_redirect(skb, ifindex, flags)
|
||||
|
|
@ -592,6 +641,21 @@ union bpf_attr {
|
|||
* @xdp_md: pointer to xdp_md
|
||||
* @delta: An positive/negative integer to be added to xdp_md.data_meta
|
||||
* Return: 0 on success or negative on error
|
||||
*
|
||||
* int bpf_perf_event_read_value(map, flags, buf, buf_size)
|
||||
* read perf event counter value and perf event enabled/running time
|
||||
* @map: pointer to perf_event_array map
|
||||
* @flags: index of event in the map or bitmask flags
|
||||
* @buf: buf to fill
|
||||
* @buf_size: size of the buf
|
||||
* Return: 0 on success or negative error code
|
||||
*
|
||||
* int bpf_perf_prog_read_value(ctx, buf, buf_size)
|
||||
* read perf prog attached perf event counter and enabled/running time
|
||||
* @ctx: pointer to ctx
|
||||
* @buf: buf to fill
|
||||
* @buf_size: size of the buf
|
||||
* Return : 0 on success or negative error code
|
||||
*/
|
||||
#define __BPF_FUNC_MAPPER(FN) \
|
||||
FN(unspec), \
|
||||
|
|
@ -648,7 +712,9 @@ union bpf_attr {
|
|||
FN(redirect_map), \
|
||||
FN(sk_redirect_map), \
|
||||
FN(sock_map_update), \
|
||||
FN(xdp_adjust_meta),
|
||||
FN(xdp_adjust_meta), \
|
||||
FN(perf_event_read_value), \
|
||||
FN(perf_prog_read_value),
|
||||
|
||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||
* function eBPF program intends to call
|
||||
|
|
@ -692,7 +758,9 @@ enum bpf_func_id {
|
|||
#define BPF_F_ZERO_CSUM_TX (1ULL << 1)
|
||||
#define BPF_F_DONT_FRAGMENT (1ULL << 2)
|
||||
|
||||
/* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */
|
||||
/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and
|
||||
* BPF_FUNC_perf_event_read_value flags.
|
||||
*/
|
||||
#define BPF_F_INDEX_MASK 0xffffffffULL
|
||||
#define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK
|
||||
/* BPF_FUNC_perf_event_output for sk_buff input context. */
|
||||
|
|
@ -820,7 +888,7 @@ struct bpf_prog_info {
|
|||
__u32 created_by_uid;
|
||||
__u32 nr_map_ids;
|
||||
__aligned_u64 map_ids;
|
||||
__u8 name[BPF_OBJ_NAME_LEN];
|
||||
char name[BPF_OBJ_NAME_LEN];
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct bpf_map_info {
|
||||
|
|
@ -830,7 +898,7 @@ struct bpf_map_info {
|
|||
__u32 value_size;
|
||||
__u32 max_entries;
|
||||
__u32 map_flags;
|
||||
__u8 name[BPF_OBJ_NAME_LEN];
|
||||
char name[BPF_OBJ_NAME_LEN];
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
/* User bpf_sock_ops struct to access socket values and specify request ops
|
||||
|
|
@ -885,4 +953,10 @@ enum {
|
|||
#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */
|
||||
#define TCP_BPF_SNDCWND_CLAMP 1002 /* Set sndcwnd_clamp */
|
||||
|
||||
struct bpf_perf_event_value {
|
||||
__u64 counter;
|
||||
__u64 enabled;
|
||||
__u64 running;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_BPF_H__ */
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ enum {
|
|||
IFLA_PAD,
|
||||
IFLA_XDP,
|
||||
IFLA_EVENT,
|
||||
IFLA_NEW_NETNSID,
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
|
|
@ -324,6 +325,7 @@ enum {
|
|||
IFLA_BRPORT_VLAN_TUNNEL,
|
||||
IFLA_BRPORT_BCAST_FLOOD,
|
||||
IFLA_BRPORT_GROUP_FWD_MASK,
|
||||
IFLA_BRPORT_NEIGH_SUPPRESS,
|
||||
__IFLA_BRPORT_MAX
|
||||
};
|
||||
#define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ enum tunnel_encap_types {
|
|||
TUNNEL_ENCAP_NONE,
|
||||
TUNNEL_ENCAP_FOU,
|
||||
TUNNEL_ENCAP_GUE,
|
||||
TUNNEL_ENCAP_MPLS,
|
||||
};
|
||||
|
||||
#define TUNNEL_ENCAP_FLAG_CSUM (1<<0)
|
||||
|
|
|
|||
|
|
@ -122,6 +122,8 @@ typedef __s32 sctp_assoc_t;
|
|||
#define SCTP_RESET_ASSOC 120
|
||||
#define SCTP_ADD_STREAMS 121
|
||||
#define SCTP_SOCKOPT_PEELOFF_FLAGS 122
|
||||
#define SCTP_STREAM_SCHEDULER 123
|
||||
#define SCTP_STREAM_SCHEDULER_VALUE 124
|
||||
|
||||
/* PR-SCTP policies */
|
||||
#define SCTP_PR_SCTP_NONE 0x0000
|
||||
|
|
@ -812,6 +814,12 @@ struct sctp_assoc_value {
|
|||
uint32_t assoc_value;
|
||||
};
|
||||
|
||||
struct sctp_stream_value {
|
||||
sctp_assoc_t assoc_id;
|
||||
uint16_t stream_id;
|
||||
uint16_t stream_value;
|
||||
};
|
||||
|
||||
/*
|
||||
* 7.2.2 Peer Address Information
|
||||
*
|
||||
|
|
@ -1082,4 +1090,12 @@ struct sctp_add_streams {
|
|||
uint16_t sas_outstrms;
|
||||
};
|
||||
|
||||
/* SCTP Stream schedulers */
|
||||
enum sctp_sched_type {
|
||||
SCTP_SS_FCFS,
|
||||
SCTP_SS_PRIO,
|
||||
SCTP_SS_RR,
|
||||
SCTP_SS_MAX = SCTP_SS_RR
|
||||
};
|
||||
|
||||
#endif /* _SCTP_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue