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 2023

  • 1 participants
  • 2601 discussions
[M] Change in osmo-mgw[master]: mgcp_sdp: add fmtp string to define HR GSM RTP format
by dexter 20 Feb '23

20 Feb '23
Attention is currently required from: pespin. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/31214 ) Change subject: mgcp_sdp: add fmtp string to define HR GSM RTP format ...................................................................... Patch Set 6: (2 comments) File src/libosmo-mgcp-client/mgcp_client.c: https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/480f6435_b922a9c8 PS5, Line 1254: pt = map_codec_to_pt(mgcp_msg->ptmap, mgcp_msg->ptmap_len, mgcp_msg->codecs[i]); > shouldn't this line be moved inside each case? […] its probably better, yes. File src/libosmo-mgcp/mgcp_network.c: https://gerrit.osmocom.org/c/osmo-mgw/+/31214/comment/d64839b9_b8c98777 PS5, Line 704: if (target_fmt_present && target_fmt == MGCP_GSM_HR_FMT_TS101318) > This looks wrong. If it's the target, then the comment with the " =>" is wrong. Its correct, but a bit confusing though. I have added some comments to make it clearer. The function should convert every input into the opposite format. Unless the format is specified. So wehen we detect that the input is TS101813 and the target format is also TS101813, then we abort. If nothing is specified we go ahead and do the conversion blindly. If the target format is specified and it is RFC5993, which is the opposite then we also go ahead and do the conversion. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4 Gerrit-Change-Number: 31214 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 20 Feb 2023 14:14:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in osmo-mgw[master]: mgcp_sdp: add fmtp string to define HR GSM RTP format
by dexter 20 Feb '23

20 Feb '23
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214 to look at the new patch set (#6). Change subject: mgcp_sdp: add fmtp string to define HR GSM RTP format ...................................................................... mgcp_sdp: add fmtp string to define HR GSM RTP format There are two different RTP HR GSM formats defined (TS 101.318 and RFC5993). Lets add an fmtp parameter In order to select between the two formats (and convert if necessary) via MGCP/SDP. Unfortunately there is no official fmtp string defined, so we have to define an osmocom specific string. Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4 Related: OS#5688 --- M include/osmocom/mgcp/mgcp_common.h M src/libosmo-mgcp-client/mgcp_client.c M src/libosmo-mgcp/mgcp_network.c M src/libosmo-mgcp/mgcp_sdp.c 4 files changed, 77 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/14/31214/6 -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/31214 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Idde8da27fd335dc03b8fbd9e0fedc1491b77e9e4 Gerrit-Change-Number: 31214 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: hnbgw: f_iuh2iu_disconnect: allow more time
by neels 20 Feb '23

20 Feb '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31410 ) Change subject: hnbgw: f_iuh2iu_disconnect: allow more time ...................................................................... hnbgw: f_iuh2iu_disconnect: allow more time Increase timeout for expecting an SCCP RLSD from osmo-hnbgw. Affects tests HNBGW_Tests.TC_ranap_cs_mo_disconnect HNBGW_Tests.TC_ranap_ps_mo_disconnect Rationale: For the case RUA --id-Disconnect--> HNBGW ----release-SCCP---- CN the tests expect behavior not exactly specified. 3GPP TS 48.006 9.2 Connection release: The MSC sends a SCCP released message. This message shall not contain any user data field. So what we should expect is this: HNBGW MSC RUA --id-Disconnect-------> | ---Data-Form-1(!)---> | Iu-ReleaseComplete | <--Released---------- | (no data) Instead, we expect the HNBGW to immediately send a RLSD to the MSC: HNBGW MSC RUA --id-Disconnect-------> | ---Released---------> | Iu-ReleaseComplete osmo-hnbgw is being fixed in that respect: it will soon give time for the CN to send an SCCP RLSD, and only if that times out will osmo-hnbgw send an SCCP RLSD to the CN. So HNBGW_Tests.ttcn should still ensure that osmo-hnbgw will eventually send an SCCP RLSD if the CN fails to do so, but it should allow more time to accomodate the release timeout. Related: osmo-hnbgw I6ff7e36532ff57c6f2d3e7e419dd22ef27dafd19 Related: SYS#6297 Change-Id: Ibf6eaeb1b82d43e4f208f64a71f2f6e889883a11 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 63 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/31410/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index 2aa6407..5a2c72e 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -561,11 +561,25 @@ return rx; } +/* 3GPP TS 48.006 9.2 Connection release: + * + * The MSC sends a SCCP released message. This message shall not contain + * any user data field. + * + * So what we expect normally is: + * + * HNBGW MSC + * RUA --id-Disconnect-------> | ---Data-Form-1(!)---> | Iu-ReleaseComplete + * | <--Released---------- | (no data) + * + * This function tests osmo-hnbgw behavior if the CN fails to send a RLSD: + * after some timeout, osmo-hnbgw should send a RLSD to the CN. + */ function f_iuh2iu_disconnect(template (present) RANAP_PDU tx, RUA_IEs.Cause cause, template RANAP_PDU exp_rx := omit) runs on ConnHdlr return RANAP_PDU { var RANAP_PDU rx - timer T := 5.0; + timer T := 10.0; if (istemplatekind(exp_rx, "omit")) { exp_rx := tx; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31410 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: Ibf6eaeb1b82d43e4f208f64a71f2f6e889883a11 Gerrit-Change-Number: 31410 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: Includes: Add gprs/rlc related enums
by arehbein 20 Feb '23

20 Feb '23
Attention is currently required from: pespin. arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31303 ) Change subject: Includes: Add gprs/rlc related enums ...................................................................... Patch Set 7: (1 comment) Patchset: PS7: > why are these still kept here? I think we already agreed that those are not really enums specified i […] My bad, seems like I wrote a response but kept in in draft mode without sending the replies. For now I'm still keeping them there so I can keep working on the other parts of this (since updating the enum names/includes doesn't affect the rest of this problem much) and I don't yet have a better idea of where to put it. You have a reply in your first comment regarding this (please also see what I wrote in the related issue on Redmine) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1ec2e52ad7fa625c08fe9df04d4a4f5323bf609c Gerrit-Change-Number: 31303 Gerrit-PatchSet: 7 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 20 Feb 2023 14:07:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: Includes: Add gprs/rlc related enums
by arehbein 20 Feb '23

20 Feb '23
Attention is currently required from: pespin. arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/31303 ) Change subject: Includes: Add gprs/rlc related enums ...................................................................... Patch Set 7: (2 comments) File include/osmocom/gprs/gprs_bssgp.h: https://gerrit.osmocom.org/c/libosmocore/+/31303/comment/6fe930c1_671395db PS4, Line 205: /* BSSGP procedure timing - timers and related counters (TS 101 343 v8.12.0 section 12.1) > AFAIC first ETSI managed the releases, and afterwards they were transferred to 3GPP. […] Done File include/osmocom/gprs/gprs_rlc.h: https://gerrit.osmocom.org/c/libosmocore/+/31303/comment/973eab19_821a1f1a PS1, Line 47: enum gprs_rlc_par { > Please check which similar fields/enums are used when encoding the msg transmitted into the wire, an […] I already had looked at files in `libosmo-abis/include/osmocom/abis`, but there isn't much to go on: Hardly any constants, and I didn't feel like it fit in anywhere. Looking for 'OML' or 'oml' in `libosmo-abis/include` also doesn't give anything worthwile (same with `12` or `21). The only defines around usage of that buffer come from `libosmocore/osmocom/gsm/protocol/gsm_12_21.h` I think. At least currently that header seems to be pretty clear of anything above the Abis layer, though. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31303 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1ec2e52ad7fa625c08fe9df04d4a4f5323bf609c Gerrit-Change-Number: 31303 Gerrit-PatchSet: 7 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 20 Feb 2023 14:05:07 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: osmo-pcu: Transition to use of 'telnet_init_default'
by arehbein 20 Feb '23

20 Feb '23
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31092 ) Change subject: osmo-pcu: Transition to use of 'telnet_init_default' ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > Not anymore, I already made a release... Done -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9559486ce64a9ccf348b4ee0e1d09141dbc1ae8f Gerrit-Change-Number: 31092 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 20 Feb 2023 13:57:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in libosmocore[master]: gsm0808_dec_channel_type: fix dec of ch_rate_type
by osmith 20 Feb '23

20 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/31408 ) Change subject: gsm0808_dec_channel_type: fix dec of ch_rate_type ...................................................................... gsm0808_dec_channel_type: fix dec of ch_rate_type According to 3GPP TS 48.008 V16.0.0 § 3.2.2.11, the "Channel and rate type" fills the whole octet 4, so don't cut it off. This fixes decoding of e.g. GSM0808_SIGN_FULL_PREF_NO_CHANGE, which I noticed while writing a test. Related: OS#5911 Change-Id: Ib5fba18eb82736c4f52f315ae1197159b7090e69 --- M src/gsm/gsm0808_utils.c 1 file changed, 17 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/08/31408/1 diff --git a/src/gsm/gsm0808_utils.c b/src/gsm/gsm0808_utils.c index 11e86b8..d8c275a 100644 --- a/src/gsm/gsm0808_utils.c +++ b/src/gsm/gsm0808_utils.c @@ -573,7 +573,7 @@ ct->ch_indctr = (*elem) & 0x0f; elem++; - ct->ch_rate_type = (*elem) & 0x0f; + ct->ch_rate_type = *elem; elem++; switch (ct->ch_indctr) { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31408 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib5fba18eb82736c4f52f315ae1197159b7090e69 Gerrit-Change-Number: 31408 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: tests: add test_gsm0808_enc_dec_channel_type_sign
by osmith 20 Feb '23

20 Feb '23
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/31409 ) Change subject: tests: add test_gsm0808_enc_dec_channel_type_sign ...................................................................... tests: add test_gsm0808_enc_dec_channel_type_sign Verify that we have the spare byte when encoding the signalling type. Related: OS#5911 Change-Id: Ied6e451d2e884412104cd9d530d0cd1b39f17f27 --- M tests/gsm0808/gsm0808_test.c 1 file changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/09/31409/1 diff --git a/tests/gsm0808/gsm0808_test.c b/tests/gsm0808/gsm0808_test.c index a03f276..9a6de1e 100644 --- a/tests/gsm0808/gsm0808_test.c +++ b/tests/gsm0808/gsm0808_test.c @@ -1199,6 +1199,33 @@ msgb_free(msg); } +static void test_gsm0808_enc_dec_channel_type_sign(void) +{ + struct gsm0808_channel_type enc_ct = { + .ch_indctr = GSM0808_CHAN_SIGN, + .ch_rate_type = GSM0808_SIGN_FULL_PREF_NO_CHANGE, + }; + struct gsm0808_channel_type dec_ct = {}; + struct msgb *msg; + uint8_t ct_enc_expected[] = { GSM0808_IE_CHANNEL_TYPE, + 0x03, 0x03, 0x1a, 0x00 + }; + uint8_t rc_enc; + int rc_dec; + + msg = msgb_alloc(1024, "output buffer"); + rc_enc = gsm0808_enc_channel_type(msg, &enc_ct); + OSMO_ASSERT(rc_enc == 5); + OSMO_ASSERT(memcmp(ct_enc_expected, msg->data, msg->len) == 0); + + rc_dec = gsm0808_dec_channel_type(&dec_ct, msg->data + 2, msg->len - 2); + OSMO_ASSERT(rc_dec == 2); + OSMO_ASSERT(enc_ct.ch_indctr == dec_ct.ch_indctr); + OSMO_ASSERT(enc_ct.ch_rate_type == dec_ct.ch_rate_type); + + msgb_free(msg); +} + static void test_gsm0808_dec_channel_type_err(void) { struct gsm0808_channel_type ct; @@ -2684,6 +2711,7 @@ test_gsm0808_enc_dec_channel_type_data(); test_gsm0808_enc_dec_channel_type_data_asym_pref(); test_gsm0808_enc_dec_channel_type_speech(); + test_gsm0808_enc_dec_channel_type_sign(); test_gsm0808_dec_channel_type_err(); test_gsm0808_enc_dec_encrypt_info(); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31409 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ied6e451d2e884412104cd9d530d0cd1b39f17f27 Gerrit-Change-Number: 31409 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in libosmo-gprs[master]: rlcmac: Implement T3164
by pespin 20 Feb '23

20 Feb '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31347 ) Change subject: rlcmac: Implement T3164 ...................................................................... rlcmac: Implement T3164 Change-Id: I1a3d7b552b36b84d84ca27572ce313265810fd3d --- M include/osmocom/gprs/rlcmac/tbf_ul.h M include/osmocom/gprs/rlcmac/tbf_ul_fsm.h M src/rlcmac/rlcmac.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 M tests/rlcmac/rlcmac_prim_test.ok 8 files changed, 246 insertions(+), 9 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/rlcmac/tbf_ul.h b/include/osmocom/gprs/rlcmac/tbf_ul.h index f9c5a7f..08075be 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul.h @@ -26,6 +26,8 @@ /* Currently selected LLC frame to be scheduled/transmitted */ struct msgb *llc_tx_msg; int32_t last_ul_drained_fn; + /* count all transmitted data blocks */ + unsigned int n3104; /* Holds state of all generated in-transit RLC blocks */ struct gprs_rlcmac_rlc_block_store *blkst; diff --git a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h index 1d7ff88..327acd7 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h @@ -20,11 +20,14 @@ struct gprs_rlcmac_tbf *tbf; struct gprs_rlcmac_ul_tbf *ul_tbf; }; + /* Number of packet access procedure timeouts (T3164, T3166) */ + unsigned int pkt_acc_proc_attempts; }; enum tbf_ul_fsm_event { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, + GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD, }; diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index c6c23e6..ac489d5 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -42,7 +42,9 @@ struct gprs_rlcmac_ctx *g_ctx; +/* TS 44.060 Table 13.1.1 */ static struct osmo_tdef T_defs_rlcmac[] = { + { .T=3164, .default_val=5, .desc="Wait for Uplink State Flag After Assignment (s)" }, { 0 } /* empty item at the end */ }; diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index 4a6f9ce..a47a2b3 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -761,6 +761,9 @@ need_padding ? ", padded" : "", msgb_hexdump(msg)); + if (ul_tbf->n3104 == 0) + osmo_fsm_inst_dispatch(ul_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, NULL); + ul_tbf->n3104++; return msg; } diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index 3cff899..72f2994 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -30,8 +30,9 @@ #define X(s) (1 << (s)) static const struct value_string tbf_ul_fsm_event_names[] = { - { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, "UL_ASS_START" }, + { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, "UL_ASS_START" }, { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, "UL_ASS_COMPL" }, + { GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, "FIRST_UL_DATA_SENT" }, { GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, "LAST_UL_DATA_SENT" }, { GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD, "FINAL_ACK_RECVD" }, { 0, NULL } @@ -40,7 +41,7 @@ static const struct osmo_tdef_state_timeout tbf_ul_fsm_timeouts[32] = { [GPRS_RLCMAC_TBF_UL_ST_NEW] = { }, [GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN] = { }, - [GPRS_RLCMAC_TBF_UL_ST_FLOW] = { }, + [GPRS_RLCMAC_TBF_UL_ST_FLOW] = { .T = 3164 }, [GPRS_RLCMAC_TBF_UL_ST_FINISHED] = { }, }; @@ -76,6 +77,18 @@ return gprs_rlcmac_prim_call_down_cb(rlcmac_prim); } +/* This one is triggered when packet access procedure fails, which can happen + * either in WAIT_IMM_ASS (ImmAss timeout), FLOW (T3164) or FINISHED (T3164, T3166) */ +static void st_new_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; + memset(&ctx->ul_tbf->cur_alloc, 0, sizeof(ctx->ul_tbf->cur_alloc)); + ctx->ul_tbf->n3104 = 0; + + /* Make sure the lower layers realize this tbf_nr has no longer any assigned resource: */ + configure_ul_tbf(ctx); +} + static void st_new(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; @@ -104,8 +117,13 @@ static void st_flow(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_FIRST_UL_DATA_SENT: + LOGPFSML(ctx->fi, LOGL_INFO, "First UL block sent, stop T3164\n"); + OSMO_ASSERT(fi->T == 3164); + osmo_timer_del(&fi->timer); + break; case GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT: tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_FINISHED); break; @@ -133,6 +151,7 @@ X(GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN) | X(GPRS_RLCMAC_TBF_UL_ST_FLOW), .name = "NEW", + .onenter = st_new_on_enter, .action = st_new, }, [GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN] = { @@ -145,8 +164,10 @@ }, [GPRS_RLCMAC_TBF_UL_ST_FLOW] = { .in_event_mask = + X(GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT) | X(GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT), .out_state_mask = + X(GPRS_RLCMAC_TBF_UL_ST_NEW) | X(GPRS_RLCMAC_TBF_UL_ST_FINISHED), .name = "FLOW", .action = st_flow, @@ -164,13 +185,28 @@ static int tbf_ul_fsm_timer_cb(struct osmo_fsm_inst *fi) { struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; + int rc; + switch (fi->T) { - case -2001: - LOGPTBFUL(ctx->ul_tbf, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); - /* fall-through */ - case 3169: - case 3195: - gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); + case 3164: + ctx->pkt_acc_proc_attempts++; + LOGPFSML(ctx->fi, LOGL_INFO, "T3164 timeout attempts=%u\n", ctx->pkt_acc_proc_attempts); + OSMO_ASSERT(fi->state == GPRS_RLCMAC_TBF_UL_ST_FLOW); + if (ctx->pkt_acc_proc_attempts == 4) { + /* TS 44.060 7.1.4 "... the packet access procedure has already been attempted four time ..." + * mobile station shall notify higher layers (TBF establishment failure) */ + /* TODO: find out how to notify higher layers */ + LOGPFSML(ctx->fi, LOGL_NOTICE, "TBF establishment failure (T3164 timeout attempts=%u)\n", ctx->pkt_acc_proc_attempts); + gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); + return 0; + } + /* TS 44.060 sub-clause 7.1.4. Reinitiate the packet access procedure: + * Move to NEW state, start Ass and wait for GPRS_RLCMAC_TBF_UL_ASS_EV_START */ + tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_NEW); + /* We always use 1phase for now... */ + rc = gprs_rlcmac_tbf_ul_ass_start(ctx->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); + if (rc < 0) + gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); break; default: OSMO_ASSERT(0); diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 658ddb3..75c18f8 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -21,6 +21,9 @@ #include <osmocom/core/utils.h> #include <osmocom/core/msgb.h> #include <osmocom/core/fsm.h> +#include <osmocom/core/timer.h> +#include <osmocom/core/timer_compat.h> +#include <osmocom/core/select.h> #include <osmocom/gprs/rlcmac/rlcmac.h> #include <osmocom/gprs/rlcmac/csn1_defs.h> @@ -181,6 +184,44 @@ 0x2b, 0x2b, 0x2b, 0x2b }; +#define clock_debug(fmt, args...) \ + do { \ + struct timespec ts; \ + struct timeval tv; \ + osmo_clock_gettime(CLOCK_MONOTONIC, &ts); \ + osmo_gettimeofday(&tv, NULL); \ + fprintf(stdout, "sys={%lu.%06lu}, mono={%lu.%06lu}: " fmt "\n", \ + tv.tv_sec, tv.tv_usec, ts.tv_sec, ts.tv_nsec/1000, ##args); \ + } while (0) + +static void clock_override_enable(bool enable) +{ + osmo_gettimeofday_override = enable; + osmo_clock_override_enable(CLOCK_MONOTONIC, enable); +} + +static void clock_override_set(long sec, long usec) +{ + struct timespec *mono; + osmo_gettimeofday_override_time.tv_sec = sec; + osmo_gettimeofday_override_time.tv_usec = usec; + mono = osmo_clock_override_gettimespec(CLOCK_MONOTONIC); + mono->tv_sec = sec; + mono->tv_nsec = usec*1000; + + clock_debug("clock_override_set"); +} + +static void clock_override_add_debug(long sec, long usec, bool dbg) +{ + osmo_gettimeofday_override_add(sec, usec); + osmo_clock_override_add(CLOCK_MONOTONIC, sec, usec*1000); + if (dbg) + clock_debug("clock_override_add"); +} +#define clock_override_add(sec, usec) clock_override_add_debug(sec, usec, true) + + static inline unsigned fn2bn(unsigned fn) { return (fn % 52) / 4; @@ -346,6 +387,8 @@ void prepare_test(void) { int rc; + clock_override_set(0, 0); + rc = osmo_gprs_rlcmac_init(OSMO_GPRS_RLCMAC_LOCATION_MS); OSMO_ASSERT(rc == 0); @@ -409,6 +452,39 @@ cleanup_test(); } +static void test_ul_tbf_t3164_timeout(void) +{ + struct osmo_gprs_rlcmac_prim *rlcmac_prim; + int rc; + unsigned int i; + + printf("=== %s start ===\n", __func__); + prepare_test(); + uint32_t tlli = 0x2342; + + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_grr_unitdata_req(tlli, pdu_llc_gmm_att_req, + sizeof(pdu_llc_gmm_att_req)); + rlcmac_prim->grr.unitdata_req.sapi = OSMO_GPRS_RLCMAC_LLC_SAPI_GMM; + rc = osmo_gprs_rlcmac_prim_upper_down(rlcmac_prim); + + OSMO_ASSERT(sizeof(ccch_imm_ass_pkt_ul_tbf_normal) == GSM_MACBLOCK_LEN); + + for (i = 0; i < 4; i++) { + ccch_imm_ass_pkt_ul_tbf_normal[7] = last_rach_req_ra; /* Update RA to match */ + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_ccch_data_ind(0, ccch_imm_ass_pkt_ul_tbf_normal); + rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + OSMO_ASSERT(rc == 0); + + /* increase time 5 seconds, timeout should trigger */ + clock_override_add(5, 0); + clock_debug("Expect T3164 timeout"); + osmo_select_main(0); + } + + printf("=== %s end ===\n", __func__); + cleanup_test(); +} + /* PCU allocates a DL TBF through PCH ImmAss for MS (when in packet-idle) */ static void test_dl_tbf_ccch_assign(void) { @@ -473,7 +549,10 @@ log_set_print_level(osmo_stderr_target, 1); log_set_use_color(osmo_stderr_target, 0); + clock_override_enable(true); + test_ul_tbf_attach(); + test_ul_tbf_t3164_timeout(); test_dl_tbf_ccch_assign(); talloc_free(tall_ctx); diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index 8f7283d..3346867 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -25,6 +25,8 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Sending new block at BSN 1, CS=CS-2 DLGLOBAL DEBUG -- Chunk with length 3 is less than remaining space (30): add length header to delimit LLC frame @@ -48,6 +50,83 @@ DLGLOBAL INFO UL_TBF{FINISHED}: Received Event FINAL_ACK_RECVD DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FINISHED}: Deallocated +DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request +DLGLOBAL INFO TLLI=0x00002342 not found, creating entity on the fly +DLGLOBAL INFO UL_TBF{NEW}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x79 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3164 +DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=1 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7b +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3164 +DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=2 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x79 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3164 +DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=3 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x78 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3164 +DLGLOBAL INFO UL_TBF{FLOW}: T3164 timeout attempts=4 +DLGLOBAL NOTICE UL_TBF{FLOW}: TBF establishment failure (T3164 timeout attempts=4) +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated +DLGLOBAL INFO UL_TBF{FLOW}: Deallocated DLGLOBAL INFO Rx from upper layers: GMMRR-ASSIGN.request DLGLOBAL INFO GMMRR-ASSIGN.req: creating new entity TLLI=0x00000001 DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication diff --git a/tests/rlcmac/rlcmac_prim_test.ok b/tests/rlcmac/rlcmac_prim_test.ok index 7792932..c419cb6 100644 --- a/tests/rlcmac/rlcmac_prim_test.ok +++ b/tests/rlcmac/rlcmac_prim_test.ok @@ -1,10 +1,34 @@ === test_ul_tbf_attach start === +sys={0.000000}, mono={0.000000}: clock_override_set test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7e test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 ] test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=8 ts=7 data_len=34 data=[00 00 02 0d e2 18 f2 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 00 ] === test_ul_tbf_attach end === +=== test_ul_tbf_t3164_timeout start === +sys={0.000000}, mono={0.000000}: clock_override_set +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +sys={5.000000}, mono={5.000000}: clock_override_add +sys={5.000000}, mono={5.000000}: Expect T3164 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7b +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +sys={10.000000}, mono={10.000000}: clock_override_add +sys={10.000000}, mono={10.000000}: Expect T3164 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +sys={15.000000}, mono={15.000000}: clock_override_add +sys={15.000000}, mono={15.000000}: Expect T3164 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x78 +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +sys={20.000000}, mono={20.000000}: clock_override_add +sys={20.000000}, mono={20.000000}: Expect T3164 timeout +=== test_ul_tbf_t3164_timeout end === === test_dl_tbf_ccch_assign start === +sys={0.000000}, mono={0.000000}: clock_override_set 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 14 00 00 00 00 00 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b ] -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31347 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I1a3d7b552b36b84d84ca27572ce313265810fd3d Gerrit-Change-Number: 31347 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[L] Change in libosmo-gprs[master]: rlcmac: Implement T3166
by pespin 20 Feb '23

20 Feb '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31350 ) Change subject: rlcmac: Implement T3166 ...................................................................... rlcmac: Implement T3166 Change-Id: I58dd757cbb5d8279fdf7fbdfb6f38ec0119c6156 --- M include/osmocom/gprs/rlcmac/tbf_ul.h M include/osmocom/gprs/rlcmac/tbf_ul_fsm.h M src/rlcmac/rlcmac.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 M tests/rlcmac/rlcmac_prim_test.ok 8 files changed, 288 insertions(+), 15 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/rlcmac/tbf_ul.h b/include/osmocom/gprs/rlcmac/tbf_ul.h index 08075be..f1b7128 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul.h @@ -45,6 +45,8 @@ struct gprs_rlcmac_ul_tbf *gprs_rlcmac_ul_tbf_alloc(struct gprs_rlcmac_entity *gre); void gprs_rlcmac_ul_tbf_free(struct gprs_rlcmac_ul_tbf *ul_tbf); +bool gprs_rlcmac_ul_tbf_in_contention_resolution(const struct gprs_rlcmac_ul_tbf *ul_tbf); + bool gprs_rlcmac_ul_tbf_data_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi); bool gprs_rlcmac_ul_tbf_dummy_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi); diff --git a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h index 327acd7..6957992 100644 --- a/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h +++ b/include/osmocom/gprs/rlcmac/tbf_ul_fsm.h @@ -28,6 +28,7 @@ GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, + GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS, GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD, }; diff --git a/src/rlcmac/rlcmac.c b/src/rlcmac/rlcmac.c index ac489d5..cff7c79 100644 --- a/src/rlcmac/rlcmac.c +++ b/src/rlcmac/rlcmac.c @@ -45,6 +45,7 @@ /* TS 44.060 Table 13.1.1 */ static struct osmo_tdef T_defs_rlcmac[] = { { .T=3164, .default_val=5, .desc="Wait for Uplink State Flag After Assignment (s)" }, + { .T=3166, .default_val=5, .desc="Wait for Packet Uplink ACK/NACK after sending of first data block (s)" }, { 0 } /* empty item at the end */ }; diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c index a47a2b3..993f694 100644 --- a/src/rlcmac/tbf_ul.c +++ b/src/rlcmac/tbf_ul.c @@ -90,6 +90,28 @@ talloc_free(ul_tbf); } +/* whether the UL TBF is in Contention Resolution state (false = already succeeded)*/ +bool gprs_rlcmac_ul_tbf_in_contention_resolution(const struct gprs_rlcmac_ul_tbf *ul_tbf) +{ + struct osmo_fsm_inst *fi = ul_tbf->state_fsm.fi; + switch (fi->state) { + case GPRS_RLCMAC_TBF_UL_ST_NEW: + case GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN: + return true; + case GPRS_RLCMAC_TBF_UL_ST_FLOW: + case GPRS_RLCMAC_TBF_UL_ST_FINISHED: + /* TS 44.60 7.1.3.3: For 2hase access, contention resolution is + * successful once we get out of GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN + * (when we receive a Pkt Ul Ass, see TS 44.60 7.1.3.3) */ + /* 1phase access: Check if either T3164 or T3166 are active: */ + return (ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE && + osmo_timer_pending(&fi->timer) && + (fi->T == 3164 || fi->T == 3166)); + default: + return false; + } +} + /* Used by the scheduler to find out whether an Uplink Dummy Control Block can be transmitted. If * true, it will potentially call gprs_rlcmac_ul_tbf_dummy_create() to generate a new dummy message to transmit. */ bool gprs_rlcmac_ul_tbf_dummy_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_rts_block_ind *bi) @@ -171,6 +193,9 @@ int rc; rc = gprs_rlcmac_ul_tbf_update_window(ul_tbf, first_bsn, rbb); + if (gprs_rlcmac_ul_tbf_in_contention_resolution(ul_tbf)) + osmo_fsm_inst_dispatch(ul_tbf->state_fsm.fi, GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS, NULL); + if (final_ack) { LOGPTBFUL(ul_tbf, LOGL_DEBUG, "Final ACK received.\n"); rc = gprs_rlcmac_ul_tbf_handle_final_ack(ul_tbf); diff --git a/src/rlcmac/tbf_ul_fsm.c b/src/rlcmac/tbf_ul_fsm.c index 72f2994..19d352d 100644 --- a/src/rlcmac/tbf_ul_fsm.c +++ b/src/rlcmac/tbf_ul_fsm.c @@ -25,16 +25,18 @@ #include <osmocom/gprs/rlcmac/tbf_ul_fsm.h> #include <osmocom/gprs/rlcmac/tbf_ul.h> +#include <osmocom/gprs/rlcmac/rlc_window_ul.h> #include <osmocom/gprs/rlcmac/gre.h> #define X(s) (1 << (s)) static const struct value_string tbf_ul_fsm_event_names[] = { - { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, "UL_ASS_START" }, - { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, "UL_ASS_COMPL" }, - { GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, "FIRST_UL_DATA_SENT" }, - { GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, "LAST_UL_DATA_SENT" }, - { GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD, "FINAL_ACK_RECVD" }, + { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_START, "UL_ASS_START" }, + { GPRS_RLCMAC_TBF_UL_EV_UL_ASS_COMPL, "UL_ASS_COMPL" }, + { GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT, "FIRST_UL_DATA_SENT" }, + { GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS, "CONTENTION_RESOLUTION_SUCCESS" }, + { GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT, "LAST_UL_DATA_SENT" }, + { GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD, "FINAL_ACK_RECVD" }, { 0, NULL } }; @@ -42,7 +44,7 @@ [GPRS_RLCMAC_TBF_UL_ST_NEW] = { }, [GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN] = { }, [GPRS_RLCMAC_TBF_UL_ST_FLOW] = { .T = 3164 }, - [GPRS_RLCMAC_TBF_UL_ST_FINISHED] = { }, + [GPRS_RLCMAC_TBF_UL_ST_FINISHED] = { .keep_timer = true }, /* keep FLOW state's T3164 / T3166 */ }; /* Transition to a state, using the T timer defined in tbf_fsm_timeouts. @@ -77,14 +79,29 @@ return gprs_rlcmac_prim_call_down_cb(rlcmac_prim); } +static void reinit_pkt_acces_procedure(struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx) +{ + int rc; + /* TS 44.060 sub-clause 7.1.4. Reinitiate the packet access procedure: + * Move to NEW state, start Ass and wait for GPRS_RLCMAC_TBF_UL_ASS_EV_START */ + tbf_ul_fsm_state_chg(ctx->fi, GPRS_RLCMAC_TBF_UL_ST_NEW); + /* We always use 1phase for now... */ + rc = gprs_rlcmac_tbf_ul_ass_start(ctx->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); + if (rc < 0) + gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); +} + /* This one is triggered when packet access procedure fails, which can happen * either in WAIT_IMM_ASS (ImmAss timeout), FLOW (T3164) or FINISHED (T3164, T3166) */ static void st_new_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; + memset(&ctx->ul_tbf->cur_alloc, 0, sizeof(ctx->ul_tbf->cur_alloc)); ctx->ul_tbf->n3104 = 0; + /* Mark everything we transmitted so far as NACKed: */ + gprs_rlcmac_rlc_ul_window_mark_for_resend(ctx->ul_tbf->ulw); /* Make sure the lower layers realize this tbf_nr has no longer any assigned resource: */ configure_ul_tbf(ctx); } @@ -118,11 +135,26 @@ static void st_flow(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; + unsigned long val_sec; + switch (event) { case GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT: LOGPFSML(ctx->fi, LOGL_INFO, "First UL block sent, stop T3164\n"); OSMO_ASSERT(fi->T == 3164); osmo_timer_del(&fi->timer); + if (ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE) { + LOGPFSML(ctx->fi, LOGL_INFO, "First UL block sent (1 phase access), start T3166\n"); + fi->T = 3166; + val_sec = osmo_tdef_get(g_ctx->T_defs, fi->T, OSMO_TDEF_S, -1); + osmo_timer_schedule(&fi->timer, val_sec, 0); + } + break; + case GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS: + LOGPFSML(ctx->fi, LOGL_INFO, "Contention resolution succeeded, stop T3166\n"); + OSMO_ASSERT(ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); + OSMO_ASSERT(fi->T == 3166); + osmo_timer_del(&fi->timer); + fi->T = 0; break; case GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT: tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_FINISHED); @@ -134,8 +166,15 @@ static void st_finished(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_CONTENTION_RESOLUTION_SUCCESS: + LOGPFSML(ctx->fi, LOGL_INFO, "Contention resolution succeeded, stop T3166\n"); + OSMO_ASSERT(ctx->ul_tbf->ul_ass_fsm.ass_type == GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); + OSMO_ASSERT(fi->T == 3166); + osmo_timer_del(&fi->timer); + fi->T = 0; + break; case GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD: break; default: @@ -165,6 +204,7 @@ [GPRS_RLCMAC_TBF_UL_ST_FLOW] = { .in_event_mask = X(GPRS_RLCMAC_TBF_UL_EV_FIRST_UL_DATA_SENT) | + X(GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS) | X(GPRS_RLCMAC_TBF_UL_EV_LAST_UL_DATA_SENT), .out_state_mask = X(GPRS_RLCMAC_TBF_UL_ST_NEW) | @@ -174,9 +214,10 @@ }, [GPRS_RLCMAC_TBF_UL_ST_FINISHED] = { .in_event_mask = + X(GPRS_RLCMAC_TBF_UL_EV_CONTENTION_RESOLUTION_SUCCESS) | X(GPRS_RLCMAC_TBF_UL_EV_FINAL_ACK_RECVD), .out_state_mask = - X(GPRS_RLCMAC_TBF_UL_ST_WAIT_ASSIGN), + X(GPRS_RLCMAC_TBF_UL_ST_NEW), .name = "FINISHED", .action = st_finished, }, @@ -185,7 +226,6 @@ static int tbf_ul_fsm_timer_cb(struct osmo_fsm_inst *fi) { struct gprs_rlcmac_tbf_ul_fsm_ctx *ctx = (struct gprs_rlcmac_tbf_ul_fsm_ctx *)fi->priv; - int rc; switch (fi->T) { case 3164: @@ -200,13 +240,23 @@ gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); return 0; } - /* TS 44.060 sub-clause 7.1.4. Reinitiate the packet access procedure: - * Move to NEW state, start Ass and wait for GPRS_RLCMAC_TBF_UL_ASS_EV_START */ - tbf_ul_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ST_NEW); - /* We always use 1phase for now... */ - rc = gprs_rlcmac_tbf_ul_ass_start(ctx->ul_tbf, GPRS_RLCMAC_TBF_UL_ASS_TYPE_1PHASE); - if (rc < 0) + reinit_pkt_acces_procedure(ctx); + break; + case 3166: + ctx->pkt_acc_proc_attempts++; + LOGPFSML(ctx->fi, LOGL_INFO, "T3166 timeout attempts=%u\n", ctx->pkt_acc_proc_attempts); + OSMO_ASSERT(fi->state == GPRS_RLCMAC_TBF_UL_ST_FLOW || + fi->state == GPRS_RLCMAC_TBF_UL_ST_FINISHED); + if (ctx->pkt_acc_proc_attempts == 4) { + /* TS 44.060 7.1.4 "... expiry of timers T3166 ... the + * mobile station shall remain in packet idle mode and + * notify higher layer (TBF establishment failure)" */ + /* TODO: find out how to notify higher layers */ + LOGPFSML(ctx->fi, LOGL_NOTICE, "TBF establishment failure (T3166 timeout attempts=%u)\n", ctx->pkt_acc_proc_attempts); gprs_rlcmac_ul_tbf_free(ctx->ul_tbf); + return 0; + } + reinit_pkt_acces_procedure(ctx); break; default: OSMO_ASSERT(0); diff --git a/tests/rlcmac/rlcmac_prim_test.c b/tests/rlcmac/rlcmac_prim_test.c index 75c18f8..09fa3c4 100644 --- a/tests/rlcmac/rlcmac_prim_test.c +++ b/tests/rlcmac/rlcmac_prim_test.c @@ -485,6 +485,45 @@ cleanup_test(); } +static void test_ul_tbf_t3166_timeout(void) +{ + struct osmo_gprs_rlcmac_prim *rlcmac_prim; + int rc; + + printf("=== %s start ===\n", __func__); + prepare_test(); + uint32_t tlli = 0x2342; + uint8_t ts_nr = 7; + uint8_t usf = 0; + uint32_t rts_fn = 4; + unsigned int i; + + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_grr_unitdata_req(tlli, pdu_llc_gmm_att_req, + sizeof(pdu_llc_gmm_att_req)); + rlcmac_prim->grr.unitdata_req.sapi = OSMO_GPRS_RLCMAC_LLC_SAPI_GMM; + rc = osmo_gprs_rlcmac_prim_upper_down(rlcmac_prim); + + for (i = 0; i < 4; i++) { + OSMO_ASSERT(sizeof(ccch_imm_ass_pkt_ul_tbf_normal) == GSM_MACBLOCK_LEN); + ccch_imm_ass_pkt_ul_tbf_normal[7] = last_rach_req_ra; /* Update RA to match */ + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_ccch_data_ind(0, ccch_imm_ass_pkt_ul_tbf_normal); + rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + + /* Trigger transmission of LLC data (GMM Attach) (first part) */ + rlcmac_prim = osmo_gprs_rlcmac_prim_alloc_l1ctl_pdch_rts_ind(ts_nr, rts_fn, usf); + rc = osmo_gprs_rlcmac_prim_lower_up(rlcmac_prim); + OSMO_ASSERT(rc == 0); + + /* increase time 5 seconds, timeout should trigger */ + clock_override_add(5, 0); + clock_debug("Expect T3166 timeout"); + osmo_select_main(0); + } + + printf("=== %s end ===\n", __func__); + cleanup_test(); +} + /* PCU allocates a DL TBF through PCH ImmAss for MS (when in packet-idle) */ static void test_dl_tbf_ccch_assign(void) { @@ -553,6 +592,7 @@ test_ul_tbf_attach(); test_ul_tbf_t3164_timeout(); + test_ul_tbf_t3166_timeout(); test_dl_tbf_ccch_assign(); talloc_free(tall_ctx); diff --git a/tests/rlcmac/rlcmac_prim_test.err b/tests/rlcmac/rlcmac_prim_test.err index 3346867..26deb79 100644 --- a/tests/rlcmac/rlcmac_prim_test.err +++ b/tests/rlcmac/rlcmac_prim_test.err @@ -27,6 +27,7 @@ DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent (1 phase access), start T3166 DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Sending new block at BSN 1, CS=CS-2 DLGLOBAL DEBUG -- Chunk with length 3 is less than remaining space (30): add length header to delimit LLC frame @@ -46,6 +47,8 @@ DLGLOBAL DEBUG - got ack for BSN=0 DLGLOBAL DEBUG - got ack for BSN=1 DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) V(B): (V(A)=2)""(V(S)-1=1) A=Acked N=Nacked U=Unacked X=Resend-Unacked I=Invalid +DLGLOBAL INFO UL_TBF{FINISHED}: Received Event CONTENTION_RESOLUTION_SUCCESS +DLGLOBAL INFO UL_TBF{FINISHED}: Contention resolution succeeded, stop T3166 DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Final ACK received. DLGLOBAL INFO UL_TBF{FINISHED}: Received Event FINAL_ACK_RECVD DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated @@ -127,6 +130,122 @@ DLGLOBAL NOTICE UL_TBF{FLOW}: TBF establishment failure (T3164 timeout attempts=4) DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated DLGLOBAL INFO UL_TBF{FLOW}: Deallocated +DLGLOBAL INFO Rx from upper layers: GRR-UNITDATA.request +DLGLOBAL INFO TLLI=0x00002342 not found, creating entity on the fly +DLGLOBAL INFO UL_TBF{NEW}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Allocated +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7a +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Sending new block at BSN 0, CS=CS-2 +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Dequeue next LLC (len=33) +DLGLOBAL DEBUG -- Chunk with length 33 larger than space (30) left in block: copy only remaining space, and we are done +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) data block (BSN 0, CS-2): 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent (1 phase access), start T3166 +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3166 +DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=1 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7c +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Resending BSN 0 +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent (1 phase access), start T3166 +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3166 +DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=2 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x79 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Resending BSN 0 +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent (1 phase access), start T3166 +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3166 +DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=3 +DLGLOBAL INFO UL_TBF{FLOW}: state_chg to NEW +DLGLOBAL INFO UL_TBF{NEW}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x00 +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Received Event START +DLGLOBAL INFO UL_TBF{NEW}: Received Event UL_ASS_START +DLGLOBAL INFO UL_TBF{NEW}: state_chg to ASSIGN +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Send RACH.req ra=0x7d +DLGLOBAL INFO UL_TBF_ASS{IDLE}: state_chg to WAIT_CCCH_IMM_ASS +DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: Received Event RX_CCCH_IMM_ASS +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss initial CS=CS-2 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: ImmAss DynamicAlloc (1phase access) ts_nr=7 usf=0 +DLGLOBAL INFO UL_TBF_ASS{WAIT_CCCH_IMM_ASS}: state_chg to COMPLETED +DLGLOBAL INFO UL_TBF{ASSIGN}: Received Event UL_ASS_COMPL +DLGLOBAL INFO UL_TBF{ASSIGN}: Send L1CTL-CF_UL_TBF.req ul_slotmask=0x80 +DLGLOBAL INFO UL_TBF{ASSIGN}: state_chg to FLOW +DLGLOBAL INFO UL_TBF_ASS{COMPLETED}: state_chg to IDLE +DLGLOBAL INFO Rx from lower layers: L1CTL-PDCH_RTS.indication +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Resending BSN 0 +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) need_padding 0 spb_status 0 spb 0 (BSN1 0 BSN2 -1) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying 1 RLC blocks, 1 BSNs +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) Copying data unit 0 (BSN 0) +DLGLOBAL DEBUG TBF(UL:NR-0:TLLI-00002342) msg block (BSN 0, CS-2): 3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 +DLGLOBAL INFO UL_TBF{FLOW}: Received Event FIRST_UL_DATA_SENT +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent, stop T3164 +DLGLOBAL INFO UL_TBF{FLOW}: First UL block sent (1 phase access), start T3166 +DLGLOBAL INFO UL_TBF{FLOW}: Timeout of T3166 +DLGLOBAL INFO UL_TBF{FLOW}: T3166 timeout attempts=4 +DLGLOBAL NOTICE UL_TBF{FLOW}: TBF establishment failure (T3166 timeout attempts=4) +DLGLOBAL INFO UL_TBF_ASS{IDLE}: Deallocated +DLGLOBAL INFO UL_TBF{FLOW}: Deallocated DLGLOBAL INFO Rx from upper layers: GMMRR-ASSIGN.request DLGLOBAL INFO GMMRR-ASSIGN.req: creating new entity TLLI=0x00000001 DLGLOBAL INFO Rx from lower layers: L1CTL-CCCH_DATA.indication diff --git a/tests/rlcmac/rlcmac_prim_test.ok b/tests/rlcmac/rlcmac_prim_test.ok index c419cb6..9c61988 100644 --- a/tests/rlcmac/rlcmac_prim_test.ok +++ b/tests/rlcmac/rlcmac_prim_test.ok @@ -27,6 +27,32 @@ sys={20.000000}, mono={20.000000}: clock_override_add sys={20.000000}, mono={20.000000}: Expect T3164 timeout === test_ul_tbf_t3164_timeout end === +=== test_ul_tbf_t3166_timeout start === +sys={0.000000}, mono={0.000000}: clock_override_set +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7a +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 ] +sys={5.000000}, mono={5.000000}: clock_override_add +sys={5.000000}, mono={5.000000}: Expect T3166 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7c +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 ] +sys={10.000000}, mono={10.000000}: clock_override_add +sys={10.000000}, mono={10.000000}: Expect T3166 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x79 +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 ] +sys={15.000000}, mono={15.000000}: clock_override_add +sys={15.000000}, mono={15.000000}: Expect T3166 timeout +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x00 +test_rlcmac_prim_down_cb(): Rx L1CTL-RACH.request ra=0x7d +test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_UL_TBF.request ul_tbf_nr=0 ul_slotmask=0x80 +test_rlcmac_prim_down_cb(): Rx L1CTL-PDCH_DATA.request fn=4 ts=7 data_len=34 data=[3c 00 01 01 c0 00 08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 00 ] +sys={20.000000}, mono={20.000000}: clock_override_add +sys={20.000000}, mono={20.000000}: Expect T3166 timeout +=== test_ul_tbf_t3166_timeout end === === test_dl_tbf_ccch_assign start === sys={0.000000}, mono={0.000000}: clock_override_set test_rlcmac_prim_down_cb(): Rx L1CTL-CFG_DL_TBF.request dl_tbf_nr=0 dl_slotmask=0x80 dl_tfi=0 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31350 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I58dd757cbb5d8279fdf7fbdfb6f38ec0119c6156 Gerrit-Change-Number: 31350 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.