Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf, docs: prune all references to "internal BPF" #2130

Closed
wants to merge 3 commits into from

Conversation

kernel-patches-bot
Copy link

Pull request for series with
subject: bpf, docs: prune all references to "internal BPF"
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125

@kernel-patches-bot
Copy link
Author

Master branch: e504389
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: a5bdc36
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e47d0bf
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 4746158
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: e12cd15
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: ebf7f6f
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: d41bc48
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

Nobody and others added 3 commits November 16, 2021 21:21
The eBPF name has completely taken over from eBPF in general usage, so
prune all remaining references to "internal BPF".

Signed-off-by: Christoph Hellwig <hch@lst.de>
filter.rst starts out documenting the classic BPF and then spills into
introducing and documentating eBPF.  Split the eBPF documentation into
three new files under Documentation/bpf/ and link to that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
@kernel-patches-bot
Copy link
Author

Master branch: db813d7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

@kernel-patches-bot
Copy link
Author

Master branch: 5931d9a
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
version: 1

Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/project/netdevbpf/list/?series=580125
error message:

Cmd('git') failed due to: exit code(128)
  cmdline: git am -3
  stdout: 'Applying: bpf, docs: prune all references to "internal BPF"
Applying: bpf, doc: split general purpose eBPF documentation out of filter.rst
Using index info to reconstruct a base tree...
M	Documentation/bpf/index.rst
Falling back to patching base and 3-way merge...
CONFLICT (add/add): Merge conflict in Documentation/bpf/maps.rst
Auto-merging Documentation/bpf/maps.rst
Auto-merging Documentation/bpf/index.rst
CONFLICT (content): Merge conflict in Documentation/bpf/index.rst
Patch failed at 0002 bpf, doc: split general purpose eBPF documentation out of filter.rst
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".'
  stderr: 'error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch'

conflict:

diff --cc Documentation/bpf/index.rst
index 413f50101eca,5b9bd553d0af..000000000000
--- a/Documentation/bpf/index.rst
+++ b/Documentation/bpf/index.rst
@@@ -12,26 -9,122 +9,129 @@@ This kernel side documentation is stil
  The Cilium project also maintains a `BPF and XDP Reference Guide`_
  that goes into great technical depth about the BPF Architecture.
  
++<<<<<<< HEAD
++=======
+ 
+ Instruction set
+ ===============
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    instruction-set
+ 
+ Verifier
+ ========
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    verifier
+ 
+ 
+ libbpf
+ ======
+ 
+ Documentation/bpf/libbpf/libbpf.rst is a userspace library for loading and interacting with bpf programs.
+ 
+ BPF Type Format (BTF)
+ =====================
+ 
++>>>>>>> bpf, doc: split general purpose eBPF documentation out of filter.rst
  .. toctree::
     :maxdepth: 1
  
 +   libbpf/index
     btf
++<<<<<<< HEAD
 +   faq
 +   syscall_api
 +   helpers
 +   programs
 +   maps
++=======
+ 
+ 
+ Frequently asked questions (FAQ)
+ ================================
+ 
+ Two sets of Questions and Answers (Q&A) are maintained.
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    bpf_design_QA
+    bpf_devel_QA
+ 
+ Syscall API
+ ===========
+ 
+ The primary info for the bpf syscall is available in the `man-pages`_
+ for `bpf(2)`_. For more information about the userspace API, see
+ Documentation/userspace-api/ebpf/index.rst.
+ 
+ Helper functions
+ ================
+ 
+ * `bpf-helpers(7)`_ maintains a list of helpers available to eBPF programs.
+ 
+ Maps
+ ====
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    maps
+ 
+ Program types
+ =============
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    prog_cgroup_sockopt
+    prog_cgroup_sysctl
+    prog_flow_dissector
+    bpf_lsm
+    prog_sk_lookup
+ 
+ 
+ Map types
+ =========
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    map_cgroup_storage
+ 
+ 
+ Testing and debugging BPF
+ =========================
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
+    drgn
+    s390
+ 
+ 
+ Licensing
+ =========
+ 
+ .. toctree::
+    :maxdepth: 1
+ 
++>>>>>>> bpf, doc: split general purpose eBPF documentation out of filter.rst
     bpf_licensing
 +   test_debug
 +   other
  
 +.. only::  subproject and html
  
 -Other
 -=====
 -
 -.. toctree::
 -   :maxdepth: 1
 +   Indices
 +   =======
  
 -   ringbuf
 -   llvm_reloc
 +   * :ref:`genindex`
  
  .. Links:
 -.. _networking-filter: ../networking/filter.rst
 -.. _man-pages: https://www.kernel.org/doc/man-pages/
 -.. _bpf(2): https://man7.org/linux/man-pages/man2/bpf.2.html
 -.. _bpf-helpers(7): https://man7.org/linux/man-pages/man7/bpf-helpers.7.html
 -.. _BPF and XDP Reference Guide: https://docs.cilium.io/en/latest/bpf/
 +.. _BPF and XDP Reference Guide: https://docs.cilium.io/en/latest/bpf/
diff --cc Documentation/bpf/maps.rst
index 2084b0e7cde8,f187ab0c7b23..000000000000
--- a/Documentation/bpf/maps.rst
+++ b/Documentation/bpf/maps.rst
@@@ -1,9 -1,43 +1,55 @@@
++<<<<<<< HEAD
 +=========
 +Map Types
 +=========
 +
 +.. toctree::
 +   :maxdepth: 1
 +   :glob:
 +
-    map_*
++   map_*
++=======
+ 
+ =========
+ eBPF maps
+ =========
+ 
+ 'maps' is a generic storage of different types for sharing data between kernel
+ and userspace.
+ 
+ The maps are accessed from user space via BPF syscall, which has commands:
+ 
+ - create a map with given type and attributes
+   ``map_fd = bpf(BPF_MAP_CREATE, union bpf_attr *attr, u32 size)``
+   using attr->map_type, attr->key_size, attr->value_size, attr->max_entries
+   returns process-local file descriptor or negative error
+ 
+ - lookup key in a given map
+   ``err = bpf(BPF_MAP_LOOKUP_ELEM, union bpf_attr *attr, u32 size)``
+   using attr->map_fd, attr->key, attr->value
+   returns zero and stores found elem into value or negative error
+ 
+ - create or update key/value pair in a given map
+   ``err = bpf(BPF_MAP_UPDATE_ELEM, union bpf_attr *attr, u32 size)``
+   using attr->map_fd, attr->key, attr->value
+   returns zero or negative error
+ 
+ - find and delete element by key in a given map
+   ``err = bpf(BPF_MAP_DELETE_ELEM, union bpf_attr *attr, u32 size)``
+   using attr->map_fd, attr->key
+ 
+ - to delete map: close(fd)
+   Exiting process will delete maps automatically
+ 
+ userspace programs use this syscall to create/access maps that eBPF programs
+ are concurrently updating.
+ 
+ maps can have different types: hash, array, bloom filter, radix-tree, etc.
+ 
+ The map is defined by:
+ 
+   - type
+   - max number of elements
+   - key size in bytes
+   - value size in bytes
++>>>>>>> bpf, doc: split general purpose eBPF documentation out of filter.rst

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=580125 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant