Commit fcf85729 authored by Alexei Starovoitov's avatar Alexei Starovoitov

Merge branch 'fix-bpf-helpers-doc'

Andrey Ignatov says:

====================
BPF helpers documentation in UAPI refers to kernel ctx structures when it
has to refer to user visible ones. Fix it.
====================
Reviewed-by: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parents f60ad0a0 96871b9f
...@@ -1361,7 +1361,7 @@ union bpf_attr { ...@@ -1361,7 +1361,7 @@ union bpf_attr {
* Return * Return
* 0 * 0
* *
* int bpf_setsockopt(struct bpf_sock_ops_kern *bpf_socket, int level, int optname, char *optval, int optlen) * int bpf_setsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
* Description * Description
* Emulate a call to **setsockopt()** on the socket associated to * Emulate a call to **setsockopt()** on the socket associated to
* *bpf_socket*, which must be a full socket. The *level* at * *bpf_socket*, which must be a full socket. The *level* at
...@@ -1435,7 +1435,7 @@ union bpf_attr { ...@@ -1435,7 +1435,7 @@ union bpf_attr {
* Return * Return
* **SK_PASS** on success, or **SK_DROP** on error. * **SK_PASS** on success, or **SK_DROP** on error.
* *
* int bpf_sock_map_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) * int bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
* Description * Description
* Add an entry to, or update a *map* referencing sockets. The * Add an entry to, or update a *map* referencing sockets. The
* *skops* is used as a new value for the entry associated to * *skops* is used as a new value for the entry associated to
...@@ -1533,7 +1533,7 @@ union bpf_attr { ...@@ -1533,7 +1533,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.
* *
* int bpf_perf_prog_read_value(struct bpf_perf_event_data_kern *ctx, struct bpf_perf_event_value *buf, u32 buf_size) * int bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)
* Description * Description
* For en eBPF program attached to a perf event, retrieve the * For en eBPF program attached to a perf event, retrieve the
* value of the event counter associated to *ctx* and store it in * value of the event counter associated to *ctx* and store it in
...@@ -1544,7 +1544,7 @@ union bpf_attr { ...@@ -1544,7 +1544,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.
* *
* int bpf_getsockopt(struct bpf_sock_ops_kern *bpf_socket, int level, int optname, char *optval, int optlen) * int bpf_getsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
* Description * Description
* Emulate a call to **getsockopt()** on the socket associated to * Emulate a call to **getsockopt()** on the socket associated to
* *bpf_socket*, which must be a full socket. The *level* at * *bpf_socket*, which must be a full socket. The *level* at
...@@ -1588,7 +1588,7 @@ union bpf_attr { ...@@ -1588,7 +1588,7 @@ union bpf_attr {
* Return * Return
* 0 * 0
* *
* int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops_kern *bpf_sock, int argval) * int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)
* Description * Description
* Attempt to set the value of the **bpf_sock_ops_cb_flags** field * Attempt to set the value of the **bpf_sock_ops_cb_flags** field
* for the full TCP socket associated to *bpf_sock_ops* to * for the full TCP socket associated to *bpf_sock_ops* to
...@@ -1721,7 +1721,7 @@ union bpf_attr { ...@@ -1721,7 +1721,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.
* *
* int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int addr_len) * int bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)
* Description * Description
* Bind the socket associated to *ctx* to the address pointed by * Bind the socket associated to *ctx* to the address pointed by
* *addr*, of length *addr_len*. This allows for making outgoing * *addr*, of length *addr_len*. This allows for making outgoing
......
...@@ -1361,7 +1361,7 @@ union bpf_attr { ...@@ -1361,7 +1361,7 @@ union bpf_attr {
* Return * Return
* 0 * 0
* *
* int bpf_setsockopt(struct bpf_sock_ops_kern *bpf_socket, int level, int optname, char *optval, int optlen) * int bpf_setsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
* Description * Description
* Emulate a call to **setsockopt()** on the socket associated to * Emulate a call to **setsockopt()** on the socket associated to
* *bpf_socket*, which must be a full socket. The *level* at * *bpf_socket*, which must be a full socket. The *level* at
...@@ -1435,7 +1435,7 @@ union bpf_attr { ...@@ -1435,7 +1435,7 @@ union bpf_attr {
* Return * Return
* **SK_PASS** on success, or **SK_DROP** on error. * **SK_PASS** on success, or **SK_DROP** on error.
* *
* int bpf_sock_map_update(struct bpf_sock_ops_kern *skops, struct bpf_map *map, void *key, u64 flags) * int bpf_sock_map_update(struct bpf_sock_ops *skops, struct bpf_map *map, void *key, u64 flags)
* Description * Description
* Add an entry to, or update a *map* referencing sockets. The * Add an entry to, or update a *map* referencing sockets. The
* *skops* is used as a new value for the entry associated to * *skops* is used as a new value for the entry associated to
...@@ -1533,7 +1533,7 @@ union bpf_attr { ...@@ -1533,7 +1533,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.
* *
* int bpf_perf_prog_read_value(struct bpf_perf_event_data_kern *ctx, struct bpf_perf_event_value *buf, u32 buf_size) * int bpf_perf_prog_read_value(struct bpf_perf_event_data *ctx, struct bpf_perf_event_value *buf, u32 buf_size)
* Description * Description
* For en eBPF program attached to a perf event, retrieve the * For en eBPF program attached to a perf event, retrieve the
* value of the event counter associated to *ctx* and store it in * value of the event counter associated to *ctx* and store it in
...@@ -1544,7 +1544,7 @@ union bpf_attr { ...@@ -1544,7 +1544,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.
* *
* int bpf_getsockopt(struct bpf_sock_ops_kern *bpf_socket, int level, int optname, char *optval, int optlen) * int bpf_getsockopt(struct bpf_sock_ops *bpf_socket, int level, int optname, char *optval, int optlen)
* Description * Description
* Emulate a call to **getsockopt()** on the socket associated to * Emulate a call to **getsockopt()** on the socket associated to
* *bpf_socket*, which must be a full socket. The *level* at * *bpf_socket*, which must be a full socket. The *level* at
...@@ -1588,7 +1588,7 @@ union bpf_attr { ...@@ -1588,7 +1588,7 @@ union bpf_attr {
* Return * Return
* 0 * 0
* *
* int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops_kern *bpf_sock, int argval) * int bpf_sock_ops_cb_flags_set(struct bpf_sock_ops *bpf_sock, int argval)
* Description * Description
* Attempt to set the value of the **bpf_sock_ops_cb_flags** field * Attempt to set the value of the **bpf_sock_ops_cb_flags** field
* for the full TCP socket associated to *bpf_sock_ops* to * for the full TCP socket associated to *bpf_sock_ops* to
...@@ -1721,7 +1721,7 @@ union bpf_attr { ...@@ -1721,7 +1721,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.
* *
* int bpf_bind(struct bpf_sock_addr_kern *ctx, struct sockaddr *addr, int addr_len) * int bpf_bind(struct bpf_sock_addr *ctx, struct sockaddr *addr, int addr_len)
* Description * Description
* Bind the socket associated to *ctx* to the address pointed by * Bind the socket associated to *ctx* to the address pointed by
* *addr*, of length *addr_len*. This allows for making outgoing * *addr*, of length *addr_len*. This allows for making outgoing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment