Project

General

Profile

Actions

Bug #5991

open

Forward TSNS-PROV bsc->[bts->]pcu

Added by pespin about 1 year ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
03/31/2023
Due date:
% Done:

0%

Spec Reference:

Description

Currently, we pass 3 types of GPRS related timer IEs BSC->BTS through OML, which are then forwarded to osmo-pcu through PCUIF: RLCMAC, BSSGP and NS timers

This ticket is about the 3rd type, NS timers.
In osmo-bsc:

/* BTS Site Manager */
struct gsm_bts_sm {
    struct gsm_bts *bts[1]; /* only one bts supported so far */
    struct gsm_abis_mo mo;
    /* nanoBTS and old versions of osmo-bts behaves this way due to
       broken FSMs not following TS 12.21: they never do
       Dependency->Offline transition, but they should be OPSTARTed
       nevertheless during Dependnecy state to work. This field is
       used by all dependent NM objects. */
    bool peer_has_no_avstate_offline;
    struct {
        struct gsm_gprs_nse nse;
        struct gsm_gprs_nsvc nsvc[2];
    } gprs;
};

struct gsm_gprs_nse {
    struct gsm_abis_mo mo;
    uint16_t nsei;
    uint8_t timer[7];
};

DEFUN_USRATTR(cfg_bts_gprs_ns_timer,
          cfg_bts_gprs_ns_timer_cmd,
          X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
          "gprs ns timer " NS_TIMERS " <0-255>",
          GPRS_TEXT "Network Service\n" 
          "Network Service Timer\n" 
          NS_TIMERS_HELP "Timer Value\n")
{
    struct gsm_bts *bts = vty->index;
    int idx = get_string_value(gprs_ns_timer_strs, argv[0]);
    int val = atoi(argv[1]);

    GPRS_CHECK_ENABLED(bts);

    if (idx < 0 || idx >= ARRAY_SIZE(bts->site_mgr->gprs.nse.timer))
        return CMD_WARNING;

    bts->site_mgr->gprs.nse.timer[idx] = val;

    return CMD_SUCCESS;
}
struct msgb *nanobts_gen_set_nse_attr(struct gsm_bts_sm *bts_sm)
{
...
    /* all timers in seconds */
    OSMO_ASSERT(ARRAY_SIZE(bts_sm->gprs.nse.timer) < sizeof(buf));
    memcpy(buf, bts_sm->gprs.nse.timer, ARRAY_SIZE(bts_sm->gprs.nse.timer));
    msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, 7, buf);

The NS_TIMERS(_HELP) from osmo-bsc VTY actually come from libosmcore:

#define NS_TIMERS_COUNT 8
#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries|tsns-prov)" 
#define NS_TIMERS_HELP    \
    "(un)blocking Timer (Tns-block) timeout\n"        \
    "(un)blocking Timer (Tns-block) number of retries\n"    \
    "Reset Timer (Tns-reset) timeout\n"            \
    "Reset Timer (Tns-reset) number of retries\n"        \
    "Test Timer (Tns-test) timeout\n"            \
    "Alive Timer (Tns-alive) timeout\n"            \
    "Alive Timer (Tns-alive) number of retries\n"        \
    "SNS Provision Timer (Tsns-prov) timeout\n" 

First thing to notice: There are 8 timers in libosmocore, but the arrays of osmo-bsc are of size 7.
That's because the TSNS-PROV (3GPP TS 48.016 grep for "Tsns-prov") is missing, which is the 8ht one.

That's neither copied to the IE sent over Abis OML to the BTS, allegedly because ipaccess nanoBTS never supported SNS.

In our case, we do support SNS, and we want to pass that SNS timer (and maybe more timers if they exist in the same SNS spec?).

Hence, what needs to be done:
  • osmo-bsc: Update struct gsm_gprs_nse "uint8_t timer7;" to be of size NS_TIMERS_COUNT (maybe even better, update osmo-bsc to use new gprs_ns2.h?)
  • osmo-bsc: In nanobts_gen_set_nse_attr(), if BTS is nanoBTs keep sending 7 bytes (it's what nanoBTS expects). If it's an osmo-bts, then send the entire list of timers (8 bytes).
  • osmo-bts: Handle both 7-byte and 8-byte cases when receiving the OML IE.
  • osmo-bts/osmo-pcu: Update PCUIF to make the timer 8 bytes long (daniel , it would be great if you can provide feedback whether we may want to send more still not implemented timers later on, so that we can maybe extend the PCUIF array now to be 16 bytes).

So there's 2 independent steps here:
- Support passing TSNS-PROV BSC->BTS over Abis OML for osmo-bts
- Support passing TSNS-PROV BSC/BTS->PCU over PCUIF.


Related issues

Related to OsmoBSC - Bug #5335: osmo-bsc: Add VTY commands to configure T3.. and N3.. timers counters for gprsIn Progressjolly11/30/2021

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)