Compare commits

...

10 Commits

Author SHA1 Message Date
Oliver Smith c4e21c1f17 Bump version: 1.7.1.3-6a6a1 → 1.7.2
Change-Id: I84a02243bf20c8f35688e0098cca4969402aa38f
2023-12-12 16:44:54 +01:00
Philipp Maier 6a6a176a32 pcuif_proto: signal BTS model via PCUIF
At the moment the PCU has no way of knowing with which BTS model it is
used with. However, some BTS models may require slightly different
behaviour by the PCU, depending on which BTS model is used. So, lets add
an additional bts_model field to struct gsm_pcu_if_info_ind in order to
convey the exact BTS model to the PCU.

Related: OS#6191
Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6
(cherry picked from commit 4a6a2fdf7e)
2023-12-12 16:43:19 +01:00
Philipp Maier 12a23c1677 pcuif_proto: clean up last remains of old PCUIF v10
There are still some remains that are related to the old PCUIF v10
protocol version. Let's clean those up.

Related: OS#5927
Depends: osmo-pcu.git I68a3f59d5c960ae3a4fbd74f9d4a894295cb9ed8
Change-Id: I04f7108c94c99c9920192177087748e8b89b3106
(cherry picked from commit 6ed4a9a1eb)
2023-12-12 16:43:10 +01:00
Philipp Maier 75a087d16b pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
The PCUIF flag PCU_IF_FLAG_SYSMO was originally used by osmo-bts-sysmo
to signal to the PCU that the direct PHY access for the sysmo-bts DSP
should be enabled. With time, support for other BTS models was added and
the flag became a synonym for "direct PHY access", so it makes sense to
rename it to "PCU_IF_FLAG_DIRECT_PHY"

Related: OS#6191
Depends: osmo-pcu.git I29b7b78a3a91d062b9ea3cd72623d30618cd3f0b
Change-Id: Ib556a93f7d7d7dbe1e96c4a0802bc802241b2b2d
(cherry picked from commit 955b7dc637)
2023-12-12 16:42:57 +01:00
Oliver Smith f79a23bab0 Bump version: 1.7.0.5-2f73 → 1.7.1
Change-Id: I7125471f5962e558b361802835055e4a8c8f6a3c
2023-10-09 10:11:11 +02:00
Andreas Eversberg 2f735fab34 Increase RR scheduler priority to 20, to avoid dropped bursts
If frames are not deliverd fast enough to the DSP, bursts will get
dropped. The osmo-bts-sysmo process must have priority over other
processes, so it can deliver frames fast enough.

Related: OS#6199
Change-Id: I2394e6bbc00a1d47987dbe7b70f4b5cbedf69b10
(cherry picked from commit d265ce68b2)
2023-10-09 10:07:37 +02:00
Andreas Eversberg 5ff3e5a627 Do not prefix UI header to System Information Type 10
System Information Type 10 uses short L2 header that is transmitted as
Bter UI frame. The complete frame is sent by BSC, including short L2
header. Only the SACCH layer 1 header is added by the BTS.

A switch() statement is used, so other System Information with short L2
header can be added in the future.

Change-Id: Ifede42bfd84ea5914b559a20ae68f594d2ee1a5c
(cherry picked from commit ddc15996dd)
2023-10-09 10:07:31 +02:00
Andreas Eversberg 5c70c93bc6 ASCI: Ignore LAPD frames from MS, while the uplink is not active
Do not forward any message that is received on the uplink to LAPD while
the uplink is not active. If the MS did not recognize (fast enough) that
the uplink is free, it may continue to transmit LAPD messages. A
response by LAPD to these messages is not desired and not required. If
LAPD would respond, it would cause stopping transmission of UPLINK FREE
messages. No MS could access the uplink anymore.

Note: UPLINK FREE messages are repeated automatically until a different
      message is transmitted.

Related: OS#5781
Change-Id: I5075115123055b2997481f56ddf473430a1dc9e3
(cherry picked from commit f5c1cd3889)
2023-10-09 10:07:23 +02:00
Oliver Smith 65ffbbfea1 systemd: remove RestartPreventExitStatus=1
Fix OsmoBTS not restarting if e.g. an external gsmtap IP is configured
that is currently not available. Also make the service files more
consistent with other Osmocom projects.

Partial revert of ae2473c2 ("systemd: Do not restart with a broken
config file or such").

Related: SYS#6581
Change-Id: Ieeed858c159839ebaa27b2be35a597fb86874c4b
(cherry picked from commit 188f76275a)
2023-10-09 10:07:11 +02:00
Vadim Yanitskiy 67d3173706 l1sap: l1sap_tch_ind(): fix segfault on stale TCH.ind
It was reported that osmo-bts-sysmo is crashing due to a TCH.ind
primitive being received by l1sap_tch_ind() for an lchan, which
is operating neither in speech nor data, but in signalling mode.

It's not clear which scenario is causing this situation.  My best
guess is that one or more TCH.ind primitive(s) remain waiting in
the lower layers and bob up right after the channel mode change.

This can happen, for instance, when a dynamic timeslot gets
switched from TCH/F or TCH/H to PDCH or SDCCH/8.

Change-Id: I2d270ab654fdd9d19d1708ff6c4b4e902bd5d0a3
Fixes: d1f8f3429 "l1sap: proper rate adaptation for CSD"
Closes: OS#6180
(cherry picked from commit aa06f97326)
2023-10-09 10:06:59 +02:00
8 changed files with 85 additions and 16 deletions

View File

@ -11,7 +11,6 @@ WorkingDirectory=%S/osmocom
RuntimeDirectory=osmo-bts
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
CPUSchedulingPolicy=rr

View File

@ -11,7 +11,6 @@ WorkingDirectory=%S/osmocom
RuntimeDirectory=osmo-bts
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
CPUSchedulingPolicy=rr

View File

@ -13,12 +13,11 @@ StateDirectory=osmocom
WorkingDirectory=%S/osmocom
Restart=always
RestartSec=2
RestartPreventExitStatus=1
# CPU scheduling policy:
CPUSchedulingPolicy=rr
# For real-time scheduling policies an integer between 1 (lowest priority) and 99 (highest priority):
CPUSchedulingPriority=11
CPUSchedulingPriority=20
# See sched(7) for further details on real-time policies and priorities
[Install]

24
debian/changelog vendored
View File

@ -1,3 +1,27 @@
osmo-bts (1.7.2) unstable; urgency=medium
[ Philipp Maier ]
* pcuif_proto: rename PCU_IF_FLAG_SYSMO to PCU_IF_FLAG_DIRECT_PHY
* pcuif_proto: clean up last remains of old PCUIF v10
* pcuif_proto: signal BTS model via PCUIF
-- Oliver Smith <osmith@sysmocom.de> Tue, 12 Dec 2023 16:44:53 +0100
osmo-bts (1.7.1) unstable; urgency=medium
[ Vadim Yanitskiy ]
* l1sap: l1sap_tch_ind(): fix segfault on stale TCH.ind
[ Oliver Smith ]
* systemd: remove RestartPreventExitStatus=1
[ Andreas Eversberg ]
* ASCI: Ignore LAPD frames from MS, while the uplink is not active
* Do not prefix UI header to System Information Type 10
* Increase RR scheduler priority to 20, to avoid dropped bursts
-- Oliver Smith <osmith@sysmocom.de> Mon, 09 Oct 2023 10:11:10 +0200
osmo-bts (1.7.0) unstable; urgency=medium
[ arehbein ]

View File

@ -7,12 +7,11 @@
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
#define PCU_IF_VERSION 0x0b
#define PCU_IF_VERSION 0x0c
#define TXT_MAX_LEN 128
/* msg_type */
#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */
#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */
#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */
#define PCU_IF_MSG_SUSP_REQ 0x03 /* BTS forwards GPRS SUSP REQ to PCU */
#define PCU_IF_MSG_APP_INFO_REQ 0x04 /* BTS asks PCU to transmit APP INFO via PACCH */
@ -29,8 +28,6 @@
/* sapi */
#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */
#define PCU_IF_SAPI_AGCH 0x02 /* assignment on AGCH */
#define PCU_IF_SAPI_PCH 0x03 /* paging/assignment on PCH */
#define PCU_IF_SAPI_BCCH 0x04 /* SI on BCCH */
#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */
#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */
@ -40,7 +37,7 @@
/* flags */
#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */
#define PCU_IF_FLAG_SYSMO (1 << 1)/* access PDCH of sysmoBTS directly */
#define PCU_IF_FLAG_DIRECT_PHY (1 << 1)/* access PHY directly via dedicated hardware support */
#define PCU_IF_FLAG_CS1 (1 << 16)
#define PCU_IF_FLAG_CS2 (1 << 17)
#define PCU_IF_FLAG_CS3 (1 << 18)
@ -60,6 +57,17 @@
#define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */
#define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */
/* BTS model */
enum gsm_pcuif_bts_model {
PCU_IF_BTS_MODEL_UNSPEC,
PCU_IF_BTS_MODEL_LC15,
PCU_IF_BTS_MODEL_OC2G,
PCU_IF_BTS_MODEL_OCTPHY,
PCU_IF_BTS_MODEL_SYSMO,
PCU_IF_BTS_MODEL_TRX,
PCU_IF_BTS_MODEL_RBS,
};
#define PCU_IF_NUM_NSVC 2
#define PCU_IF_NUM_TRX 8
@ -173,6 +181,7 @@ struct gsm_pcu_if_info_ind {
struct in_addr v4;
struct in6_addr v6;
} remote_ip[PCU_IF_NUM_NSVC];
uint8_t bts_model; /* enum gsm_pcuif_bts_model */
} __attribute__ ((packed));
struct gsm_pcu_if_act_req {
@ -256,7 +265,6 @@ struct gsm_pcu_if {
union {
struct gsm_pcu_if_data data_req;
struct gsm_pcu_if_data data_cnf;
struct gsm_pcu_if_data_cnf data_cnf2;
struct gsm_pcu_if_data data_ind;
struct gsm_pcu_if_susp_req susp_req;

View File

@ -1810,9 +1810,20 @@ static int l1sap_ph_data_ind(struct gsm_bts_trx *trx,
if (lchan->ho.active == HANDOVER_WAIT_FRAME)
handover_frame(lchan);
/* report first valid received frame to VGCS talker process */
if (rsl_chan_rt_is_asci(lchan->rsl_chan_rt) && lchan->asci.talker_active == VGCS_TALKER_WAIT_FRAME)
vgcs_talker_frame(lchan);
if (rsl_chan_rt_is_asci(lchan->rsl_chan_rt)) {
/* report first valid received frame to VGCS talker process */
if (lchan->asci.talker_active == VGCS_TALKER_WAIT_FRAME)
vgcs_talker_frame(lchan);
/* Do not forward any message that is received on the uplink to LAPD while
* the uplink is not active. If the MS did not recognize (fast enough) that
* the uplink is free, it may continue to transmit LAPD messages. A
* response by LAPD to these messages is not desired and not required. If
* LAPD would respond, it would cause stopping transmission of UPLINK FREE
* messages. No MS could access the uplink anymore.
*/
if (lchan->asci.talker_active != VGCS_TALKER_ACTIVE)
return 0;
}
if (L1SAP_IS_LINK_SACCH(link_id))
le = &lchan->lapdm_ch.lapdm_acch;
@ -1979,6 +1990,7 @@ static int l1sap_tch_ind(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap,
send_ul_rtp_packet_data(lchan, fn, msg->data, msg->len);
break;
case RSL_CMOD_SPD_SIGN:
return 0; /* drop stale TCH.ind */
default: /* shall not happen */
OSMO_ASSERT(0);
}

View File

@ -53,8 +53,6 @@ static int avail_lai = 0, avail_nse = 0, avail_cell = 0, avail_nsvc[2] = {0, 0};
static const char *sapi_string[] = {
[PCU_IF_SAPI_RACH] = "RACH",
[PCU_IF_SAPI_AGCH] = "AGCH",
[PCU_IF_SAPI_PCH] = "PCH",
[PCU_IF_SAPI_BCCH] = "BCCH",
[PCU_IF_SAPI_PDTCH] = "PDTCH",
[PCU_IF_SAPI_PRACH] = "PRACH",
@ -232,6 +230,25 @@ static void info_ind_fill_trx(struct gsm_pcu_if_info_trx *trx_info,
}
}
static enum gsm_pcuif_bts_model bts_model_from_variant(enum gsm_bts_type_variant variant)
{
switch (variant) {
case BTS_OSMO_LITECELL15:
return PCU_IF_BTS_MODEL_LC15;
case BTS_OSMO_OC2G:
return PCU_IF_BTS_MODEL_OC2G;
case BTS_OSMO_OCTPHY:
return PCU_IF_BTS_MODEL_OCTPHY;
case BTS_OSMO_SYSMO:
return PCU_IF_BTS_MODEL_SYSMO;
case BTS_OSMO_TRX:
case BTS_OSMO_VIRTUAL:
return PCU_IF_BTS_MODEL_TRX;
default:
return PCU_IF_BTS_MODEL_UNSPEC;
}
}
int pcu_tx_info_ind(void)
{
struct msgb *msg;
@ -264,7 +281,7 @@ int pcu_tx_info_ind(void)
LOGP(DPCU, LOGL_INFO, "BTS is down\n");
if (pcu_direct)
info_ind->flags |= PCU_IF_FLAG_SYSMO;
info_ind->flags |= PCU_IF_FLAG_DIRECT_PHY;
info_ind->bsic = bts->bsic;
/* RAI */
@ -360,6 +377,8 @@ int pcu_tx_info_ind(void)
info_ind_fill_trx(&info_ind->trx[trx->nr], trx);
}
info_ind->bts_model = bts_model_from_variant(bts->variant);
return pcu_sock_send(msg);
}

View File

@ -993,6 +993,15 @@ static int rsl_rx_osmo_etws_cmd(struct gsm_bts_trx *trx, struct msgb *msg)
* \param[in] len length of \a current in octets */
static inline void lapdm_ui_prefix(uint8_t *buf, uint32_t *valid, const uint8_t *current, uint8_t osmo_si, uint16_t len)
{
/* Special case for short header SI. Do not pre-fix the two-byte UI header. */
switch (osmo_si) {
case SYSINFO_TYPE_10:
(*valid) |= (1 << osmo_si);
memset(buf, GSM_MACBLOCK_PADDING, sizeof(sysinfo_buf_t));
memcpy(buf, current, len);
return;
}
/* We have to pre-fix with the two-byte LAPDM UI header */
if (len > sizeof(sysinfo_buf_t) - 2) {
LOGP(DRSL, LOGL_ERROR, "Truncating received SI%s (%u -> %zu) to prepend LAPDM UI header (2 bytes)\n",