Project

General

Profile

Actions

Feature #2631

closed

allow arbitrary endpoint names, be more dynamic in allocation and iteration

Added by neels over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
11/10/2017
Due date:
% Done:

100%

Spec Reference:

Description

Break that direct link between '23@mgw' endpoint name and the 23rd item in an array of endpoints.

A client should be able to name their endpoints arbitrarily, say the MSC has "1@msc" and the BSC has "1@bsc" or even something completely random and/or not related to integer digits. Upon CRCX, we create an endpoint in an llist, manage it by whichever name the client gave it, by looking up the name in the llist.

(Optimizations applied (later) might be to have some fixed size of unused endpoints instead of allocating single llist items, and to use a hashed list for faster endpoint lookup. But for starters, allocating the few endpoints we will be using one by one and iterating all of them to find a given name is far sufficient.)

A practical example is MSC and BSC using the same OsmoMGW in a network-in-the-box installation. In the current osmo-mgw, I want to tell the MSC to use a given range of endpoints, and the BSC to use another range, so that they don't accidentally claim the same endpoints for separate purposes. But how to pick the ranges? Say I am ambitious and just to be future compatible, I pick 1..1024 for the MSC and 1025..2048 for the BSC. Now the MGW would maintain 2k unused endpoint structs, regardless of how many are actually in use, out of a cosmetic choice of identifier tokens. The MGW would allocate all of these unused endpoints and iterate over all of them during every mgcp_keepalive_cb().

This is a leftover from osmo-bsc_mgcp's tactics of immediately binding all of the RTP ports, where it indeed makes sense to also have all of them allocated; and of that "port magic" where the endpoint ID directly corresponds to a specific port number. Let's move away from that.


Related issues

Related to OsmoMGW - Bug #2632: osmo-mgw's VTY config modifies the length used for internal endpoints array without reallocating the arrayCloseddexter11/10/2017

Actions
Related to OsmoMGW - Bug #2633: 'N@mgw' number translation uses base-16 which will break for decimal endpoint IDs near the number of reserved endpointsClosedneels11/10/2017

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)