Feature: Add packet distribution mode - #64
Conversation
rjb1000
left a comment
There was a problem hiding this comment.
Thanks, @davidjwbbc. Quite a lot of new code!
Just a few copyright years that need updating.
dsilhavy
left a comment
There was a problem hiding this comment.
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.
ccd1eba to
6b34474
Compare
Done them all plus a few others that had been missed. |
|
Fixed a bug found while testing MBSF integration. |
|
Added a fix for multicast subscription not binding to the correct interface (kernel guessed wrong in some cases). |
|
@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 ? |
|
I see now that it comes diriectly from your commit... nothing to do. |
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>
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_PROXYandPACKET_FORWARD_ONLY.PACKET_PROXYoperating modeIn this operating mode, the MBSTF receives UDP payloads via either a unicast UDP port or from a multicast service.
upTrafficFlowInfofield in the DistSession.The MBSTF receives the payloads, encapsulates them with appropriate UDP/IP headers using the
upTrafficFlowInfodata, 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
upTrafficFlowInfoindicates IPv4 encapsulation, then the MBSTF sends the payload as a series of fragmented packets with the appropriate encapsulated IP and UDP headers derived from theupTrafficFlowInfo. If theupTrafficFlowInfoindicates IPv6 encapsulation then a Packet Too Big ICMPv6 message to the AP is attempted with a revised MTU as payload.PACKET_FORWARD_ONLYoperating modeIn 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
upTrafficFlowInfobecause 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.