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

February 2024

  • 1 participants
  • 1748 discussions
[S] Change in osmo-ttcn3-hacks[master]: library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF
by fixeria 05 Feb '24

05 Feb '24
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35857?usp=email ) Change subject: library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF ...................................................................... library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF Change-Id: I772bb0ace0efbc7e7fe788fd49218fe398097943 Related: osmocom-bb.git I56e0b5631c7446390adbfc5664e56f56ebb88cc1 --- M library/L1CTL_Types.ttcn 1 file changed, 21 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/library/L1CTL_Types.ttcn b/library/L1CTL_Types.ttcn index 2e1f34b..7571b4f 100644 --- a/library/L1CTL_Types.ttcn +++ b/library/L1CTL_Types.ttcn @@ -54,7 +54,8 @@ L1CTL_GPRS_UL_BLOCK_REQ, L1CTL_GPRS_DL_BLOCK_IND, L1CTL_EXT_RACH_REQ, - L1CTL_GPRS_RTS_IND + L1CTL_GPRS_RTS_IND, + L1CTL_GPRS_UL_BLOCK_CNF } with { variant "FIELDLENGTH(8)" }; type enumerated L1ctlCcchMode { @@ -342,6 +343,13 @@ octetstring data } with { variant (data) "BYTEORDER(first)" }; + /* payload of L1CTL_GPRS_UL_BLOCK_CNF */ + type record L1ctlGprsUlBlockCnf { + uint32_t fn, + uint8_t tn, + octetstring data + } with { variant "" }; + /* payload of L1CTL_GPRS_DL_BLOCK_IND */ type record L1ctlGprsDlBlockInd { L1ctlGprsBlockHdr hdr, @@ -390,6 +398,7 @@ L1ctlGprsUlTbfCfgReq ul_tbf_cfg_req, L1ctlGprsDlTbfCfgReq dl_tbf_cfg_req, L1ctlGprsUlBlockReq ul_block_req, + L1ctlGprsUlBlockCnf ul_block_cnf, L1ctlGprsDlBlockInd dl_block_ind, L1ctlExtRachReq ext_rach_req, L1ctlGprsRtsInd rts_ind, @@ -445,6 +454,7 @@ ul_tbf_cfg_req, header.msg_type = L1CTL_GPRS_UL_TBF_CFG_REQ; dl_tbf_cfg_req, header.msg_type = L1CTL_GPRS_DL_TBF_CFG_REQ; ul_block_req, header.msg_type = L1CTL_GPRS_UL_BLOCK_REQ; + ul_block_cnf, header.msg_type = L1CTL_GPRS_UL_BLOCK_CNF; dl_block_ind, header.msg_type = L1CTL_GPRS_DL_BLOCK_IND; ext_rach_req, header.msg_type = L1CTL_EXT_RACH_REQ; rts_ind, header.msg_type = L1CTL_GPRS_RTS_IND; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35857?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I772bb0ace0efbc7e7fe788fd49218fe398097943 Gerrit-Change-Number: 35857 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmocom-bb[master]: trxcon/l1sched: trigger sending UL BLOCK.cnf for PDTCH
by fixeria 05 Feb '24

05 Feb '24
Attention is currently required from: jolly. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35778?usp=email ) Change subject: trxcon/l1sched: trigger sending UL BLOCK.cnf for PDTCH ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35778?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: If32fafeef0ea347ed3800e6b67349bf12e66047f Gerrit-Change-Number: 35778 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: jolly <andreas(a)eversberg.eu> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 05 Feb 2024 15:29:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmocom-bb[master]: l1gprs: implement UL BLOCK.cnf (L1CTL_GPRS_UL_BLOCK_CNF)
by fixeria 05 Feb '24

05 Feb '24
Attention is currently required from: jolly. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35777?usp=email ) Change subject: l1gprs: implement UL BLOCK.cnf (L1CTL_GPRS_UL_BLOCK_CNF) ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35777?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I56e0b5631c7446390adbfc5664e56f56ebb88cc1 Gerrit-Change-Number: 35777 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Mon, 05 Feb 2024 15:29:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF
by pespin 05 Feb '24

05 Feb '24
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35857?usp=email ) Change subject: library/L1CTL_Types: add definition of L1CTL_GPRS_UL_BLOCK_CNF ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35857?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I772bb0ace0efbc7e7fe788fd49218fe398097943 Gerrit-Change-Number: 35857 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Feb 2024 15:27:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmocom-bb[master]: apn_fsm: Set default timeout for APN activation to 65s
by pespin 05 Feb '24

05 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35784?usp=email ) Change subject: apn_fsm: Set default timeout for APN activation to 65s ...................................................................... apn_fsm: Set default timeout for APN activation to 65s The current timeout is too low, taking into account that SM PDP Activation timeout is already 30. When SM fails, it will retry sending PDP Context Activation Req. Hence, give it enough time to at least retry once, plus some extra buffer time (eg to go through GMM attach once). Change-Id: I34f9b0a5ad5767155dc3e4c0ac1c4bf1521be596 --- M src/host/layer23/src/common/apn_fsm.c 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved jolly: Looks good to me, but someone else must approve diff --git a/src/host/layer23/src/common/apn_fsm.c b/src/host/layer23/src/common/apn_fsm.c index 7636b0a..2b523f1 100644 --- a/src/host/layer23/src/common/apn_fsm.c +++ b/src/host/layer23/src/common/apn_fsm.c @@ -30,7 +30,7 @@ #define X(s) (1 << (s)) static struct osmo_tdef T_defs_apn[] = { - { .T=1, .default_val=30, .desc = "Activating timeout (s)" }, + { .T=1, .default_val=65, .desc = "Activating timeout (s)" }, { 0 } /* empty item at the end */ }; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35784?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I34f9b0a5ad5767155dc3e4c0ac1c4bf1521be596 Gerrit-Change-Number: 35784 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmocom-bb[master]: modem: Improve logging when forwarding data to GRR
by pespin 05 Feb '24

05 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/35785?usp=email ) Change subject: modem: Improve logging when forwarding data to GRR ...................................................................... modem: Improve logging when forwarding data to GRR Change-Id: Idf80c0fa1c8293afbe354442a72f5b1c5a84f9e1 --- M src/host/layer23/src/modem/llc.c 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified jolly: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/host/layer23/src/modem/llc.c b/src/host/layer23/src/modem/llc.c index 142f3cf..fe920ee 100644 --- a/src/host/layer23/src/modem/llc.c +++ b/src/host/layer23/src/modem/llc.c @@ -142,7 +142,12 @@ switch (llc_prim->oph.sap) { case OSMO_GPRS_LLC_SAP_GRR: - LOGP(DLLC, LOGL_DEBUG, "%s(): Rx %s ll=[%s]\n", __func__, pdu_name, + LOGP(DLLC, LOGL_DEBUG, "%s(): Rx %s TLLI=0x%08x SAPI=%s RadioPrio=%u ll=[%s]\n", + __func__, pdu_name, llc_prim->grr.tlli, + /* data_req.sapi in same union pos: */ + osmo_gprs_llc_sapi_name(llc_prim->grr.unitdata_req.sapi), + /* data_req.radio_prio in same union pos: */ + llc_prim->grr.unitdata_req.radio_prio, osmo_hexdump(llc_prim->grr.ll_pdu, llc_prim->grr.ll_pdu_len)); /* Forward it to lower layers, pass ownership over to RLCMAC: */ /* Optimization: LLC-GRR-UNITDATA-IND is 1-to-1 ABI compatible with -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/35785?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Idf80c0fa1c8293afbe354442a72f5b1c5a84f9e1 Gerrit-Change-Number: 35785 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-bsc[master]: abis_nm_sw_act_req_ack: attr_len should be unsigned
by pespin 05 Feb '24

05 Feb '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/35856?usp=email ) Change subject: abis_nm_sw_act_req_ack: attr_len should be unsigned ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/35856?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I5c0ba76b5cc2464c7e362a850325c94770f38397 Gerrit-Change-Number: 35856 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 05 Feb 2024 15:27:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: Implement RLC_OCTET_COUNT in DL ACK/NACK
by pespin 05 Feb '24

05 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/35786?usp=email ) Change subject: rlcmac: Implement RLC_OCTET_COUNT in DL ACK/NACK ...................................................................... rlcmac: Implement RLC_OCTET_COUNT in DL ACK/NACK This helps debugging what's already in the MS tx queue when requesting a new UL TBF. Change-Id: Ie5f399fa0bffed8e39811075feba47a54054c8e5 --- M include/osmocom/gprs/rlcmac/gre.h M src/rlcmac/gre.c M src/rlcmac/rlcmac_enc.c M tests/rlcmac/rlcmac_prim_test.ok 4 files changed, 39 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/include/osmocom/gprs/rlcmac/gre.h b/include/osmocom/gprs/rlcmac/gre.h index be36e23..b9a917d 100644 --- a/include/osmocom/gprs/rlcmac/gre.h +++ b/include/osmocom/gprs/rlcmac/gre.h @@ -46,6 +46,7 @@ bool gprs_rlcmac_entity_in_packet_transfer_mode(const struct gprs_rlcmac_entity *gre); bool gprs_rlcmac_entity_have_tx_data_queued(const struct gprs_rlcmac_entity *gre); int gprs_rlcmac_entity_start_ul_tbf_pkt_acc_proc_if_needed(struct gprs_rlcmac_entity *gre); +uint16_t gprs_rlcmac_entity_calculate_new_ul_tbf_rlc_octet_count(const struct gprs_rlcmac_entity *gre); int gprs_rlcmac_entity_llc_enqueue(struct gprs_rlcmac_entity *gre, const uint8_t *ll_pdu, unsigned int ll_pdu_len, diff --git a/src/rlcmac/gre.c b/src/rlcmac/gre.c index 9102124..aca17bf 100644 --- a/src/rlcmac/gre.c +++ b/src/rlcmac/gre.c @@ -259,6 +259,30 @@ return rc; } +/* Calculate TS 44.060 Table 12.7.2 RLC_OCTET_COUNT. 0 = unable to count. */ +uint16_t gprs_rlcmac_entity_calculate_new_ul_tbf_rlc_octet_count(const struct gprs_rlcmac_entity *gre) +{ + /* The RLC_OCTET_COUNT field indicates the number of RLC data octets, + * plus the number of RLC data block length octets, that the mobile + * station wishes to transfer. The value '0' indicates that the mobile + * station does not provide any information on the TBF size. + */ + uint32_t rlc_oct_cnt = 0; + const struct gprs_rlcmac_llc_queue *q = gre->llc_queue; + + for (unsigned int i = 0; i < ARRAY_SIZE(q->pq); i++) { + for (unsigned int j = 0; j < ARRAY_SIZE(q->pq[i]); j++) { + struct msgb *msg; + llist_for_each_entry(msg, &q->pq[i][j].queue, list) { + rlc_oct_cnt += 1 + msgb_l2len(msg); + if (rlc_oct_cnt >= UINT16_MAX) + return UINT16_MAX; + } + } + } + return rlc_oct_cnt; +} + struct msgb *gprs_rlcmac_gre_create_pkt_ctrl_ack(const struct gprs_rlcmac_entity *gre) { struct msgb *msg; diff --git a/src/rlcmac/rlcmac_enc.c b/src/rlcmac/rlcmac_enc.c index dec2fa6..afe5bce 100644 --- a/src/rlcmac/rlcmac_enc.c +++ b/src/rlcmac/rlcmac_enc.c @@ -403,7 +403,7 @@ chan_req->RADIO_PRIORITY = gprs_rlcmac_llc_queue_highest_radio_prio_pending(dl_tbf->tbf.gre->llc_queue); chan_req->RLC_MODE = GPRS_RLCMAC_RLC_MODE_ACKNOWLEDGED; chan_req->LLC_PDU_TYPE = GPRS_RLCMAC_LLC_PDU_TYPE_ACKNOWLEDGED; - chan_req->RLC_OCTET_COUNT = 0; /* TODO */ + chan_req->RLC_OCTET_COUNT = gprs_rlcmac_entity_calculate_new_ul_tbf_rlc_octet_count(dl_tbf->tbf.gre); } else { ack->Exist_Channel_Request_Description = 0; } diff --git a/tests/rlcmac/rlcmac_prim_test.ok b/tests/rlcmac/rlcmac_prim_test.ok index 70d0939..b9f18d2 100644 --- a/tests/rlcmac/rlcmac_prim_test.ok +++ b/tests/rlcmac/rlcmac_prim_test.ok @@ -217,7 +217,7 @@ test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_ESTABLISH.request test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_DL_TBF.request dl_tbf_nr=0 dl_slotmask=0x80 dl_tfi=0 test_rlcmac_prim_up_cb(): Rx GRR-UNITDATA.indication TLLI=0x00000001 ll=[43 c0 01 2b 2b 2b ] -test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=21 ts=7 data_len=23 data=[40 08 10 20 00 00 00 00 00 00 00 30 00 00 00 00 00 03 2b 2b 2b 2b 2b ] +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=21 ts=7 data_len=23 data=[40 08 10 20 00 00 00 00 00 00 00 30 00 00 f0 00 00 03 2b 2b 2b 2b 2b ] test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0xc0 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=43 ts=7 data_len=23 data=[40 04 00 00 00 04 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b ] test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0xc0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35786?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie5f399fa0bffed8e39811075feba47a54054c8e5 Gerrit-Change-Number: 35786 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in libosmo-gprs[master]: Delay deleting UL TBF until last Pkt Ctrl Ack is fully transmitted
by pespin 05 Feb '24

05 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/35775?usp=email ) Change subject: Delay deleting UL TBF until last Pkt Ctrl Ack is fully transmitted ...................................................................... Delay deleting UL TBF until last Pkt Ctrl Ack is fully transmitted This in turn delays reconfiguring the lower layers (L1CTL-CFG_UL_TBF.req mask=0x0) until the last block has been transmited. Change-Id: Ic38b4207623ccbda3b77d4b0a47431c25de95034 --- M include/osmocom/gprs/rlcmac/tbf_ul_fsm.h M src/rlcmac/rlcmac_prim.c M src/rlcmac/sched.c M src/rlcmac/tbf_ul.c M src/rlcmac/tbf_ul_fsm.c M tests/rlcmac/rlcmac_prim_test.c M tests/rlcmac/rlcmac_prim_test.err 7 files changed, 100 insertions(+), 18 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h index e3aeb3f..6809216 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h @@ -1,6 +1,7 @@ /* Uplink TBF, 3GPP TS 44.060 */ #pragma once +#include <stdint.h> #include <osmocom/core/fsm.h> #include <osmocom/gprs/rlcmac/rlcmac_private.h> @@ -25,10 +26,16 @@ unsigned int pkt_acc_proc_attempts; /* 9.3.3.3.2: The block with CV=0 shall not be retransmitted more than four times. */ unsigned int last_data_block_retrans_attempts; - /* Whether the Received Packet UL ACK/NACK w/ FinalAck=1 had 'TBF Est' field to '1'. - * Used during ST_RELEASING to find out if a new UL TBF can be recreated - * when ansering the final UL ACK. */ - bool rx_final_pkt_ul_ack_nack_has_tbf_est; + struct { + /* Whether the Received Packet UL ACK/NACK w/ FinalAck=1 had 'TBF Est' field to '1'. + * Used during ST_RELEASING to find out if a new UL TBF can be recreated + * when ansering the final UL ACK. */ + bool has_tbf_est; + /* FN and TN of the registered poll to Tx last PKT CTRL ACK + * answering the final UL ACK. */ + uint32_t pkt_ctrl_ack_fn; + uint8_t pkt_ctrl_ack_tn; + } rx_final_pkt_ul_ack_nack; }; enum tbf_ul_fsm_event { @@ -39,6 +46,7 @@ GPRS_RLCMAC_TBF_UL_EV_N3104_MAX, GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK, /* data: struct tbf_ul_ass_ev_rx_ul_ack_nack* */ GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, + GPRS_RLCMAC_TBF_UL_EV_TX_COMPL_PKT_CTRL_ACK, }; struct tbf_ul_ass_ev_rx_ul_ack_nack { @@ -52,3 +60,5 @@ void gprs_rlcmac_tbf_ul_fsm_destructor(struct gprs_rlcmac_ul_tbf *ul_tbf); enum gprs_rlcmac_tbf_ul_fsm_states gprs_rlcmac_tbf_ul_state(const struct gprs_rlcmac_ul_tbf *ul_tbf); + +bool gprs_rlcmac_ul_tbf_waiting_pkt_ctrl_ack_tx_confirmation(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts_nr); diff --git a/src/rlcmac/rlcmac_prim.c b/src/rlcmac/rlcmac_prim.c index 97e3cc9..496554e 100644 --- a/src/rlcmac/rlcmac_prim.c +++ b/src/rlcmac/rlcmac_prim.c @@ -646,6 +646,36 @@ return rc; } +static int rlcmac_prim_handle_l1ctl_pdch_data_cnf(struct osmo_gprs_rlcmac_prim *rlcmac_prim) +{ + struct gprs_rlcmac_entity *gre; + +#if 0 + /* TODO: enable once we have originating req data in primitive coming from lower layers. */ + /* 3GPP TS 44.060 10.3.2 Uplink RLC/MAC control block: */ + enum osmo_gprs_rlcmac_ul_msg_type msg_type; + if (rlcmac_prim->l1ctl.pdch_data_cnf.data_len < 1) + return -EINVAL; + msg_type = (rlcmac_prim->l1ctl.pdch_data_cnf.data & 0xC0) >> 2; + if (msg_type != OSMO_GPRS_RLCMAC_UL_MSGT_PACKET_CONTROL_ACK) + return -EINVAL; +#endif + + llist_for_each_entry(gre, &g_rlcmac_ctx->gre_list, entry) { + if (!gre->ul_tbf) + continue; + if (!gprs_rlcmac_ul_tbf_waiting_pkt_ctrl_ack_tx_confirmation(gre->ul_tbf, + rlcmac_prim->l1ctl.pdch_data_cnf.fn, + rlcmac_prim->l1ctl.pdch_data_cnf.ts_nr)) + continue; + + osmo_fsm_inst_dispatch(gre->ul_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_UL_EV_TX_COMPL_PKT_CTRL_ACK, NULL); + /* gre->ul_tbf is NULL here. */ + break; + } + return 0; +} + static int rlcmac_prim_handle_l1ctl_ccch_ready_ind(struct osmo_gprs_rlcmac_prim *rlcmac_prim) { struct gprs_rlcmac_entity *gre; @@ -670,6 +700,9 @@ case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_PDCH_DATA, PRIM_OP_INDICATION): rc = rlcmac_prim_handle_l1ctl_pdch_data_ind(rlcmac_prim); break; + case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_PDCH_DATA, PRIM_OP_CONFIRM): + rc = rlcmac_prim_handle_l1ctl_pdch_data_cnf(rlcmac_prim); + break; case OSMO_PRIM(OSMO_GPRS_RLCMAC_L1CTL_CCCH_DATA, PRIM_OP_INDICATION): rc = rlcmac_prim_handle_l1ctl_ccch_data_ind(rlcmac_prim); break; diff --git a/src/rlcmac/sched.c b/src/rlcmac/sched.c index 1620934..5f12d5a 100644 --- a/src/rlcmac/sched.c +++ b/src/rlcmac/sched.c @@ -158,18 +158,18 @@ /*! Select a CTRL message to transmit, based on different messages priority. * \param[in] bi RTS block indication information. * \param[in] tbfs TBF candidates having CTRL messages to send, filled in by get_ctrl_msg_tbf_candidates() - * \param[out] tbf_to_free TBF to free after sending the generated message + * \param[out] need_block_conf Whether we require Tx confirmation of this block from lower layers. */ static struct msgb *sched_select_ctrl_msg(const struct gprs_rlcmac_rts_block_ind *bi, const struct tbf_sched_ctrl_candidates *tbfs, - struct gprs_rlcmac_tbf **tbf_to_free) + bool *need_block_conf) { struct msgb *msg = NULL; struct gprs_rlcmac_entity *gre; int rc; - /* No TBF to be freed by default: */ - *tbf_to_free = NULL; + /* No TBF needs block conf by default: */ + *need_block_conf = false; /* 8.1.2.2 1) (EGPRS) PACKET DOWNLINK ACK/NACK w/ FinalAckInd=1 */ if (tbfs->poll_dl_ack_final_ack) { @@ -209,7 +209,6 @@ bi->ts, bi->fn, bi->usf); msg = gprs_rlcmac_gre_create_pkt_ctrl_ack(ul_tbf_as_tbf(tbfs->poll_ul_ack)->gre); /* Last UL message, freeing (after passing msg to lower layers) */ - *tbf_to_free = ul_tbf_as_tbf(tbfs->poll_ul_ack); return msg; } if (tbfs->poll_dl_ass) { @@ -288,7 +287,7 @@ { struct msgb *msg = NULL; struct tbf_sched_ctrl_candidates tbf_cand = {0}; - struct gprs_rlcmac_tbf *tbf_to_free; + bool need_block_conf; struct osmo_gprs_rlcmac_prim *rlcmac_prim_tx; int rc = 0; @@ -296,7 +295,7 @@ get_ctrl_msg_tbf_candidates(bi, &tbf_cand); - if ((msg = sched_select_ctrl_msg(bi, &tbf_cand, &tbf_to_free))) + if ((msg = sched_select_ctrl_msg(bi, &tbf_cand, &need_block_conf))) goto tx_msg; if ((msg = sched_select_ul_data_msg(bi))) @@ -312,10 +311,11 @@ tx_msg: rlcmac_prim_tx = gprs_rlcmac_prim_alloc_l1ctl_pdch_data_req(bi->ts, bi->fn, msgb_data(msg), 0); rlcmac_prim_tx->l1ctl.pdch_data_req.data_len = msgb_length(msg); + /* TODO: enable once we support conditional confirmation: + * rlcmac_prim_tx->l1ctl.pdch_data_req.needs_conf = need_block_conf; + */ rc = gprs_rlcmac_prim_call_down_cb(rlcmac_prim_tx); msgb_free(msg); - if (tbf_to_free) - gprs_rlcmac_tbf_free(tbf_to_free); ret_rc: gprs_rlcmac_pdch_ulc_expire_fn(g_rlcmac_ctx->sched.ulc[bi->ts], bi->fn); diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 3d4ba2b..26d710e 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -212,7 +212,7 @@ return false; /* "TBF Est field is set to '1'"" */ - if (!ul_tbf->state_fsm.rx_final_pkt_ul_ack_nack_has_tbf_est) + if (!ul_tbf->state_fsm.rx_final_pkt_ul_ack_nack.has_tbf_est) return false; /* the mobile station has new data to transmit */ diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index 92d1d64..d5aa9c3 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -41,6 +41,7 @@ { GPRS_RLCMAC_TBF_UL_EV_N3104_MAX, "N3104_MAX" }, { GPRS_RLCMAC_TBF_UL_EV_RX_UL_ACK_NACK, "RX_UL_ACK_NACK" }, { GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, "LAST_UL_DATA_SENT" }, + { GPRS_RLCMAC_TBF_UL_EV_TX_COMPL_PKT_CTRL_ACK, "TX_COMPL_PKT_CTRL_ACK" }, { 0, NULL } }; @@ -248,6 +249,7 @@ const Packet_Uplink_Ack_Nack_t *ack = &dlbi->dl_block.u.Packet_Uplink_Ack_Nack; const PU_AckNack_GPRS_t *gprs = &ack->u.PU_AckNack_GPRS_Struct; const Ack_Nack_Description_t *ack_desc = &gprs->Ack_Nack_Description; + uint32_t poll_fn = 0xffffffff; /* Invalid FN */ if (gprs_rlcmac_ul_tbf_in_contention_resolution(ctx->ul_tbf)) { _contention_resolution_succeeded(ctx); @@ -262,7 +264,7 @@ } /* If RRBP contains valid data, schedule a response (PKT CONTROL ACK or PKT RESOURCE REQ). */ if (dlbi->dl_block.SP) { - uint32_t poll_fn = rrbp2fn(dlbi->fn, dlbi->dl_block.RRBP); + poll_fn = rrbp2fn(dlbi->fn, dlbi->dl_block.RRBP); gprs_rlcmac_pdch_ulc_reserve(g_rlcmac_ctx->sched.ulc[dlbi->ts_nr], poll_fn, GPRS_RLCMAC_PDCH_ULC_POLL_UL_ACK, ul_tbf_as_tbf(ctx->ul_tbf)); @@ -270,7 +272,9 @@ if (ack_desc->FINAL_ACK_INDICATION) { bool tbf_est = (gprs->Exist_AdditionsR99 && gprs->AdditionsR99.TBF_EST); LOGPFSMLDLBI(ctx->fi, dlbi, LOGL_DEBUG, "Final ACK received\n"); - ctx->rx_final_pkt_ul_ack_nack_has_tbf_est = tbf_est; + ctx->rx_final_pkt_ul_ack_nack.has_tbf_est = tbf_est; + ctx->rx_final_pkt_ul_ack_nack.pkt_ctrl_ack_fn = poll_fn; + ctx->rx_final_pkt_ul_ack_nack.pkt_ctrl_ack_tn = dlbi->ts_nr; tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_RELEASING); } break; @@ -301,8 +305,11 @@ /* Waiting for scheduler to transmit PKT CTRL ACK for the already received UL ACK/NACK FinalAck=1 */ static void st_releasing(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - //struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; + struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; switch (event) { + case GPRS_RLCMAC_TBF_UL_EV_TX_COMPL_PKT_CTRL_ACK: + gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); + break; default: OSMO_ASSERT(0); } @@ -352,7 +359,7 @@ .action = st_finished, }, [GPRS_RLCMAC_TBF_UL_ST_RELEASING] = { - .in_event_mask = 0, + .in_event_mask = X(GPRS_RLCMAC_TBF_UL_EV_TX_COMPL_PKT_CTRL_ACK), .out_state_mask = 0, .name = "RELEASING", .action = st_releasing, @@ -449,3 +456,15 @@ const struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = &ul_tbf->state_fsm; return ctx->fi->state; } + +/* Whether the UL TBF requested a Tx confirmation for a Pkt Ctrl Ack it transmitted at {FN,TN}. */ +bool gprs_rlcmac_ul_tbf_waiting_pkt_ctrl_ack_tx_confirmation(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts_nr) +{ + const struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = &ul_tbf->state_fsm; + /* PKT CTRL ACK Tx confirmation is only needed for final ack, to avoid + * freeing (unregistering with lower layers) the TBF too early. */ + if (ctx->fi->state != GPRS_RLCMAC_TBF_UL_ST_RELEASING) + return false; + return ctx->rx_final_pkt_ul_ack_nack.pkt_ctrl_ack_fn == fn && + ctx->rx_final_pkt_ul_ack_nack.pkt_ctrl_ack_tn == ts_nr; +} diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 179888a..bfc491f 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -623,6 +623,12 @@ rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); OSMO_ASSERT(rc == 0); + /* Trigger transmission confirmation of PKT CTRL ACK */ + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_pdch_data_cnf(ts_nr, rts_fn, NULL, 0); + rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + OSMO_ASSERT(rc == 0); + + printf("=== %s end ===\n", __func__); cleanup_test(); } diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index 366e321..554b6d0 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -69,6 +69,8 @@ DLGLOBAL DEBUG (ts=7,fn=21,usf=0) Tx Pkt Control Ack (UL ACK/NACK poll) DLGLOBAL DEBUG GRE(00002342) Tx Packet Control Ack DLGLOBAL DEBUG Tx to lower layers: L1CTL-PDCH_DATA.request +DLGLOBAL DEBUG Rx from lower layers: L1CTL-PDCH_DATA.confirm +DLGLOBAL INFO UL_TBF{RELEASING}: Received Event TX_COMPL_PKT_CTRL_ACK DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{RELEASING}: Send L1CTL-CFG_UL_TBF.req ul_tbf_nr=0 (release) DLGLOBAL DEBUG Tx to lower layers: L1CTL-CFG_UL_TBF.request -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35775?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ic38b4207623ccbda3b77d4b0a47431c25de95034 Gerrit-Change-Number: 35775 Gerrit-PatchSet: 5 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul: Fix wrong parenthesis around macro
by pespin 05 Feb '24

05 Feb '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/35787?usp=email ) ( 2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: rlcmac: tbf_ul: Fix wrong parenthesis around macro ...................................................................... rlcmac: tbf_ul: Fix wrong parenthesis around macro The logic doesn't seem to be affected by the fact that the parenthesis were wrong. Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7 --- M src/rlcmac/tbf_ul.c 1 file changed, 15 insertions(+), 3 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 26d710e..0ea0a9c 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -555,7 +555,7 @@ /* Returned as early return from function when amount of RLC blocks goes clearly over BS_CV_MAX */ #define BLK_COUNT_TOOMANY 0xff /* We cannot early-check if extra_li0=true, since there may temporarily have too many rlc blocks: */ -#define BLK_COUNT_EARLY_CHECK_TOOMANY(st) (!(st)->extra_li0) && blk_count_to_x(st) > (st)->bs_cv_max) +#define BLK_COUNT_EARLY_CHECK_TOOMANY(st) (!((st)->extra_li0) && blk_count_to_x(st) > (st)->bs_cv_max) static uint8_t blk_count_append_llc_prio_queue(struct blk_count_state *st, const struct gprs_llc_prio_queue *pq) { struct msgb *msg; @@ -563,7 +563,7 @@ llist_for_each_entry(msg, &pq->queue, list) { blk_count_append_llc(st, msgb_l2len(msg)); /* We cannot early-check if extra_li0=true, since there may temporarily have too many rlc blocks. */ - if (BLK_COUNT_EARLY_CHECK_TOOMANY(st) + if (BLK_COUNT_EARLY_CHECK_TOOMANY(st)) return BLK_COUNT_TOOMANY; /* early return, not entering countdown procedure */ } return 0; @@ -592,7 +592,7 @@ /* First of all, the current LLC frame in progress: */ if (ul_tbf->llc_tx_msg) { blk_count_append_llc(&st, msgb_length(ul_tbf->llc_tx_msg)); - if (BLK_COUNT_EARLY_CHECK_TOOMANY(&st) + if (BLK_COUNT_EARLY_CHECK_TOOMANY(&st)) goto done; /* early return, not entering countdown procedure */ } -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/35787?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I3f4aeff45c3fd5a007b050bd78283baaca2a18d7 Gerrit-Change-Number: 35787 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • ...
  • 175
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.