[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181217102501.22019-5-bjorn.topel@gmail.com>
Date: Mon, 17 Dec 2018 11:24:58 +0100
From: Björn Töpel <bjorn.topel@...il.com>
To: bjorn.topel@...il.com, magnus.karlsson@...el.com,
magnus.karlsson@...il.com, ast@...nel.org, daniel@...earbox.net,
netdev@...r.kernel.org
Cc: Björn Töpel <bjorn.topel@...el.com>,
brouer@...hat.com, u9012063@...il.com, qi.z.zhang@...el.com,
jakub.kicinski@...ronome.com, andrew@...n.ch
Subject: [PATCH bpf-next v2 4/7] tools/bpf: sync kernel uapi bpf.h to tools directory
From: Björn Töpel <bjorn.topel@...el.com>
Sync kernel uapi bpf.h "BPF_FUNC_xsk_redirect" change to the tools
directory.
Signed-off-by: Björn Töpel <bjorn.topel@...el.com>
---
tools/include/uapi/linux/bpf.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index e7d57e89f25f..2568039b6265 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -2319,6 +2319,17 @@ union bpf_attr {
* "**y**".
* Return
* 0
+ *
+ * int bpf_xsk_redirect(struct xdp_buff *xdp_md)
+ * Description
+ * Redirect the packet to the attached XDP socket, if any.
+ * An XDP socket can be attached to a network interface Rx
+ * queue by passing the XDP_ATTACH option at bind point of
+ * the socket.
+ *
+ * Return
+ * **XDP_REDIRECT** if there is an XDP socket attached to the Rx
+ * queue receiving the frame, otherwise **XDP_PASS**.
*/
#define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \
@@ -2413,7 +2424,8 @@ union bpf_attr {
FN(map_peek_elem), \
FN(msg_push_data), \
FN(msg_pop_data), \
- FN(rc_pointer_rel),
+ FN(rc_pointer_rel), \
+ FN(xsk_redirect),
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
* function eBPF program intends to call
--
2.19.1
Powered by blists - more mailing lists