Skip to content

Update libe3 to 0.4.0 and make its log level configurable - #21

Merged
aferaudo merged 2 commits into
mainfrom
feat/libe3-0.4.0
Nov 15, 2026
Merged

aferaudo merged 2 commits into
mainfrom
feat/libe3-0.4.0

Conversation

@aferaudo

Copy link
Copy Markdown
Collaborator

Summary

  • libe3 0.2.5 → 0.4.0. libe3 changed both wire formats in between, so a dApp has to move to 0.4.0 as well:

    • JSON (0.2.6, JSON payloads nested like Aerial, and report granted subscription values libe3#118): ranFunctionData, actionData, reportData and xAppControlData are nested JSON, as Aerial writes them, instead of hex strings.
    • ASN.1 (0.2.8, 0.2.9): identifiers up to 65535, setup strings as OCTET STRING, a new periodicity range.
    • 0.4.0: setup, subscription and message-ack responses can carry the reason for a refusal.

    As a RAN, libe3 also ends a subscription when its subscriptionTime runs out (0.2.10). The controller's code does not change: every libe3 symbol, field and default it uses is the same in 0.4.0.

  • logging.libe3_log_level, 0 (none) to 5 (trace), default 2 (warn). main() hard-coded 5. From 4 up, libe3 writes and flushes a line for every PDU it sends and receives, in the message path: the line for a dApp's message falls inside the dApp → controller hop. Set 5 to get the old output back.

  • Merge order: this PR first, then Send dApp reports to the xApps through the gNB's E2SM-DAPP #14 is rebased onto it. The only conflict is in src/e3_config.cpp, where both add a range check and a startup line at the same place.

Tested

  • On 2026-11-12 the code of this branch (only comments have changed since) ran on an x86 and an ARM (Grace) server with ocudu e3 153a38e75a, a Foxconn RU and one idle UE, with the libe3 log level at 2:
    • 16 cases with adaptive_cpu (x86, ARM) and adaptive_cuda (ARM), both on libe3 0.4.0: JSON and ASN.1, over ZMQ and POSIX. Every UL slot was published (800 per second), and the dApps' PRB blocks were applied by the gNB's scheduler.
    • 8 cases that block all 273 PRBs, 10 times each: 80 of 80 blocks received, sent to the gNB and applied.
    • One x86 run lost its gNB to an assertion in the gNB (is_state_accepting_pdu) 37 s in and was run again.
  • libe3's scripts/check_commit_trailers.py passes on both commits.
  • Not run: each commit built on its own, the unit tests, and Send dApp reports to the xApps through the gNB's E2SM-DAPP #14's dApp report relay on 0.4.0 (libe3's DAppReport API is the same in both versions, but reports were off in those runs). CI builds the head with latrec off and on.

Type of change

  • Bug fix
  • New feature / enhancement
  • New Service Model
  • Refactor (no behavior change)
  • Documentation
  • Test / CI / packaging
  • Other (explain): dependency update, libe3 0.2.5 → 0.4.0

Linked issue

None.

Twin-repo coordination

  • This PR does not change the E3 wire protocol or public ABI, OR a paired PR exists in each affected twin repo (link below).
  • This PR does not change the wire format or a behavior a peer (OAI, Aerial, OCUDU) can observe, OR I added a row to the change ledger in docs/interop.md.

Neither applies. Through libe3, this PR changes the wire format the controller speaks; the changes are libe3's own, listed in its release notes for 0.2.6 to 0.4.0. dApps on libe3 0.2.5 must move to 0.4.0, and the dApp-side update is not in a PR yet.

Paired PR(s): none yet.

🤖 Generated with Claude Code

main() set libe3's log level to 5 (trace). From 4 up, libe3 logs every PDU
it sends and receives, each line written to its own file and flushed under
a mutex, in the message path: the line for a dApp message falls inside the
dApp-to-controller hop. On x86 the 2026-11-12 campaign left a libe3 log of
2 million lines.

The level is now logging.libe3_log_level, 0 (none) to 5 (trace), checked at
startup and printed with the config. The default and the shipped configs
use 2 (warn); 5 gives the old output back.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
The controller is a libe3 RAN, and between 0.2.5 and 0.4.0 libe3 changed
both wire formats, so a dApp still on 0.2.5 no longer talks to it:

- JSON (0.2.6, wineslab/libe3#118): ranFunctionData, actionData,
  reportData and xAppControlData are nested JSON, as Aerial writes them,
  instead of hex strings.
- ASN.1 (0.2.8, 0.2.9): identifiers go up to 65535, setup strings are
  OCTET STRINGs, and the periodicity range changed.
- 0.4.0: setup, subscription and message-ack responses can carry the
  reason for a refusal.

As a RAN it also ends a subscription when its subscriptionTime runs out
(0.2.10).

The controller needs no code change: every libe3 symbol, field and default
it uses is the same in 0.4.0. It ran on 0.4.0 on x86 and ARM in the
2026-11-12 campaign, with adaptive_cpu and adaptive_cuda also on 0.4.0,
JSON and ASN.1, over ZMQ and POSIX.

The two comments about 0.2.x writing ranFunctionData as a hex string now
name the versions.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@aferaudo
aferaudo merged commit 2a2545b into main Nov 15, 2026
2 checks passed
@aferaudo
aferaudo deleted the feat/libe3-0.4.0 branch November 15, 2026 23:38
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