uapi: update bpf header
Changes from 4.20-rc6 Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
parent
a9c49b8f8f
commit
028766aed2
|
|
@ -2170,7 +2170,7 @@ union bpf_attr {
|
||||||
* Return
|
* Return
|
||||||
* 0 on success, or a negative error in case of failure.
|
* 0 on success, or a negative error in case of failure.
|
||||||
*
|
*
|
||||||
* struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
|
* struct bpf_sock *bpf_sk_lookup_tcp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
|
||||||
* Description
|
* Description
|
||||||
* Look for TCP socket matching *tuple*, optionally in a child
|
* Look for TCP socket matching *tuple*, optionally in a child
|
||||||
* network namespace *netns*. The return value must be checked,
|
* network namespace *netns*. The return value must be checked,
|
||||||
|
|
@ -2187,12 +2187,14 @@ union bpf_attr {
|
||||||
* **sizeof**\ (*tuple*\ **->ipv6**)
|
* **sizeof**\ (*tuple*\ **->ipv6**)
|
||||||
* Look for an IPv6 socket.
|
* Look for an IPv6 socket.
|
||||||
*
|
*
|
||||||
* If the *netns* is zero, then the socket lookup table in the
|
* If the *netns* is a negative signed 32-bit integer, then the
|
||||||
* netns associated with the *ctx* will be used. For the TC hooks,
|
* socket lookup table in the netns associated with the *ctx* will
|
||||||
* this in the netns of the device in the skb. For socket hooks,
|
* will be used. For the TC hooks, this is the netns of the device
|
||||||
* this in the netns of the socket. If *netns* is non-zero, then
|
* in the skb. For socket hooks, this is the netns of the socket.
|
||||||
* it specifies the ID of the netns relative to the netns
|
* If *netns* is any other signed 32-bit value greater than or
|
||||||
* associated with the *ctx*.
|
* equal to zero then it specifies the ID of the netns relative to
|
||||||
|
* the netns associated with the *ctx*. *netns* values beyond the
|
||||||
|
* range of 32-bit integers are reserved for future use.
|
||||||
*
|
*
|
||||||
* All values for *flags* are reserved for future usage, and must
|
* All values for *flags* are reserved for future usage, and must
|
||||||
* be left at zero.
|
* be left at zero.
|
||||||
|
|
@ -2201,8 +2203,10 @@ union bpf_attr {
|
||||||
* **CONFIG_NET** configuration option.
|
* **CONFIG_NET** configuration option.
|
||||||
* Return
|
* Return
|
||||||
* Pointer to *struct bpf_sock*, or NULL in case of failure.
|
* Pointer to *struct bpf_sock*, or NULL in case of failure.
|
||||||
|
* For sockets with reuseport option, the *struct bpf_sock*
|
||||||
|
* result is from reuse->socks[] using the hash of the tuple.
|
||||||
*
|
*
|
||||||
* struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u32 netns, u64 flags)
|
* struct bpf_sock *bpf_sk_lookup_udp(void *ctx, struct bpf_sock_tuple *tuple, u32 tuple_size, u64 netns, u64 flags)
|
||||||
* Description
|
* Description
|
||||||
* Look for UDP socket matching *tuple*, optionally in a child
|
* Look for UDP socket matching *tuple*, optionally in a child
|
||||||
* network namespace *netns*. The return value must be checked,
|
* network namespace *netns*. The return value must be checked,
|
||||||
|
|
@ -2219,12 +2223,14 @@ union bpf_attr {
|
||||||
* **sizeof**\ (*tuple*\ **->ipv6**)
|
* **sizeof**\ (*tuple*\ **->ipv6**)
|
||||||
* Look for an IPv6 socket.
|
* Look for an IPv6 socket.
|
||||||
*
|
*
|
||||||
* If the *netns* is zero, then the socket lookup table in the
|
* If the *netns* is a negative signed 32-bit integer, then the
|
||||||
* netns associated with the *ctx* will be used. For the TC hooks,
|
* socket lookup table in the netns associated with the *ctx* will
|
||||||
* this in the netns of the device in the skb. For socket hooks,
|
* will be used. For the TC hooks, this is the netns of the device
|
||||||
* this in the netns of the socket. If *netns* is non-zero, then
|
* in the skb. For socket hooks, this is the netns of the socket.
|
||||||
* it specifies the ID of the netns relative to the netns
|
* If *netns* is any other signed 32-bit value greater than or
|
||||||
* associated with the *ctx*.
|
* equal to zero then it specifies the ID of the netns relative to
|
||||||
|
* the netns associated with the *ctx*. *netns* values beyond the
|
||||||
|
* range of 32-bit integers are reserved for future use.
|
||||||
*
|
*
|
||||||
* All values for *flags* are reserved for future usage, and must
|
* All values for *flags* are reserved for future usage, and must
|
||||||
* be left at zero.
|
* be left at zero.
|
||||||
|
|
@ -2233,6 +2239,8 @@ union bpf_attr {
|
||||||
* **CONFIG_NET** configuration option.
|
* **CONFIG_NET** configuration option.
|
||||||
* Return
|
* Return
|
||||||
* Pointer to *struct bpf_sock*, or NULL in case of failure.
|
* Pointer to *struct bpf_sock*, or NULL in case of failure.
|
||||||
|
* For sockets with reuseport option, the *struct bpf_sock*
|
||||||
|
* result is from reuse->socks[] using the hash of the tuple.
|
||||||
*
|
*
|
||||||
* int bpf_sk_release(struct bpf_sock *sk)
|
* int bpf_sk_release(struct bpf_sock *sk)
|
||||||
* Description
|
* Description
|
||||||
|
|
@ -2405,6 +2413,9 @@ enum bpf_func_id {
|
||||||
/* BPF_FUNC_perf_event_output for sk_buff input context. */
|
/* BPF_FUNC_perf_event_output for sk_buff input context. */
|
||||||
#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
|
#define BPF_F_CTXLEN_MASK (0xfffffULL << 32)
|
||||||
|
|
||||||
|
/* Current network namespace */
|
||||||
|
#define BPF_F_CURRENT_NETNS (-1L)
|
||||||
|
|
||||||
/* Mode for BPF_FUNC_skb_adjust_room helper. */
|
/* Mode for BPF_FUNC_skb_adjust_room helper. */
|
||||||
enum bpf_adj_room_mode {
|
enum bpf_adj_room_mode {
|
||||||
BPF_ADJ_ROOM_NET,
|
BPF_ADJ_ROOM_NET,
|
||||||
|
|
@ -2422,6 +2433,12 @@ enum bpf_lwt_encap_mode {
|
||||||
BPF_LWT_ENCAP_SEG6_INLINE
|
BPF_LWT_ENCAP_SEG6_INLINE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define __bpf_md_ptr(type, name) \
|
||||||
|
union { \
|
||||||
|
type name; \
|
||||||
|
__u64 :64; \
|
||||||
|
} __attribute__((aligned(8)))
|
||||||
|
|
||||||
/* user accessible mirror of in-kernel sk_buff.
|
/* user accessible mirror of in-kernel sk_buff.
|
||||||
* new fields can only be added to the end of this structure
|
* new fields can only be added to the end of this structure
|
||||||
*/
|
*/
|
||||||
|
|
@ -2456,7 +2473,7 @@ struct __sk_buff {
|
||||||
/* ... here. */
|
/* ... here. */
|
||||||
|
|
||||||
__u32 data_meta;
|
__u32 data_meta;
|
||||||
struct bpf_flow_keys *flow_keys;
|
__bpf_md_ptr(struct bpf_flow_keys *, flow_keys);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct bpf_tunnel_key {
|
struct bpf_tunnel_key {
|
||||||
|
|
@ -2572,8 +2589,8 @@ enum sk_action {
|
||||||
* be added to the end of this structure
|
* be added to the end of this structure
|
||||||
*/
|
*/
|
||||||
struct sk_msg_md {
|
struct sk_msg_md {
|
||||||
void *data;
|
__bpf_md_ptr(void *, data);
|
||||||
void *data_end;
|
__bpf_md_ptr(void *, data_end);
|
||||||
|
|
||||||
__u32 family;
|
__u32 family;
|
||||||
__u32 remote_ip4; /* Stored in network byte order */
|
__u32 remote_ip4; /* Stored in network byte order */
|
||||||
|
|
@ -2589,8 +2606,9 @@ struct sk_reuseport_md {
|
||||||
* Start of directly accessible data. It begins from
|
* Start of directly accessible data. It begins from
|
||||||
* the tcp/udp header.
|
* the tcp/udp header.
|
||||||
*/
|
*/
|
||||||
void *data;
|
__bpf_md_ptr(void *, data);
|
||||||
void *data_end; /* End of directly accessible data */
|
/* End of directly accessible data */
|
||||||
|
__bpf_md_ptr(void *, data_end);
|
||||||
/*
|
/*
|
||||||
* Total length of packet (starting from the tcp/udp header).
|
* Total length of packet (starting from the tcp/udp header).
|
||||||
* Note that the directly accessible bytes (data_end - data)
|
* Note that the directly accessible bytes (data_end - data)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue