Skip to content

Build against the gNB's jbpf from the ocudu checkout - #9

Open
aferaudo wants to merge 1 commit into
tests/native-memcpyfrom
build/jbpf-from-ocudu
Open

aferaudo wants to merge 1 commit into
tests/native-memcpyfrom
build/jbpf-from-ocudu

Conversation

@aferaudo

@aferaudo aferaudo commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Build the controller against ocudu's external/jbpf (the tree the gNB is built from) instead of its own jbpf submodule. The controller is the jbpf IPC primary and the gNB the secondary: both map one shared region and exchange one channel and message format, so they must be built from the same jbpf. Until now that depended on two pins and two copies of the patches staying in step by hand, and nothing checked it.
  • Drop the duplicated patches (jbpf_patches/, apply_jbpf_patches.sh). ocudu already carries them byte for byte, and build.sh now runs ocudu's idempotent apply_jbpf_patches.sh. CMake builds jbpf with ocudu's options and warns when jbpf is not at ocudu's pin or lacks the monotonic-clock patch.
  • build.sh gains OCUDU_DIR (default ../ocudu-e3) and LIBE3_PREFIX (install libe3 without sudo). CI takes jbpf from the public wineslab/ocudu-e3 mirror.

Type of change

  • Bug fix
  • New feature / enhancement
  • New Service Model
  • Refactor (no behavior change). The controller's runtime code is untouched.
  • Documentation (README build section, new "jbpf comes from ocudu" section)
  • Test / CI / packaging
  • Other (explain):

Linked issue

None. No issue was opened for this change.

Mandatory test checklist

The libe3 items are mapped to their E3Controller equivalents. Items that don't apply to this repository say so.

  • Release build: ./build.sh passes.
    • Ubuntu 22.04 VM without sudo, run as LIBE3_PREFIX=… E3C_CMAKE_ARGS=-DASN1C_EXECUTABLE=/opt/asn1c/bin/asn1c ./build.sh.
    • The public ocudu-e3 (e3 @ e22c8a1, jbpf pin b15dd03) was cloned next to the controller, as in CI.
    • libe3 0.2.0, ocudu's jbpf and e3_controller / bench_stage_recording built.
  • Debug build: not run yet. The VM became unreachable before this step.
  • Tests: E3Controller has no ctest suite. Instead:
    • e3_verifier_cli builds.
    • make -C codelets -B compiles both codelets against ocudu's jbpf, and both pass the verifier (ecpri_iq_collect: 496 instructions, uplink_slot_collect: 353).
    • e3_controller starts and prints its usage.
  • Benchmark vs the base branch: bench_stage_recording against tests/native-memcpy not run yet (VM unreachable). No runtime code changed, so no difference is expected.
  • VERSION: N/A. E3Controller has no VERSION file or public API.
  • Public headers: none touched.
  • New build dependencies: no new packages, and --install-deps is unchanged. The new requirement is an ocudu checkout with external/jbpf populated. The README documents it, and both build.sh and cmake stop with the setup commands when it's missing (both tested).
  • libe3.pc: N/A, libe3 is unchanged.

CI checklist

E3Controller runs one workflow, build and measure, with no CI report or Commit policy workflows. Its equivalents:

  • build and measure is green on both legs (latrec=on, latrec=off) for the previous head a5eb38c. That head had the same tree (ce83282); only the commit message changed. CI re-runs on b74eac5.
  • Commit policy, run locally with libe3's scripts/check_commit_trailers.py --base origin/tests/native-memcpy --head HEAD: all 1 commit complies. AI assistance is disclosed with Assisted-by, and there are no AI Co-authored-by / Signed-off-by trailers.
  • SPDX/REUSE: E3Controller has no REUSE setup, and no new files were added.

Twin-repo coordination

  • This PR does not change the E3 wire protocol or any ABI. It only changes where the controller's jbpf comes from.

Paired change: the public mirror wineslab/ocudu-e3 needs jbpf_patches/jbpf_monotonic_time.patch and the current apply_jbpf_patches.sh from ocudu's e3 branch, which already has both. Until then, CI builds normally and configure warns that the monotonic patch is missing. The controller doesn't need that patch; a gNB built from the same tree does. I checked that state on the VM by copying the current script and patch into the test clone:

  • The first ./build.sh applied the patch and configured with no warning.
  • The second skipped every patch as already applied.

Paired PR: pending, to be mirrored into ocudu-e3 by the maintainer.

Workflow confirmation

  • The branch is a linear, fast-forward-able descendant of tests/native-memcpy (9cb0de4), with no merge commits (git log --merges origin/tests/native-memcpy..HEAD is empty).
  • It's a single commit with an imperative subject and a body explaining what and why. It builds on its own. There are no tests to run beyond the codelet verification above.
  • I have read and followed CONTRIBUTING.md (libe3's, applied to this repository).

Notes for reviewers

  • jbpf builds libck inside its own source tree (3p/ck), as it does in ocudu's build. Don't build ocudu and the controller at the same time from one checkout.
  • After this merges, existing checkouts keep a leftover jbpf/ folder. Delete it by hand.
  • On the pod: OCUDU_DIR=/workspace/ocudu-jbpf ./build.sh.

🤖 Generated with Claude Code

The controller is the jbpf IPC primary and the gNB the secondary, so both must
be built from the same jbpf. Instead of carrying a second jbpf as a submodule
and keeping its pin and patches in step with ocudu's by hand, build against
ocudu's external/jbpf (OCUDU_DIR, default ../ocudu-e3).

- Drop the jbpf submodule, apply_jbpf_patches.sh and jbpf_patches/; ocudu
  owns the tree and its patches, and build.sh runs ocudu's idempotent
  apply_jbpf_patches.sh over it.
- CMake: add_subdirectory(${JBPF_DIR}) with an explicit binary dir, ocudu's
  jbpf options (JBPF_STATIC, JBPF_EXPERIMENTAL_FEATURES), and configure-time
  warnings when jbpf is not at ocudu's pin or lacks the monotonic patch.
- Codelet Makefiles and the verifier take jbpf from the same place.
- build.sh: OCUDU_DIR, and LIBE3_PREFIX for installing libe3 without sudo.
- CI: fetch jbpf from the public wineslab/ocudu-e3 mirror.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@aferaudo
aferaudo force-pushed the build/jbpf-from-ocudu branch from a5eb38c to b74eac5 Compare October 7, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant