aboutsummaryrefslogtreecommitdiffstats
path: root/tools/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-11-29 21:15:07 -0500
committerDavid S. Miller <davem@davemloft.net>2018-11-29 21:15:07 -0500
commit93029d7d407fa744a2de358664bd779cda694657 (patch)
treef2d8d3056ea28b9dbb2fca5804896aea79603db9 /tools/include/uapi/linux/bpf.h
parent3d58c9c9f735c8c9960e8bf8dd796dbfe2585a6a (diff)
parentb42699547fc9fb1057795bccc21a6445743a7fde (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
Daniel Borkmann says: ==================== bpf-next 2018-11-30 The following pull-request contains BPF updates for your *net-next* tree. (Getting out bit earlier this time to pull in a dependency from bpf.) The main changes are: 1) Add libbpf ABI versioning and document API naming conventions as well as ABI versioning process, from Andrey. 2) Add a new sk_msg_pop_data() helper for sk_msg based BPF programs that is used in conjunction with sk_msg_push_data() for adding / removing meta data to the msg data, from John. 3) Optimize convert_bpf_ld_abs() for 0 offset and fix various lib and testsuite build failures on 32 bit, from David. 4) Make BPF prog dump for !JIT identical to how we dump subprogs when JIT is in use, from Yonghong. 5) Rename btf_get_from_id() to make it more conform with libbpf API naming conventions, from Martin. 6) Add a missing BPF kselftest config item, from Naresh. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/include/uapi/linux/bpf.h')
-rw-r--r--tools/include/uapi/linux/bpf.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 23e2031a43d4..597afdbc1ab9 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -2268,6 +2268,19 @@ union bpf_attr {
2268 * 2268 *
2269 * Return 2269 * Return
2270 * 0 on success, or a negative error in case of failure. 2270 * 0 on success, or a negative error in case of failure.
2271 *
2272 * int bpf_msg_pop_data(struct sk_msg_buff *msg, u32 start, u32 pop, u64 flags)
2273 * Description
2274 * Will remove *pop* bytes from a *msg* starting at byte *start*.
2275 * This may result in **ENOMEM** errors under certain situations if
2276 * an allocation and copy are required due to a full ring buffer.
2277 * However, the helper will try to avoid doing the allocation
2278 * if possible. Other errors can occur if input parameters are
2279 * invalid either due to *start* byte not being valid part of msg
2280 * payload and/or *pop* value being to large.
2281 *
2282 * Return
2283 * 0 on success, or a negative erro in case of failure.
2271 */ 2284 */
2272#define __BPF_FUNC_MAPPER(FN) \ 2285#define __BPF_FUNC_MAPPER(FN) \
2273 FN(unspec), \ 2286 FN(unspec), \
@@ -2360,7 +2373,8 @@ union bpf_attr {
2360 FN(map_push_elem), \ 2373 FN(map_push_elem), \
2361 FN(map_pop_elem), \ 2374 FN(map_pop_elem), \
2362 FN(map_peek_elem), \ 2375 FN(map_peek_elem), \
2363 FN(msg_push_data), 2376 FN(msg_push_data), \
2377 FN(msg_pop_data),
2364 2378
2365/* integer value in 'imm' field of BPF_CALL instruction selects which helper 2379/* integer value in 'imm' field of BPF_CALL instruction selects which helper
2366 * function eBPF program intends to call 2380 * function eBPF program intends to call