summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorMaryam Tahhan <mtahhan@redhat.com>2022-11-15 09:49:21 -0500
committerDaniel Borkmann <daniel@iogearbox.net>2022-11-18 23:16:31 +0100
commitd1e91173cd29ba13c5953d1820a7543140feec93 (patch)
treecc7551892865dd8ee07e5fac04710e6cc2c2da90 /net/core
parentf80e16b614f303b520465b7c704ff89fab800f2f (diff)
downloadlinux-d1e91173cd29ba13c5953d1820a7543140feec93.tar.bz2
bpf, docs: DEVMAPs and XDP_REDIRECT
Add documentation for BPF_MAP_TYPE_DEVMAP and BPF_MAP_TYPE_DEVMAP_HASH including kernel version introduced, usage and examples. Add documentation that describes XDP_REDIRECT. Signed-off-by: Maryam Tahhan <mtahhan@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20221115144921.165483-1-mtahhan@redhat.com
Diffstat (limited to 'net/core')
-rw-r--r--net/core/filter.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 754dd01354d8..2a105fb1ceb2 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -4108,7 +4108,10 @@ static const struct bpf_func_proto bpf_xdp_adjust_meta_proto = {
.arg2_type = ARG_ANYTHING,
};
-/* XDP_REDIRECT works by a three-step process, implemented in the functions
+/**
+ * DOC: xdp redirect
+ *
+ * XDP_REDIRECT works by a three-step process, implemented in the functions
* below:
*
* 1. The bpf_redirect() and bpf_redirect_map() helpers will lookup the target
@@ -4123,7 +4126,8 @@ static const struct bpf_func_proto bpf_xdp_adjust_meta_proto = {
* 3. Before exiting its NAPI poll loop, the driver will call xdp_do_flush(),
* which will flush all the different bulk queues, thus completing the
* redirect.
- *
+ */
+/*
* Pointers to the map entries will be kept around for this whole sequence of
* steps, protected by RCU. However, there is no top-level rcu_read_lock() in
* the core code; instead, the RCU protection relies on everything happening