Skip to content

feat(conf): make the E2AP and E42 ports configurable - #9

Merged
teodora-vladic merged 2 commits into
duranta-project:devfrom
Thecave3:configurable-e2ap-port
Nov 18, 2026
Merged

teodora-vladic merged 2 commits into
duranta-project:devfrom
Thecave3:configurable-e2ap-port

Conversation

@Thecave3

@Thecave3 Thecave3 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

The nearRT-RIC IP address is read from flexric.conf, but the ports are literals in the init
functions (36421 in near_ric.c and e2_agent_api.c, 36422 in e42_iapp.c and e42_xapp.c).
Other nearRT-RICs use different ports (the O-RAN SC one listens on 36422), and README.md §6.1
already tells users to "set the e2ap_server_port", which is a local variable, not a setting.

This adds E2AP_PORT and E42_PORT under [NEAR-RIC] and the -e / -x flags. They resolve
like the IP address: flag, then config file, then the previous defaults (36421 / 36422), so an
existing flexric.conf behaves as before. fr_args_t gets two uint16_t fields, where 0 means
unset, and init_e42_iapp() / init_iapp_api() take the port as a parameter.

Unlike get_near_ric_ip(), a missing config file or key falls back to the default instead of
exiting, because RAN processes that embed the E2 agent fill fr_args_t themselves.

The matching near_ric_port key for the OAI e2_agent section is in
duranta-project/openairinterface5g#891 (draft until this merges).

@sgarg00 sgarg00 added ci-build-test Run the build and test suites for this pull request. retrigger-ci Re-run CI labels Oct 15, 2026
@sgarg00
sgarg00 deployed to ci-approval October 15, 2026 19:58 — with GitHub Actions Active
@github-actions github-actions Bot removed the retrigger-ci Re-run CI label Oct 15, 2026
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #49 | Passed

@teodora-vladic teodora-vladic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

ctest fails 2 of 13 cases on this base commit for an unrelated reason (the
agent-ric tests load the installed service model plugins from
/usr/local/lib/flexric, which came from a different build); the same 2 fail
before and after, with no new failures.

from the commit message. And anything additional unnecessary produced by AI

Comment thread src/xApp/e42_xapp.c Resolved
Comment thread src/ric/near_ric.c Resolved
Comment thread src/util/conf_file.c Resolved
Comment thread README.md Resolved
Comment thread src/util/conf_file.h Resolved
@Thecave3
Thecave3 deployed to ci-approval October 20, 2026 10:56 — with GitHub Actions Active
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #58 | Passed

Validation: SHA recognized in dc73850, using "origin/pr/9/head" as branch name
The following commit(s) are missing a Signed-off-by:

dc73850

Please use 'git commit -s' to sign your commits.
For detailed instructions, refer to the CONTRIBUTING file at the root of this repository.

Thecave3 added a commit to Thecave3/openairinterface5g that referenced this pull request Oct 27, 2026
Add an optional near_ric_port parameter to the e2_agent section, next to
near_ric_ip_addr, and pass it to FlexRIC as fr_args_t.e2ap_port in
nr-softmodem and nr-cuup. When it is not set the value stays 0 and FlexRIC
applies its own default (36421), so existing configurations are unchanged.
Values outside 1..65535 are rejected.

The README documents the parameter and, in the O-RAN SC section, replaces
the instruction to edit e2ap_server_port and recompile. The paramdef table
is wrapped in clang-format off/on like the other *_paramdef.h tables.

Requires the FlexRIC change that adds e2ap_port to fr_args_t
(duranta-project/flexric#9); the submodule has to be bumped past it.

Assisted-by: Claude:Sonnet 5.5
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from dc73850 to 1700478 Compare October 27, 2026 15:12
@Thecave3
Thecave3 deployed to ci-approval October 27, 2026 15:13 — with GitHub Actions Active
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from 1700478 to a6cf2b2 Compare October 27, 2026 15:15
@Thecave3
Thecave3 deployed to ci-approval October 27, 2026 16:05 — with GitHub Actions Active
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #66 | Passed

@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from a6cf2b2 to 473c68b Compare November 2, 2026 23:26
@Thecave3
Thecave3 deployed to ci-approval November 2, 2026 23:26 — with GitHub Actions Active
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #80 | Passed

@teodora-vladic teodora-vladic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address two comments below, rebase and I'll merge.

Comment thread README.md Resolved
Comment thread src/util/conf_file.h Resolved
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from 473c68b to 4bc9d10 Compare November 13, 2026 16:05
@Thecave3
Thecave3 deployed to ci-approval November 13, 2026 16:05 — with GitHub Actions Active
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from 4bc9d10 to 9afcbe7 Compare November 13, 2026 16:07
Thecave3 added a commit to Thecave3/openairinterface5g that referenced this pull request Nov 13, 2026
Add an optional near_ric_port parameter to the e2_agent section, next to
near_ric_ip_addr, and pass it to FlexRIC as fr_args_t.e2ap_port in
nr-softmodem and nr-cuup. It defaults to 36421, so existing configurations
are unchanged. Values outside 1..65535 are rejected.

The README documents the parameter and, in the O-RAN SC section, replaces
the instruction to edit e2ap_server_port and recompile. The paramdef table
is wrapped in clang-format off/on like the other *_paramdef.h tables.

Requires the FlexRIC change that adds e2ap_port to fr_args_t
(duranta-project/flexric#9); the submodule has to be bumped past it.
fr_args_t has no unset value there, so the port is always set here.

Assisted-by: Claude:Sonnet 5.5
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
@Thecave3
Thecave3 deployed to ci-approval November 13, 2026 16:24 — with GitHub Actions Active
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #97 | Passed

@Thecave3 Thecave3 removed the ci-build-test Run the build and test suites for this pull request. label Nov 16, 2026
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from 9afcbe7 to bc9bd7d Compare November 16, 2026 14:44
@Thecave3 Thecave3 added the ci-build-test Run the build and test suites for this pull request. label Nov 16, 2026

@teodora-vladic teodora-vladic left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't put noreply emails - i.e. Co-authored-by: Teodora Vladić <179130800+teodora-vladic@users.noreply.github.com>

Also, please split the commit into two - first moving config file reading parse_conf_file_arg() and second implementation of port args

Thecave3 and others added 2 commits November 17, 2026 10:49
Move the -c handling out of parse_args() into parse_conf_file_arg(),
called first by init_fr_args(). No functional change.

Assisted-by: Claude:Sonnet 5.5
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
Add E2AP_PORT and E42_PORT to flexric.conf and the -e and -x flags.
Precedence: defaults (36421, 36422), config file, command line.

Callers that fill fr_args_t themselves must now set the ports.

Assisted-by: Claude:Sonnet 5.5
Co-authored-by: Teodora Vladić <teodora.vladic@openairinterface.org>
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
@Thecave3 Thecave3 removed the ci-build-test Run the build and test suites for this pull request. label Nov 17, 2026
@Thecave3
Thecave3 force-pushed the configurable-e2ap-port branch from bc9bd7d to 6582d05 Compare November 17, 2026 15:49
@Thecave3 Thecave3 added the ci-build-test Run the build and test suites for this pull request. label Nov 17, 2026
@teodora-vladic teodora-vladic added the retrigger-ci Re-run CI label Nov 18, 2026
@github-actions github-actions Bot removed the retrigger-ci Re-run CI label Nov 18, 2026
@durantabot

Copy link
Copy Markdown
Collaborator

CI Build: #100 | Passed

@teodora-vladic
teodora-vladic merged commit fbd9859 into duranta-project:dev Nov 18, 2026
23 of 24 checks passed
Thecave3 added a commit to Thecave3/openairinterface5g that referenced this pull request Nov 18, 2026
…ric#9

Assisted-by: Claude:Sonnet 5.5
Signed-off-by: Andrea Lacava <thecave003@gmail.com>
Thecave3 added a commit to Thecave3/openairinterface5g that referenced this pull request Nov 24, 2026
…ric#9

Assisted-by: Claude:Sonnet 5.5
Signed-off-by: Andrea Lacava <thecave003@gmail.com>

This branch was successfully deployed

1 active deployment
ci-approval — 6582d057 Deployed Nov 18, 2026 by teodora-vladic via require-maintainer-approval #184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-build-test Run the build and test suites for this pull request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants