Skip to content

Commit 04554d1

Browse files
committed
Merge: bpf, xdp: update to 6.2
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/2317 Rebase bpf and xdp to 6.2. Bugzilla: https://bugzilla.redhat.com/2177177 Signed-off-by: Jerome Marchand <jmarchan@redhat.com> Approved-by: Artem Savkov <asavkov@redhat.com> Approved-by: Felix Maurer <fmaurer@redhat.com> Approved-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Jan Stancek <jstancek@redhat.com>
2 parents cecbbe3 + a1ff4e3 commit 04554d1

File tree

275 files changed

+20006
-4190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

275 files changed

+20006
-4190
lines changed

Documentation/bpf/bpf_design_QA.rst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,3 +298,48 @@ A: NO.
298298

299299
The BTF_ID macro does not cause a function to become part of the ABI
300300
any more than does the EXPORT_SYMBOL_GPL macro.
301+
302+
Q: What is the compatibility story for special BPF types in map values?
303+
-----------------------------------------------------------------------
304+
Q: Users are allowed to embed bpf_spin_lock, bpf_timer fields in their BPF map
305+
values (when using BTF support for BPF maps). This allows to use helpers for
306+
such objects on these fields inside map values. Users are also allowed to embed
307+
pointers to some kernel types (with __kptr and __kptr_ref BTF tags). Will the
308+
kernel preserve backwards compatibility for these features?
309+
310+
A: It depends. For bpf_spin_lock, bpf_timer: YES, for kptr and everything else:
311+
NO, but see below.
312+
313+
For struct types that have been added already, like bpf_spin_lock and bpf_timer,
314+
the kernel will preserve backwards compatibility, as they are part of UAPI.
315+
316+
For kptrs, they are also part of UAPI, but only with respect to the kptr
317+
mechanism. The types that you can use with a __kptr and __kptr_ref tagged
318+
pointer in your struct are NOT part of the UAPI contract. The supported types can
319+
and will change across kernel releases. However, operations like accessing kptr
320+
fields and bpf_kptr_xchg() helper will continue to be supported across kernel
321+
releases for the supported types.
322+
323+
For any other supported struct type, unless explicitly stated in this document
324+
and added to bpf.h UAPI header, such types can and will arbitrarily change their
325+
size, type, and alignment, or any other user visible API or ABI detail across
326+
kernel releases. The users must adapt their BPF programs to the new changes and
327+
update them to make sure their programs continue to work correctly.
328+
329+
NOTE: BPF subsystem specially reserves the 'bpf\_' prefix for type names, in
330+
order to introduce more special fields in the future. Hence, user programs must
331+
avoid defining types with 'bpf\_' prefix to not be broken in future releases.
332+
In other words, no backwards compatibility is guaranteed if one using a type
333+
in BTF with 'bpf\_' prefix.
334+
335+
Q: What is the compatibility story for special BPF types in allocated objects?
336+
------------------------------------------------------------------------------
337+
Q: Same as above, but for allocated objects (i.e. objects allocated using
338+
bpf_obj_new for user defined types). Will the kernel preserve backwards
339+
compatibility for these features?
340+
341+
A: NO.
342+
343+
Unlike map value types, there are no stability guarantees for this case. The
344+
whole API to work with allocated objects and any support for special fields
345+
inside them is unstable (since it is exposed through kfuncs).

Documentation/bpf/bpf_devel_QA.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,33 @@ is a guarantee that the reported issue will be overlooked.**
4444
Submitting patches
4545
==================
4646

47+
Q: How do I run BPF CI on my changes before sending them out for review?
48+
------------------------------------------------------------------------
49+
A: BPF CI is GitHub based and hosted at https://github.com/kernel-patches/bpf.
50+
While GitHub also provides a CLI that can be used to accomplish the same
51+
results, here we focus on the UI based workflow.
52+
53+
The following steps lay out how to start a CI run for your patches:
54+
55+
- Create a fork of the aforementioned repository in your own account (one time
56+
action)
57+
58+
- Clone the fork locally, check out a new branch tracking either the bpf-next
59+
or bpf branch, and apply your to-be-tested patches on top of it
60+
61+
- Push the local branch to your fork and create a pull request against
62+
kernel-patches/bpf's bpf-next_base or bpf_base branch, respectively
63+
64+
Shortly after the pull request has been created, the CI workflow will run. Note
65+
that capacity is shared with patches submitted upstream being checked and so
66+
depending on utilization the run can take a while to finish.
67+
68+
Note furthermore that both base branches (bpf-next_base and bpf_base) will be
69+
updated as patches are pushed to the respective upstream branches they track. As
70+
such, your patch set will automatically (be attempted to) be rebased as well.
71+
This behavior can result in a CI run being aborted and restarted with the new
72+
base line.
73+
4774
Q: To which mailing list do I need to submit my BPF patches?
4875
------------------------------------------------------------
4976
A: Please submit your BPF patches to the bpf kernel mailing list:

0 commit comments

Comments
 (0)