Skip to content

Feature: Add packet distribution mode - #64

Merged
davidjwbbc merged 8 commits into
5G-MAG:developmentfrom
davidjwbbc:feature/packet-controller
Jul 3, 2026
Merged

davidjwbbc merged 8 commits into
5G-MAG:developmentfrom
davidjwbbc:feature/packet-controller

Conversation

@davidjwbbc

@davidjwbbc davidjwbbc commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

This adds the packet operating mode for the MBSTF.

Note: This requires the fixes in PR 5G-MAG/rt-common-shared#68 to compile properly.

Closes #62

The packet distribution mode works in two operating modes PACKET_PROXY and PACKET_FORWARD_ONLY.

PACKET_PROXY operating mode

In this operating mode, the MBSTF receives UDP payloads via either a unicast UDP port or from a multicast service.

  • In unicast ingest mode only the MBSTF indicates its end of the unicast UDP port in its response to the DistSession creation request. The MBSTF is provided with User Plane addressing information for the network via the upTrafficFlowInfo field in the DistSession.

The MBSTF receives the payloads, encapsulates them with appropriate UDP/IP headers using the upTrafficFlowInfo data, and schedules them for delivery to the UPF at the maximum rate requested in the DistSession.

If the input bit rate exceeds the maximum bit rate requested then packets are dropped (a warning is logged in the MBSTF log output, but no feedback to the Application Provider).

If the incoming packets are larger than the UPF UDP tunnel MTU and the upTrafficFlowInfo indicates IPv4 encapsulation, then the MBSTF sends the payload as a series of fragmented packets with the appropriate encapsulated IP and UDP headers derived from the upTrafficFlowInfo. If the upTrafficFlowInfo indicates IPv6 encapsulation then a Packet Too Big ICMPv6 message to the AP is attempted with a revised MTU as payload.

PACKET_FORWARD_ONLY operating mode

In this operating mode, the MBSTF receives encapsulated packets via a unicast UDP tunnel.

The MBSTF indicates its end of the unicast UDP tunnel in its response to the DistSession creation request. The DistSession does not contain any upTrafficFlowInfo because the multicast header is already present as encapsulated headers.

Ingested packets are passed on directly to the UPF.

If the incoming packets are larger than the UPF UDP tunnel MTU and the encapsulated packets are IPv4 then the MBSTF will attempt to fragment the encapsulated packets.

If the encapsulated IP header has the Do Not Fragment (DF) bit set then the packet is discarded and an attempt is made to respond to the MBS Application Provider with a Destination Unreachable ICMP message with a revised MTU in the payload (for MTU discovery).

If the encapsulated packets are IPv6 then a Packet Too Big ICMPv6 message is attempted with a revised MTU as payload.

@davidjwbbc davidjwbbc added this to the Version 1.4.0 milestone Jun 22, 2026
@davidjwbbc davidjwbbc self-assigned this Jun 22, 2026
@davidjwbbc davidjwbbc added enhancement New feature or request MBSTF MBS Transport Function labels Jun 22, 2026
rjb1000
rjb1000 previously approved these changes Jun 22, 2026

@rjb1000 rjb1000 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, @davidjwbbc. Quite a lot of new code!

Just a few copyright years that need updating.

Comment thread src/mbstf/openapi-generator-templates/model-source.mustache Outdated
Comment thread src/mbstf/openapi-generator-templates/model-header.mustache Outdated
Comment thread src/mbstf/mbstf.yaml.in Outdated
Comment thread src/mbstf/ObjectListController.cc Outdated
Comment thread src/mbstf/ObjectStreamingController.cc Outdated
dsilhavy
dsilhavy previously approved these changes Jun 23, 2026

@dsilhavy dsilhavy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @davidjwbbc . I am adding two comments from an AI based review that I consider worth checking/commenting on. I also approve the PR as those are the only findings I have.

Comment thread src/mbstf/Packet.cc Outdated
Comment thread src/mbstf/Packet.cc Outdated
@davidjwbbc
davidjwbbc dismissed stale reviews from dsilhavy and rjb1000 via ccd1eba June 23, 2026 10:51
@davidjwbbc
davidjwbbc force-pushed the feature/packet-controller branch from ccd1eba to 6b34474 Compare June 23, 2026 10:59
@davidjwbbc

Copy link
Copy Markdown
Collaborator Author

Thanks, @davidjwbbc. Quite a lot of new code!

Just a few copyright years that need updating.

Done them all plus a few others that had been missed.

@davidjwbbc davidjwbbc moved this to Ready for review in 5MBS: User Services initial release Jun 23, 2026
rjb1000
rjb1000 previously approved these changes Jun 23, 2026
dsilhavy
dsilhavy previously approved these changes Jun 23, 2026
@davidjwbbc
davidjwbbc dismissed stale reviews from dsilhavy and rjb1000 via 3e5ce07 June 24, 2026 09:51
davidjwbbc added a commit to davidjwbbc/rt-mbs-function that referenced this pull request Jun 24, 2026
@davidjwbbc

Copy link
Copy Markdown
Collaborator Author

Fixed a bug found while testing MBSF integration.

@davidjwbbc
davidjwbbc requested review from dsilhavy and rjb1000 June 24, 2026 10:23
rjb1000
rjb1000 previously approved these changes Jun 24, 2026
@davidjwbbc davidjwbbc linked an issue Jun 24, 2026 that may be closed by this pull request
@davidjwbbc

Copy link
Copy Markdown
Collaborator Author

Added a fix for multicast subscription not binding to the correct interface (kernel guessed wrong in some cases).

@jordijoangimenez

Copy link
Copy Markdown
Contributor

@davidjwbbc, you mention we need your PR from rt-common-shared. However I see that the rt-common-shared is compied automatically (or comes directly from the repo?). Im investigating. It comes already inside the subprojects ?

@jordijoangimenez

Copy link
Copy Markdown
Contributor

I see now that it comes diriectly from your commit... nothing to do.

Comment thread tests/packet_stream_gen.py Outdated
The eager_start optional keyword argument was added to asyncio.create_task() in Python v3.14 but is present in loop.create_task() before Python v3.14.

See https://docs.python.org/3/library/asyncio-task.html#asyncio.create_task

Co-authored-by: Jordi J. Gimenez <87380947+jordijoangimenez@users.noreply.github.com>
@davidjwbbc
davidjwbbc merged commit 9672b33 into 5G-MAG:development Jul 3, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Ready for review to Done in 5MBS: User Services initial release Jul 3, 2026
@davidjwbbc
davidjwbbc deleted the feature/packet-controller branch July 3, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request MBSTF MBS Transport Function

Projects

Development

Successfully merging this pull request may close these issues.

MBSTF: Implement PACKET transport operation

4 participants