mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-12-08 09:24:48 +00:00
bpf: update header file
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
86bf43c7c2
commit
fa19d6bc01
@ -112,6 +112,7 @@ enum bpf_map_type {
|
|||||||
BPF_MAP_TYPE_HASH_OF_MAPS,
|
BPF_MAP_TYPE_HASH_OF_MAPS,
|
||||||
BPF_MAP_TYPE_DEVMAP,
|
BPF_MAP_TYPE_DEVMAP,
|
||||||
BPF_MAP_TYPE_SOCKMAP,
|
BPF_MAP_TYPE_SOCKMAP,
|
||||||
|
BPF_MAP_TYPE_CPUMAP,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum bpf_prog_type {
|
enum bpf_prog_type {
|
||||||
@ -217,6 +218,10 @@ enum bpf_attach_type {
|
|||||||
|
|
||||||
#define BPF_OBJ_NAME_LEN 16U
|
#define BPF_OBJ_NAME_LEN 16U
|
||||||
|
|
||||||
|
/* Flags for accessing BPF object */
|
||||||
|
#define BPF_F_RDONLY (1U << 3)
|
||||||
|
#define BPF_F_WRONLY (1U << 4)
|
||||||
|
|
||||||
union bpf_attr {
|
union bpf_attr {
|
||||||
struct { /* anonymous struct used by BPF_MAP_CREATE command */
|
struct { /* anonymous struct used by BPF_MAP_CREATE command */
|
||||||
__u32 map_type; /* one of enum bpf_map_type */
|
__u32 map_type; /* one of enum bpf_map_type */
|
||||||
@ -259,6 +264,7 @@ union bpf_attr {
|
|||||||
struct { /* anonymous struct used by BPF_OBJ_* commands */
|
struct { /* anonymous struct used by BPF_OBJ_* commands */
|
||||||
__aligned_u64 pathname;
|
__aligned_u64 pathname;
|
||||||
__u32 bpf_fd;
|
__u32 bpf_fd;
|
||||||
|
__u32 file_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */
|
struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */
|
||||||
@ -286,6 +292,7 @@ union bpf_attr {
|
|||||||
__u32 map_id;
|
__u32 map_id;
|
||||||
};
|
};
|
||||||
__u32 next_id;
|
__u32 next_id;
|
||||||
|
__u32 open_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */
|
struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */
|
||||||
@ -606,12 +613,22 @@ union bpf_attr {
|
|||||||
* int bpf_setsockopt(bpf_socket, level, optname, optval, optlen)
|
* int bpf_setsockopt(bpf_socket, level, optname, optval, optlen)
|
||||||
* Calls setsockopt. Not all opts are available, only those with
|
* Calls setsockopt. Not all opts are available, only those with
|
||||||
* integer optvals plus TCP_CONGESTION.
|
* integer optvals plus TCP_CONGESTION.
|
||||||
* Supported levels: SOL_SOCKET and IPROTO_TCP
|
* Supported levels: SOL_SOCKET and IPPROTO_TCP
|
||||||
* @bpf_socket: pointer to bpf_socket
|
* @bpf_socket: pointer to bpf_socket
|
||||||
* @level: SOL_SOCKET or IPROTO_TCP
|
* @level: SOL_SOCKET or IPPROTO_TCP
|
||||||
* @optname: option name
|
* @optname: option name
|
||||||
* @optval: pointer to option value
|
* @optval: pointer to option value
|
||||||
* @optlen: length of optval in byes
|
* @optlen: length of optval in bytes
|
||||||
|
* Return: 0 or negative error
|
||||||
|
*
|
||||||
|
* int bpf_getsockopt(bpf_socket, level, optname, optval, optlen)
|
||||||
|
* Calls getsockopt. Not all opts are available.
|
||||||
|
* Supported levels: IPPROTO_TCP
|
||||||
|
* @bpf_socket: pointer to bpf_socket
|
||||||
|
* @level: IPPROTO_TCP
|
||||||
|
* @optname: option name
|
||||||
|
* @optval: pointer to option value
|
||||||
|
* @optlen: length of optval in bytes
|
||||||
* Return: 0 or negative error
|
* Return: 0 or negative error
|
||||||
*
|
*
|
||||||
* int bpf_skb_adjust_room(skb, len_diff, mode, flags)
|
* int bpf_skb_adjust_room(skb, len_diff, mode, flags)
|
||||||
@ -714,7 +731,8 @@ union bpf_attr {
|
|||||||
FN(sock_map_update), \
|
FN(sock_map_update), \
|
||||||
FN(xdp_adjust_meta), \
|
FN(xdp_adjust_meta), \
|
||||||
FN(perf_event_read_value), \
|
FN(perf_event_read_value), \
|
||||||
FN(perf_prog_read_value),
|
FN(perf_prog_read_value), \
|
||||||
|
FN(getsockopt),
|
||||||
|
|
||||||
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
|
||||||
* function eBPF program intends to call
|
* function eBPF program intends to call
|
||||||
@ -948,6 +966,13 @@ enum {
|
|||||||
BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control
|
BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control
|
||||||
* needs ECN
|
* needs ECN
|
||||||
*/
|
*/
|
||||||
|
BPF_SOCK_OPS_BASE_RTT, /* Get base RTT. The correct value is
|
||||||
|
* based on the path and may be
|
||||||
|
* dependent on the congestion control
|
||||||
|
* algorithm. In general it indicates
|
||||||
|
* a congestion threshold. RTTs above
|
||||||
|
* this indicate congestion
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */
|
#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user