Lines Matching +full:- +full:- +full:github +full:- +full:branch
2 …<source media="(prefers-color-scheme: dark)" srcset="assets/libbpf-logo-sideways-darkbg.png" width…
3 <img src="assets/libbpf-logo-sideways.png" width="40%">
9 Libbpf *authoritative source code* is developed as part of [bpf-next Linux source
10 tree](https://kernel.googlesource.com/pub/scm/linux/kernel/git/bpf/bpf-next) under
11 `tools/lib/bpf` subdirectory and is periodically synced to Github.
13 Most of the mundane mechanical things like bpf and bpf-next tree merge, Git
14 history transformation, cherry-picking relevant commits, re-generating
15 auto-generated headers, etc. are taken care by
16 [sync-kernel.sh script](https://github.com/libbpf/libbpf/blob/master/scripts/sync-kernel.sh).
21 to this Github repository. Feel free to contribute fixes and additions if you
25 ------------------
28 expects that current HEAD of that repo points to bpf-next's master branch and
29 that there is a separate local branch pointing to bpf tree's master branch.
34 at latest `bpf-next/master`, and libbpf's Github repo is located at
35 `~/libbpf`, checked out to latest commit on `master` branch. It doesn't matter
36 from where to run `sync-kernel.sh` script, but we'll be running it from inside
40 $ cd ~/linux && git remote -v | grep -E '^(bpf|bpf-next)'
44 bpf-next
45 https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git (fetch)
46 bpf-next
47 ssh://git@gitolite.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git (push)
48 $ git branch -vv | grep -E '^? (master|bpf-master)'
49 * bpf-master 2d311f480b52 [bpf/master] riscv, bpf: Fix patch_text imp…
50 …master c8ee37bde402 [bpf-next/master] libbpf: Fix bpf_xdp_query(…
51 $ git checkout bpf-master && git pull && git checkout master && git pull
53 $ git log --oneline -n1
54 c8ee37bde402 (HEAD -> master, bpf-next/master) libbpf: Fix bpf_xdp_query() in old kernels
56 Your branch is up to date with 'libbpf/master'.
61 --------------------
63 First step is to always run `sync-kernel.sh` script. It expects three arguments:
66 $ scripts/sync-kernel.sh <libbpf-repo> <kernel-repo> <bpf-branch>
69 Note, that we'll store script's entire output in `/tmp/libbpf-sync.txt` and
74 $ scripts/sync-kernel.sh ~/libbpf ~/linux bpf-master | tee /tmp/libbpf-sync.txt
85 will show you a diff between expected state as of latest bpf-next and synced
86 Github repo state. And will ask if these changes look good. Please use your
93 --- /home/andriin/linux/include/uapi/linux/netdev.h 2023-02-27 16:54:42.270583372 -0800
94 +++ /home/andriin/libbpf/include/uapi/linux/netdev.h 2023-02-27 16:54:34.615530796 -0800
95 @@ -19,7 +19,7 @@
99 - * oflloading.
101 * @NETDEV_XDP_ACT_RX_SG: This feature informs if netdev implements non-linear
112 the original HEAD commit. `~/libbpf` repo will now be on a new branch, named
113 `libbpf-sync-<timestamp>` (e.g., `libbpf-sync-2023-02-28T00-53-40.072Z`).
115 Push this branch into your fork of `libbpf/libbpf` Github repo and create a PR:
118 $ git push --set-upstream origin libbpf-sync-2023-02-28T00-53-40.072Z
124 Total 32 (delta 21), reused 0 (delta 0), pack-reused 0
127 remote: Create a pull request for 'libbpf-sync-2023-02-28T00-53-40.072Z' on GitHub by visiting:
128 remote: https://github.com/anakryiko/libbpf/pull/new/libbpf-sync-2023-02-28T00-53-40.072Z
130 To github.com:anakryiko/libbpf.git
131 …* [new branch] libbpf-sync-2023-02-28T00-53-40.072Z -> libbpf-sync-2023-02-28T00-53…
132 Branch 'libbpf-sync-2023-02-28T00-53-40.072Z' set up to track remote branch 'libbpf-sync-2023-02-28…
138 By default Github will turn above branch name into PR with subject "Libbpf sync
140 "Libbpf sync 2023-02-28T00:53:40.072Z". Thank you!
142 **Please don't forget to paste contents of /tmp/libbpf-sync.txt into PR
149 **Please, keep naming and style consistent.** Prefix CI-related fixes with `ci: `
151 sure that each such commit has `Signed-off-by: Your Full Name <your@email.com>`,
156 ---------------------
163 [c2495832ced4](https://github.com/libbpf/libbpf/commit/c2495832ced4239bcd376b9954db38a6addd89ca)
170 -------------------------
175 …d kernel feature. It might look something like this in [CI logs](https://github.com/libbpf/libbpf/…
186 allowlist, like was [done](https://github.com/libbpf/libbpf/commit/ea284299025bf85b85b4923191de6463…
190 $ find . -name '*LIST*'
191 ./ci/vmtest/configs/ALLOWLIST-4.9.0
192 ./ci/vmtest/configs/DENYLIST-5.5.0
193 ./ci/vmtest/configs/DENYLIST-latest.s390x
194 ./ci/vmtest/configs/DENYLIST-latest
195 ./ci/vmtest/configs/ALLOWLIST-5.5.0
199 add that as a separate commit. **Please keep using the same branch name, so
204 -----------------------------
206 To compile latest BPF selftests against old kernels, we check in pre-generated
207 [vmlinux.h](https://github.com/libbpf/libbpf/blob/master/.github/actions/build-selftests/vmlinux.h)
208 header file, located at `.github/actions/build-selftests/vmlinux.h`, which
213 This will looks something like this in [CI logs](https://github.com/libbpf/libbpf/actions/runs/4198…
217 …aration of 'struct bpf_rb_root' will not be visible outside of this function [-Werror,-Wvisibility]
220 …aration of 'struct bpf_rb_root' will not be visible outside of this function [-Werror,-Wvisibility]
223 …aration of 'struct bpf_rb_root' will not be visible outside of this function [-Werror,-Wvisibility]
232 You'll need to build latest upstream kernel from `bpf-next` tree, using BPF
233 selftest configs. Concat arch-agnostic and arch-specific configs, build kernel,
240 $ make -j$(nproc) olddefconfig all
242 $ bpftool btf dump file ~/linux/vmlinux format c > ~/libbpf/.github/actions/build-selftests/vmlinux…
243 $ cd ~/libbpf && git add . && git commit -s
247 it on top of sync commits. Push to Github and let libbpf CI do the checking for
248 you. See [this commit](https://github.com/libbpf/libbpf/commit/34212c94a64df8eeb1dd5d064630a65e1dfd…
252 ---------------
255 user, you might end up with `~/linux` repo on temporary sync-related branch.
257 "copy-on-write" philosophy and creates new branches where necessary. So it's
262 $ git branch | grep -E 'libbpf-.*Z'
263 libbpf-baseline-2023-02-28T00-43-35.146Z
264 libbpf-bpf-baseline-2023-02-28T00-43-35.146Z
265 libbpf-bpf-tip-2023-02-28T00-43-35.146Z
266 libbpf-squash-base-2023-02-28T00-43-35.146Z
267 * libbpf-squash-tip-2023-02-28T00-43-35.146Z
268 $ git cherry-pick --abort
269 $ git checkout master && git branch | grep -E 'libbpf-.*Z' | xargs git br -D
270 Switched to branch 'master'
271 Your branch is up to date with 'bpf-next/master'.
272 Deleted branch libbpf-baseline-2023-02-28T00-43-35.146Z (was 951bce29c898).
273 Deleted branch libbpf-bpf-baseline-2023-02-28T00-43-35.146Z (was 3a70e0d4c9d7).
274 Deleted branch libbpf-bpf-tip-2023-02-28T00-43-35.146Z (was 2d311f480b52).
275 Deleted branch libbpf-squash-base-2023-02-28T00-43-35.146Z (was 957f109ef883).
276 Deleted branch libbpf-squash-tip-2023-02-28T00-43-35.146Z (was be66130d2339).
277 Deleted branch libbpf-tip-2023-02-28T00-43-35.146Z (was 2d311f480b52).