lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[M] Change in osmo-bts[master]: l1sap: call csd_v110_rtp_decode() in l1sap_tch_rts_ind()
by fixeria 30 Sep '24

30 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/38312?usp=email ) Change subject: l1sap: call csd_v110_rtp_decode() in l1sap_tch_rts_ind() ...................................................................... l1sap: call csd_v110_rtp_decode() in l1sap_tch_rts_ind() The problem with calling csd_v110_rtp_decode() from l1sap_rtp_rx_cb() is that we don't know in advance at which TDMA frame number the resulting TCH block is going to be scheduled/transmitted. This knowledge will be required in follow-up patches. * In l1sap_rtp_rx_cb(): create an L1SAP msgb with the RTP payload unmodified (160 bytes), like we do for speech frames. * In l1sap_tch_rts_ind(): copy the RTP payload into a temporary buffer on stack and call csd_v110_rtp_decode(), re-using the L1SAP msgb as the output buffer. This patch brings no functional changes, except that the DL RLP PDUs now how the correct TDMA frame number in GSMTAP output (was always 0). Related: OS#6578 Change-Id: Idca6807b1e49b89072683b9f00ff4e7cee44cf33 --- M src/common/l1sap.c 1 file changed, 104 insertions(+), 96 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/12/38312/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 68920a4..a8f2a04 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -426,6 +426,86 @@ return 0; } +/* process one MAC block of unpacked bits of a non-transparent CSD channel */ +static void gsmtap_csd_rlp_process(struct gsm_lchan *lchan, bool is_uplink, + const struct ph_tch_param *tch_ind, + const uint8_t *data, unsigned int data_len) +{ + struct gsm_bts_trx *trx = lchan->ts->trx; + struct gsmtap_inst *inst = trx->bts->gsmtap.inst; + struct osmo_rlp_frame_decoded rlpf; + pbit_t *rlp_buf; + uint16_t arfcn; + int byte_len; + + if (!inst || !trx->bts->gsmtap.rlp) + return; + + if (lchan->csd_mode != LCHAN_CSD_M_NT) + return; + + if (is_uplink) + rlp_buf = lchan->tch.csd.rlp_buf_ul; + else + rlp_buf = lchan->tch.csd.rlp_buf_dl; + + /* TCH/F 9.6: 4x60bit block => 240bit RLP frame + * TCH/F 4.8: 2x 2x60bit blocks starting at B0/B2/B4 => 240bit RLP frame + * TCH/H 4.8: 4x60bit block => 240bit RLP frame + * TCH/F 2.4: 2x36bit blocks => transparent only + * TCH/H 2.4: 4x36bit blocks => transparent only + * TCH/F 14.4: 2x 290 bit block (starting with M1=0) => 576-bit RLP frame + */ + + if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_6k0) { + /* in this mode we have 120bit MAC blocks; two of them need to be concatenated + * to render a 240-bit RLP frame. The fist block is present in B0/B2/B4. + * The E7 bit is used to indicate the Frame MF0a */ + OSMO_ASSERT(data_len == 120); + ubit_t e7 = data[4*7+3]; + if (e7 == 0) { + /* E2=0: this is B0/B2/B4 containing the 1st half */ + osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1); + return; + } else { + /* E2=1: this is B1/B3/B5 containing the 2nd half */ + osmo_ubit2pbit_ext(rlp_buf, 120, data, 0, data_len, 1); + byte_len = 240/8; + } + } else if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_14k5) { + /* in this mode we have 290bit MAC blocks containing M1, M2 and 288 data bits; + * two of them need to be concatenated to render a + * 576-bit RLP frame. The start of a RLP frame is + * denoted by a block with M1-bit set to 0. */ + OSMO_ASSERT(data_len == 290); + ubit_t m1 = data[0]; + if (m1 == 0) { + osmo_ubit2pbit_ext(rlp_buf, 0, data, 2, data_len, 1); + return; + } else { + osmo_ubit2pbit_ext(rlp_buf, 288, data, 2, data_len, 1); + byte_len = 576/8; + } + } else { + byte_len = osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1); + } + + if (trx->bts->gsmtap.rlp_skip_null) { + int rc = osmo_rlp_decode(&rlpf, 0, rlp_buf, byte_len); + if (rc == 0 && rlpf.ftype == OSMO_RLP_FT_U && rlpf.u_ftype == OSMO_RLP_U_FT_NULL) + return; + } + + arfcn = trx->arfcn; + if (is_uplink) + arfcn |= GSMTAP_ARFCN_F_UPLINK; + + gsmtap_send_ex(inst, GSMTAP_TYPE_GSM_RLP, arfcn, lchan->ts->nr, + lchan->type == GSM_LCHAN_TCH_H ? GSMTAP_CHANNEL_VOICE_H : GSMTAP_CHANNEL_VOICE_F, + lchan->nr, tch_ind->fn, tch_ind->rssi, 0, rlp_buf, byte_len); + +} + /* Paging Request 1 with "no identity" content, i.e. empty/dummy paging */ static const uint8_t paging_fill[GSM_MACBLOCK_LEN] = { 0x15, 0x06, 0x21, 0x00, 0x01, 0xf0, 0x2b, 0x2b, 0x2b, 0x2b, @@ -1551,6 +1631,29 @@ resp_msg = NULL; resp_l1sap = &empty_l1sap; } + } else if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) { + uint8_t rtp[RFC4040_RTP_PLEN]; + + memcpy(&rtp[0], msgb_l2(resp_msg), + OSMO_MIN(msgb_l2len(resp_msg), sizeof(rtp))); + msgb_get(resp_msg, msgb_l2len(resp_msg)); + + int rc = csd_v110_rtp_decode(lchan, msgb_l2(resp_msg), + &rtp[0], sizeof(rtp)); + if (rc > 0) { + msgb_put(resp_msg, rc); + /* 'fake' tch_ind containing all-zero so gsmtap code can be shared + * between UL and DL */ + const struct ph_tch_param fake_tch_ind = { .fn = fn }; + gsmtap_csd_rlp_process(lchan, false, &fake_tch_ind, + msgb_l2(resp_msg), + msgb_l2len(resp_msg)); + } else { + rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RTP_RX_DROP_V110_DEC); + msgb_free(resp_msg); + resp_msg = NULL; + resp_l1sap = &empty_l1sap; + } } } @@ -1850,84 +1953,6 @@ return 1; } -/* process one MAC block of unpacked bits of a non-transparent CSD channel */ -static void gsmtap_csd_rlp_process(struct gsm_lchan *lchan, bool is_uplink, - const struct ph_tch_param *tch_ind, - const uint8_t *data, unsigned int data_len) -{ - struct gsm_bts_trx *trx = lchan->ts->trx; - struct gsmtap_inst *inst = trx->bts->gsmtap.inst; - struct osmo_rlp_frame_decoded rlpf; - pbit_t *rlp_buf; - uint16_t arfcn; - int byte_len; - - if (!inst || !trx->bts->gsmtap.rlp) - return; - - if (lchan->csd_mode != LCHAN_CSD_M_NT) - return; - - if (is_uplink) - rlp_buf = lchan->tch.csd.rlp_buf_ul; - else - rlp_buf = lchan->tch.csd.rlp_buf_dl; - - /* TCH/F 9.6: 4x60bit block => 240bit RLP frame - * TCH/F 4.8: 2x 2x60bit blocks starting at B0/B2/B4 => 240bit RLP frame - * TCH/H 4.8: 4x60bit block => 240bit RLP frame - * TCH/F 2.4: 2x36bit blocks => transparent only - * TCH/H 2.4: 4x36bit blocks => transparent only - * TCH/F 14.4: 2x 290 bit block (starting with M1=0) => 576-bit RLP frame - */ - - if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_6k0) { - /* in this mode we have 120bit MAC blocks; two of them need to be concatenated - * to render a 240-bit RLP frame. The fist block is present in B0/B2/B4. - * The E7 bit is used to indicate the Frame MF0a */ - OSMO_ASSERT(data_len == 120); - ubit_t e7 = data[4*7+3]; - if (e7 == 0) { - osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1); - return; - } else { - osmo_ubit2pbit_ext(rlp_buf, 120, data, 0, data_len, 1); - byte_len = 240/8; - } - } else if (lchan->type == GSM_LCHAN_TCH_F && lchan->tch_mode == GSM48_CMODE_DATA_14k5) { - /* in this mode we have 290bit MAC blocks containing M1, M2 and 288 data bits; - * two of them need to be concatenated to render a - * 576-bit RLP frame. The start of a RLP frame is - * denoted by a block with M1-bit set to 0. */ - OSMO_ASSERT(data_len == 290); - ubit_t m1 = data[0]; - if (m1 == 0) { - osmo_ubit2pbit_ext(rlp_buf, 0, data, 2, data_len, 1); - return; - } else { - osmo_ubit2pbit_ext(rlp_buf, 288, data, 2, data_len, 1); - byte_len = 576/8; - } - } else { - byte_len = osmo_ubit2pbit_ext(rlp_buf, 0, data, 0, data_len, 1); - } - - if (trx->bts->gsmtap.rlp_skip_null) { - int rc = osmo_rlp_decode(&rlpf, 0, rlp_buf, byte_len); - if (rc == 0 && rlpf.ftype == OSMO_RLP_FT_U && rlpf.u_ftype == OSMO_RLP_U_FT_NULL) - return; - } - - arfcn = trx->arfcn; - if (is_uplink) - arfcn |= GSMTAP_ARFCN_F_UPLINK; - - gsmtap_send_ex(inst, GSMTAP_TYPE_GSM_RLP, arfcn, lchan->ts->nr, - lchan->type == GSM_LCHAN_TCH_H ? GSMTAP_CHANNEL_VOICE_H : GSMTAP_CHANNEL_VOICE_F, - lchan->nr, tch_ind->fn, tch_ind->rssi, 0, rlp_buf, byte_len); - -} - static void send_ul_rtp_packet_data(struct gsm_lchan *lchan, const struct ph_tch_param *tch_ind, const uint8_t *data, uint16_t data_len) { @@ -2463,24 +2488,7 @@ msg = l1sap_msgb_alloc(512); if (!msg) return; - - if (lchan->rsl_cmode == RSL_CMOD_SPD_DATA) { - int rc = csd_v110_rtp_decode(lchan, msg->tail, - rtp_pl, rtp_pl_len); - if (rc > 0) { - /* 'fake' tch_ind containing all-zero so gsmtap code can be shared - * between UL and DL */ - static const struct ph_tch_param fake_tch_ind = {}; - gsmtap_csd_rlp_process(lchan, false, &fake_tch_ind, msg->tail, rc); - msgb_put(msg, rc); - } else { - rate_ctr_inc2(bts->ctrs, BTS_CTR_RTP_RX_DROP_V110_DEC); - msgb_free(msg); - return; - } - } else { - memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); - } + memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); msgb_pull(msg, sizeof(struct osmo_phsap_prim)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38312?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idca6807b1e49b89072683b9f00ff4e7cee44cf33 Gerrit-Change-Number: 38312 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-bts[master]: l1sap: prevent buffer overflow in l1sap_rtp_rx_cb()
by fixeria 30 Sep '24

30 Sep '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/38313?usp=email ) Change subject: l1sap: prevent buffer overflow in l1sap_rtp_rx_cb() ...................................................................... l1sap: prevent buffer overflow in l1sap_rtp_rx_cb() Change-Id: I214070ecf7458202922475505a8747950bedf930 --- M src/common/l1sap.c 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/13/38313/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index a8f2a04..83dacbd 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -2485,9 +2485,17 @@ OSMO_ASSERT(0); } - msg = l1sap_msgb_alloc(512); +#define L1SAP_MSGB_L2LEN_TCH 512 + + msg = l1sap_msgb_alloc(L1SAP_MSGB_L2LEN_TCH); if (!msg) return; + if (OSMO_UNLIKELY(rtp_pl_len > L1SAP_MSGB_L2LEN_TCH)) { + LOGPLCHAN(lchan, DL1P, LOGL_ERROR, + "%s(): incoming RTP truncated: %u -> %u\n", + __func__, rtp_pl_len, L1SAP_MSGB_L2LEN_TCH); + rtp_pl_len = L1SAP_MSGB_L2LEN_TCH; /* truncate */ + } memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len); msgb_pull(msg, sizeof(struct osmo_phsap_prim)); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/38313?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I214070ecf7458202922475505a8747950bedf930 Gerrit-Change-Number: 38313 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSS connection when SS message is rejected
by jolly 30 Sep '24

30 Sep '24
Attention is currently required from: fixeria, neels, pespin. jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email ) Change subject: Release BSS connection when SS message is rejected ...................................................................... Patch Set 3: (1 comment) File src/libmsc/gsm_09_11.c: https://gerrit.osmocom.org/c/osmo-msc/+/38305/comment/ffa140f3_18dfde94?usp… : PS2, Line 145: msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS); > I think this definetly requires a comment explaining why is the reference dropped here and probably […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Sep 2024 11:17:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSS connection when SS message is rejected
by jolly 30 Sep '24

30 Sep '24
Attention is currently required from: fixeria, jolly, neels. Hello Jenkins Builder, fixeria, neels, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+1 by fixeria, Verified+1 by Jenkins Builder Change subject: Release BSS connection when SS message is rejected ...................................................................... Release BSS connection when SS message is rejected When an initial call-independent supplementary service message is received, it is checked whether the message is a REGISTER message. If it is not, the MSC will reject it by sending a RELEASE COMPLETE message. This patch ensures that the MSC_A use counter is decremented, so that the BSS connection is released, if it is not used by any other transaction. Without this patch, the msc_a_fsm would wait 5 seconds for an initial transaction before releasing the BSS connection. Related: OS#6427 Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 --- M src/libmsc/gsm_09_11.c 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/38305/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSSMAP connection when SS message is rejected
by pespin 30 Sep '24

30 Sep '24
Attention is currently required from: jolly, neels. pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email ) Change subject: Release BSSMAP connection when SS message is rejected ...................................................................... Patch Set 2: (1 comment) File src/libmsc/gsm_09_11.c: https://gerrit.osmocom.org/c/osmo-msc/+/38305/comment/9399f52e_d5469d97?usp… : PS2, Line 145: msc_a_put(msc_a, MSC_A_USE_CM_SERVICE_SS); I think this definetly requires a comment explaining why is the reference dropped here and probably where was this reference taken. -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Sep 2024 08:36:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSSMAP connection when SS message is rejected
by fixeria 30 Sep '24

30 Sep '24
Attention is currently required from: jolly, neels. fixeria has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email ) Change subject: Release BSSMAP connection when SS message is rejected ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Sep 2024 07:59:11 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSSMAP connection when SS message is rejected
by jolly 30 Sep '24

30 Sep '24
Attention is currently required from: fixeria, neels. jolly has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email ) Change subject: Release BSSMAP connection when SS message is rejected ...................................................................... Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-msc/+/38305/comment/64907c93_ee1e26e0?usp… : PS1, Line 14: This patch ensures that a transaction is created even if the message : is not a REGISTER message > For the record, we had a Jitsi call with @andreas@eversberg. […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Sep 2024 07:57:15 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-msc[master]: Release BSSMAP connection when SS message is rejected
by jolly 30 Sep '24

30 Sep '24
Attention is currently required from: jolly, neels. Hello Jenkins Builder, fixeria, neels, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: Release BSSMAP connection when SS message is rejected ...................................................................... Release BSSMAP connection when SS message is rejected When an initial call-independent supplementary service message is received, it is checked whether the message is a REGISTER message. If it is not, the MSC will reject it by sending a RELEASE COMPLETE message. This patch ensures that the MSC_A use counter is decremented, so that the BSSMAP connection is released, if it is not used by any other transaction. Without this patch, the msc_a_fsm would wait 5 seconds for an initial transaction before releasing the BSSMAP connection. Related: OS#6427 Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 --- M src/libmsc/gsm_09_11.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/05/38305/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/38305?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: Ic6765e5d480735e67d97f0f560da24653b26d487 Gerrit-Change-Number: 38305 Gerrit-PatchSet: 2 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-abis[master]: trau_rtp_conv: use new RA2 functions for CSD
by falconia 30 Sep '24

30 Sep '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38291?usp=email ) Change subject: trau_rtp_conv: use new RA2 functions for CSD ...................................................................... trau_rtp_conv: use new RA2 functions for CSD osmo_trau2rtp() and osmo_rtp2trau() include CSD support; the RTP format in CSD modes is RFC 4040 clearmode like the interface that exists on the 64 kbit/s side of a traditional TRAU. RA2 packing and unpacking constitute required steps in these conversions - use newly factored-out functions. Change-Id: Ia157989579ced866b1e7abfc789d69ae489224e9 --- M src/trau/trau_rtp_conv.c 1 file changed, 5 insertions(+), 23 deletions(-) Approvals: fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 24ea70c..4df72d1 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -30,6 +30,7 @@ #include <osmocom/trau/trau_frame.h> #include <osmocom/trau/trau_rtp.h> +#include <osmocom/trau/csd_ra2.h> /* RFC4040 "clearmode" RTP payload length */ #define RFC4040_RTP_PLEN 160 @@ -1093,32 +1094,20 @@ static void trau2v110_ir8(uint8_t *out, const ubit_t *in) { ubit_t ra_bits[80]; - int i; trau2v110_bits(ra_bits, in); - /* RA2: 1 bit per output byte */ - for (i = 0; i < 80; i++) - out[i] = 0x7F | (ra_bits[i] << 7); + osmo_csd_ra2_8k_pack(out, ra_bits, 80); } /* intermediate rate 16 kbit/s */ static void trau2v110_ir16(uint8_t *out, const ubit_t *in) { ubit_t ra_bits[80]; - int i, o; - uint8_t b; trau2v110_bits(ra_bits, in); - /* RA2: 2 bits per output byte */ - i = 0; - for (o = 0; o < 40; o++) { - b = 0x3F; - b |= (ra_bits[i++] << 7); - b |= (ra_bits[i++] << 6); - out[o] = b; - } + osmo_csd_ra2_16k_pack(out, ra_bits, 40); } static int trau2rtp_data_fr(uint8_t *out, size_t out_len, @@ -1241,14 +1230,12 @@ size_t data_len, unsigned second_offset) { ubit_t ra_bits[80 * 2]; - int i; if (data_len != RFC4040_RTP_PLEN) goto idle_fill; /* reverse RA2 first */ - for (i = 0; i < sizeof(ra_bits); i++) - ra_bits[i] = (data[i] >> 7) & 1; + osmo_csd_ra2_8k_unpack(ra_bits, data, RFC4040_RTP_PLEN); /* enforce two properly aligned V.110 frames */ if (!check_v110_align(ra_bits)) @@ -1271,17 +1258,12 @@ size_t data_len) { ubit_t ra_bits[80 * 4]; - int i, o; if (data_len != RFC4040_RTP_PLEN) goto idle_fill; /* reverse RA2 first */ - o = 0; - for (i = 0; i < RFC4040_RTP_PLEN; i++) { - ra_bits[o++] = (data[i] >> 7) & 1; - ra_bits[o++] = (data[i] >> 6) & 1; - } + osmo_csd_ra2_16k_unpack(ra_bits, data, RFC4040_RTP_PLEN); /* enforce 4 properly aligned V.110 frames */ if (!check_v110_align(ra_bits)) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38291?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ia157989579ced866b1e7abfc789d69ae489224e9 Gerrit-Change-Number: 38291 Gerrit-PatchSet: 4 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-abis[master]: libosmotrau: add CSD RA2 functions
by falconia 30 Sep '24

30 Sep '24
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38290?usp=email ) Change subject: libosmotrau: add CSD RA2 functions ...................................................................... libosmotrau: add CSD RA2 functions Rate adaption function RA2 for GSM CSD calls is defined in 3GPP TS 48.020 chapter 13. While it is nothing but one special case of I.460 submultiplexing and we do have i460_mux infrastructure in Osmocom, that fully-general I.460 infra is too heaviweight for CSD encoding and decoding functions that need simple, single-input and single-output RA2 packing and unpacking functions. Right now ad hoc RA2 functions are used in the trau_rtp_conv module and in OsmoBTS csd_v110; same functions will also be needed for the upcoming RAA' unit test addition. Add proper RA2 packing and unpacking functions that can be used in all of these places. Change-Id: I7b98b958651b3fc1a814d119d1b8644c91f98676 --- M include/Makefile.am A include/osmocom/trau/csd_ra2.h M src/Makefile.am A src/trau/csd_ra2.c 4 files changed, 140 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/Makefile.am b/include/Makefile.am index 88d66dc..2832541 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -4,6 +4,7 @@ osmocom/abis/ipa_proxy.h osmocom/abis/ipaccess.h osmocom/abis/abis.h \ osmocom/abis/subchan_demux.h osmocom/abis/e1_input.h \ osmocom/abis/lapd.h osmocom/abis/lapd_pcap.h osmocom/abis/unixsocket_proto.h \ + osmocom/trau/csd_ra2.h \ osmocom/trau/trau_frame.h \ osmocom/trau/trau_sync.h \ osmocom/trau/trau_pcu_ericsson.h \ diff --git a/include/osmocom/trau/csd_ra2.h b/include/osmocom/trau/csd_ra2.h new file mode 100644 index 0000000..113ab6d --- /dev/null +++ b/include/osmocom/trau/csd_ra2.h @@ -0,0 +1,67 @@ +/* + * Rate adaption function RA2 for GSM CSD calls is defined in 3GPP TS + * 48.020 chapter 13. While it is nothing but one special case of I.460 + * submultiplexing and we do have i460_mux infrastructure in Osmocom, + * that fully-general I.460 infra is too heaviweight for CSD encoding + * and decoding functions that need simple, single-input and single-output + * RA2 packing and unpacking functions. + * + * This header file defines the API to CSD-oriented RA2 packing and unpacking + * functions that support intermediate rates of 8 and 16 kbit/s: the two IRs + * that occur in "plain" single-slot CSD without EDGE. + * + * Author: Mychaela N. Falconia <falcon(a)freecalypso.org>, 2024 - however, + * Mother Mychaela's contributions are NOT subject to copyright. + * No rights reserved, all rights relinquished. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#pragma once + +#include <stdint.h> +#include <osmocom/core/bits.h> + +/*! pack bits into octets per RA2 with 8 kbit/s IR + * param[out] out_bytes caller-provided buffer of size nbytes + * param[in] in_bits source bits to be packed, size nbytes + * param[in] n_out_bytes number of output bytes to pack, equals + * number of source bits with 8 kbit/s IR + */ +void osmo_csd_ra2_8k_pack(uint8_t *out_bytes, const ubit_t *in_bits, + unsigned n_out_bytes); + +/*! unpack bits from octets per RA2 with 8 kbit/s IR + * param[out] out_bits caller-provided buffer of size nbytes + * param[in] in_bytes received 64 kbit/s octets to unpack, size nbytes + * param[in] n_in_bytes number of received octets to unpack, equals + * number of output bits with 8 kbit/s IR + */ +void osmo_csd_ra2_8k_unpack(ubit_t *out_bits, const uint8_t *in_bytes, + unsigned n_in_bytes); + +/*! pack bits into octets per RA2 with 16 kbit/s IR + * param[out] out_bytes caller-provided buffer of size nbytes + * param[in] in_bits source bits to be packed, size nbytes*2 + * param[in] n_out_bytes number of output bytes to pack; the number + * of source bits is double this number + */ +void osmo_csd_ra2_16k_pack(uint8_t *out_bytes, const ubit_t *in_bits, + unsigned n_out_bytes); + +/*! unpack bits from octets per RA2 with 16 kbit/s IR + * param[out] out_bits caller-provided buffer of size nbytes*2 + * param[in] in_bytes received 64 kbit/s octets to unpack, size nbytes + * param[in] n_in_bytes number of received octets to unpack; the number + * of output bits is double this number + */ +void osmo_csd_ra2_16k_unpack(ubit_t *out_bits, const uint8_t *in_bytes, + unsigned n_in_bytes); diff --git a/src/Makefile.am b/src/Makefile.am index 7c59ec3..1df7f4c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -41,7 +41,8 @@ -no-undefined \ $(NULL) libosmotrau_la_LIBADD = $(COMMONLIBS) $(LIBOSMOCODEC_LIBS) $(ORTP_LIBS) -libosmotrau_la_SOURCES = trau/trau_frame.c \ +libosmotrau_la_SOURCES = trau/csd_ra2.c \ + trau/trau_frame.c \ trau/trau_pcu_ericsson.c \ trau/trau_sync.c \ trau/trau_rtp_conv.c diff --git a/src/trau/csd_ra2.c b/src/trau/csd_ra2.c new file mode 100644 index 0000000..65deab5 --- /dev/null +++ b/src/trau/csd_ra2.c @@ -0,0 +1,70 @@ +/* + * This C module contains the implementation of CSD RA2 functions + * defined in <osmocom/trau/csd_ra2.h>. + * + * Author: Mychaela N. Falconia <falcon(a)freecalypso.org>, 2024 - however, + * Mother Mychaela's contributions are NOT subject to copyright. + * No rights reserved, all rights relinquished. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include <stdint.h> + +#include <osmocom/core/bits.h> +#include <osmocom/trau/csd_ra2.h> + +void osmo_csd_ra2_8k_pack(uint8_t *out_bytes, const ubit_t *in_bits, + unsigned n_out_bytes) +{ + unsigned i; + + /* RA2: 1 bit per output byte */ + for (i = 0; i < n_out_bytes; i++) + out_bytes[i] = 0x7F | (in_bits[i] << 7); +} + +void osmo_csd_ra2_8k_unpack(ubit_t *out_bits, const uint8_t *in_bytes, + unsigned n_in_bytes) +{ + unsigned i; + + for (i = 0; i < n_in_bytes; i++) + out_bits[i] = (in_bytes[i] >> 7) & 1; +} + +void osmo_csd_ra2_16k_pack(uint8_t *out_bytes, const ubit_t *in_bits, + unsigned n_out_bytes) +{ + unsigned i, o; + uint8_t b; + + /* RA2: 2 bits per output byte */ + i = 0; + for (o = 0; o < n_out_bytes; o++) { + b = 0x3F; + b |= (in_bits[i++] << 7); + b |= (in_bits[i++] << 6); + out_bytes[o] = b; + } +} + +void osmo_csd_ra2_16k_unpack(ubit_t *out_bits, const uint8_t *in_bytes, + unsigned n_in_bytes) +{ + unsigned i, o; + + o = 0; + for (i = 0; i < n_in_bytes; i++) { + out_bits[o++] = (in_bytes[i] >> 7) & 1; + out_bits[o++] = (in_bytes[i] >> 6) & 1; + } +} -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38290?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7b98b958651b3fc1a814d119d1b8644c91f98676 Gerrit-Change-Number: 38290 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.