Project

General

Profile

Actions

Feature #5827

open

osmo-pcu: Hardcoded limit of maximum number of 8 TRX per BTS

Added by pespin over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Target version:
-
Start date:
12/13/2022
Due date:
% Done:

0%

Spec Reference:

Description

osmo-pcu has hardcoded the maximum number of expected TRX per BTS in several places. This means bigger BTS cannot be used by osmo-pcu or could even make it crash.

pcuif_proto.h limits it to 8 TRX:

struct gsm_pcu_if_info_ind {
    uint32_t    version;
    uint32_t    flags;
    struct gsm_pcu_if_info_trx trx[8];    /* TRX infos per BTS */

bts.h struct gprs_rlcmac_bts limits it to 8:

struct gprs_rlcmac_trx trx[8];

bts.cpp bts_add_paging() limits the TRX amount to 8 in slot_mask:

/* ms is NULL if no specific taget was found */
int bts_add_paging(struct gprs_rlcmac_bts *bts, const struct paging_req_cs *req, struct GprsMs *ms)
{
        ...
    uint8_t slot_mask[8];
...
                    /* break, if we already marked a slot */
                    if ((slot_mask[tbf->trx->trx_no] & (1 << ts)))
                        break;
...
}

Actions #1

Updated by pespin over 1 year ago

I submitted following patch to at least have one less spot where the hardcoded value is placed:
https://gerrit.osmocom.org/c/osmo-pcu/+/30573 bts: Adapt slot_mask to trx defined array size

Actions #2

Updated by pespin over 1 year ago

Also related I sjut submitted:
https://gerrit.osmocom.org/c/osmo-pcu/+/30631 bts: Adapt trx check based on bts->trx[] defined array size

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)