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

January 2023

  • 1 participants
  • 2205 discussions
Change in libosmo-gprs[master]: sndcp: Initial libosmo-gprs-sndcp support
by fixeria 02 Jan '23

02 Jan '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30490 ) Change subject: sndcp: Initial libosmo-gprs-sndcp support ...................................................................... Patch Set 13: Code-Review+1 (5 comments) File include/osmocom/gprs/sndcp/sndcp.h: https://gerrit.osmocom.org/c/libosmo-gprs/+/30490/comment/15af8ef5_db3d3f09 PS12, Line 8: osmocom/core/msgb.h > You're not using msgb API in this file, why including it here? Done https://gerrit.osmocom.org/c/libosmo-gprs/+/30490/comment/7d352155_f31e14ad PS12, Line 13: GPRS_ > missing OSMO_ prefix in public API Done File include/osmocom/gprs/sndcp/sndcp_prim.h: https://gerrit.osmocom.org/c/libosmo-gprs/+/30490/comment/30671952_53f44932 PS12, Line 117: OSMO_GPRS_SNDCP_BSSGP_ > OSMO_GPRS_SNDCP_SNSM_ Done File tests/sndcp/Makefile.am: https://gerrit.osmocom.org/c/libosmo-gprs/+/30490/comment/9894956c_a073622d PS12, Line 53: $(NULL) > " No newline at end of revision file. […] Done File tests/testsuite.at: https://gerrit.osmocom.org/c/libosmo-gprs/+/30490/comment/97062b72_459d0a9e PS12, Line 56: AT_CLEANUP > " No newline at end of revision file. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30490 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie05b5d721cf0a6147ed45c1feb75ad829865252b Gerrit-Change-Number: 30490 Gerrit-PatchSet: 13 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 02 Jan 2023 12:59:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: rename s/SI_13_t/SI13_RestOctets_t/
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30804 ) Change subject: rlcmac: rename s/SI_13_t/SI13_RestOctets_t/ ...................................................................... rlcmac: rename s/SI_13_t/SI13_RestOctets_t/ Change-Id: I74ed534b9b52b70cdf8e4e2d4d960bb1d9aaf27b --- M include/osmocom/gprs/rlcmac/gprs_rlcmac.h M src/rlcmac/ts_44_018.c M tests/rlcmac/ts_44_018_test.c 3 files changed, 20 insertions(+), 20 deletions(-) Approvals: laforge: 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/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h index b325f3e..2be01b2 100644 --- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h +++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h @@ -3229,8 +3229,8 @@ PSI13_AdditionR99 AdditionsR99; } PSI13_t; -/* SI_13_t is combined in the PSI13 structure */ -typedef PSI13_t SI_13_t; +/* SI13_RestOctets_t is combined in the PSI13 structure */ +typedef PSI13_t SI13_RestOctets_t; /* < Packet PRACH Parameters message content > */ typedef struct @@ -5429,7 +5429,7 @@ int osmo_gprs_rlcmac_encode_ms_ra_cap(struct bitvec *vector, MS_Radio_Access_capability_t * data); int osmo_gprs_rlcmac_decode_egprs_pkt_ch_req(guint16 ra, EGPRS_PacketChannelRequest_t *data); -int osmo_gprs_rlcmac_decode_si13ro(SI_13_t *storage, +int osmo_gprs_rlcmac_decode_si13ro(SI13_RestOctets_t *storage, const uint8_t *data, size_t data_len); int osmo_gprs_rlcmac_decode_imm_ass_ro(IA_RestOctets_t *storage, const uint8_t *data, size_t data_len); diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index 68be92e..48ab5ea 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -439,24 +439,24 @@ CSN_DESCR_END (SI13_AdditionR99) static const -CSN_DESCR_BEGIN (SI_13_t) - M_THIS_EXIST_LH (SI_13_t), +CSN_DESCR_BEGIN (SI13_RestOctets_t) + M_THIS_EXIST_LH (SI13_RestOctets_t), - M_UINT (SI_13_t, BCCH_CHANGE_MARK, 3), - M_UINT (SI_13_t, SI_CHANGE_FIELD, 4), + M_UINT (SI13_RestOctets_t, BCCH_CHANGE_MARK, 3), + M_UINT (SI13_RestOctets_t, SI_CHANGE_FIELD, 4), - M_NEXT_EXIST (SI_13_t, Exist_MA, 2), - M_UINT (SI_13_t, SI13_CHANGE_MARK, 2), - M_TYPE (SI_13_t, GPRS_Mobile_Allocation, GPRS_Mobile_Allocation_t), + M_NEXT_EXIST (SI13_RestOctets_t, Exist_MA, 2), + M_UINT (SI13_RestOctets_t, SI13_CHANGE_MARK, 2), + M_TYPE (SI13_RestOctets_t, GPRS_Mobile_Allocation, GPRS_Mobile_Allocation_t), - M_UNION (SI_13_t, 2), - M_TYPE (SI_13_t, u.PBCCH_Not_present, PBCCH_Not_present_t), - M_TYPE (SI_13_t, u.PBCCH_present, PBCCH_present_t), + M_UNION (SI13_RestOctets_t, 2), + M_TYPE (SI13_RestOctets_t, u.PBCCH_Not_present, PBCCH_Not_present_t), + M_TYPE (SI13_RestOctets_t, u.PBCCH_present, PBCCH_present_t), - M_NEXT_EXIST_OR_NULL_LH(SI_13_t, Exist_AdditionsR99, 1), - M_TYPE (SI_13_t, AdditionsR99, SI13_AdditionR99), - M_PADDING_BITS (SI_13_t), -CSN_DESCR_END (SI_13_t) + M_NEXT_EXIST_OR_NULL_LH(SI13_RestOctets_t, Exist_AdditionsR99, 1), + M_TYPE (SI13_RestOctets_t, AdditionsR99, SI13_AdditionR99), + M_PADDING_BITS (SI13_RestOctets_t), +CSN_DESCR_END (SI13_RestOctets_t) /* Enhanced Measurement Report */ #if 0 @@ -657,11 +657,11 @@ return ret; } -int osmo_gprs_rlcmac_decode_si13ro(SI_13_t *storage, +int osmo_gprs_rlcmac_decode_si13ro(SI13_RestOctets_t *storage, const uint8_t *data, size_t data_len) { return _osmo_gprs_rlcmac_decode(storage, - CSNDESCR(SI_13_t), + CSNDESCR(SI13_RestOctets_t), "SI13 Rest Octets", data, data_len); } diff --git a/tests/rlcmac/ts_44_018_test.c b/tests/rlcmac/ts_44_018_test.c index 05d5aab..cff153e 100644 --- a/tests/rlcmac/ts_44_018_test.c +++ b/tests/rlcmac/ts_44_018_test.c @@ -41,7 +41,7 @@ for (unsigned int i = 0; i < ARRAY_SIZE(testData); i++) { uint8_t buf[20]; /* GSM_MACBLOCK_LEN - 3 */ - SI_13_t si13ro = { 0 }; + SI13_RestOctets_t si13ro = { 0 }; int rc; printf("testData[%d] = %s\n", i, testData[i]); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30804 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I74ed534b9b52b70cdf8e4e2d4d960bb1d9aaf27b Gerrit-Change-Number: 30804 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: fix coding of EGPRS Packet Uplink Assignment in IA RestOctets
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30798 ) Change subject: rlcmac: fix coding of EGPRS Packet Uplink Assignment in IA RestOctets ...................................................................... rlcmac: fix coding of EGPRS Packet Uplink Assignment in IA RestOctets Thanks to the unit tests, it was found that decoding of the LH part, specifically the EGPRS Packet Uplink Assignment structure, is done incorrectly. This patch fixes incorrect decoding. Double usage of the UnionType element in the IA_EGPRS_t has a side effect: the M_UINT actually consumes one bit, so the remaining bit stream is shifted and decoded incorrectly. Replace a combination of M_UINT and M_CHOICE with two M_UNIONs. Remove struct IA_EGPRS_t, which is not used anywhere yet. For reference, see 3GPP TS 44.018, table 10.5.2.16.1. Change-Id: I7fedbad1ac4d744d1d3941553e573d4202e9d24a Fixes: I39a29dc9b5b22ce4374ae33336696014e326d012 Related: OS#5500 --- M include/osmocom/gprs/rlcmac/gprs_rlcmac.h M src/rlcmac/ts_44_018.c M tests/rlcmac/ts_44_018_test.err 3 files changed, 25 insertions(+), 33 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h index 5e6613b..d5912c9 100644 --- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h +++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h @@ -677,17 +677,6 @@ typedef struct { - guint8 UnionType; - union - { - IA_EGPRS_00_t IA_EGPRS_PUA; /* 00 < EGPRS Packet Uplink Assignment >*/ - guint8 IA_EGPRS_01; /* 01 reserved for future use */ - guint8 IA_EGPRS_1; /* 1 reserved for future use */ - } u; -} IA_EGPRS_t; - -typedef struct -{ guint8 Length; guint8 MAIO; guint8 MobileAllocation[62]; @@ -825,7 +814,18 @@ typedef struct { - IA_EGPRS_t EGPRS; + guint8 UnionType; + union { + IA_EGPRS_00_t IA_EGPRS_PUA; + /* TODO: <Multiple Blocks Packet Downlink Assignment> */ + } u; +} IA_RestOctetsLH0x_t; + +typedef struct +{ + guint8 UnionType; /* only one variant: lh0x */ + IA_RestOctetsLH0x_t lh0x; + IA_AdditionsR13_t AdditionsR13; } IA_RestOctetsLH_t; diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index aa43b07..5481166 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -228,24 +228,6 @@ CSN_DESCR_END (IA_EGPRS_00_t) static const -CSN_ChoiceElement_t IA_EGPRS_Choice[] = -{ - {2, 0x00, 0, M_TYPE (IA_EGPRS_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t)}, - {2, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "01 <Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, - {1, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "1 <Second Part Packet Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, -}; - -/* Please observe the double usage of UnionType element. - * First, it is used to store the second bit of LL/LH identification of EGPRS contents. - * Thereafter, UnionType will be used to store the index to detected choice. - */ -static const -CSN_DESCR_BEGIN(IA_EGPRS_t) - M_UINT (IA_EGPRS_t, UnionType , 1 ), - M_CHOICE (IA_EGPRS_t, UnionType, IA_EGPRS_Choice, ElementsOf(IA_EGPRS_Choice)), -CSN_DESCR_END (IA_EGPRS_t) - -static const CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t) M_UINT (IA_FreqParamsBeforeTime_t, Length, 6), M_UINT (IA_FreqParamsBeforeTime_t, MAIO, 6), @@ -373,8 +355,18 @@ CSN_DESCR_END (IA_RestOctetsLL_t) static const +CSN_DESCR_BEGIN (IA_RestOctetsLH0x_t) + M_UNION (IA_RestOctetsLH0x_t, 2), + M_TYPE (IA_RestOctetsLH0x_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t), + CSN_ERROR (IA_RestOctetsLH0x_t, "01 <Multiple Blocks Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED), +CSN_DESCR_END (IA_RestOctetsLH0x_t) + +static const CSN_DESCR_BEGIN (IA_RestOctetsLH_t) - M_TYPE (IA_RestOctetsLH_t, EGPRS, IA_EGPRS_t), + M_UNION (IA_RestOctetsLH_t, 2), + M_TYPE (IA_RestOctetsLH_t, lh0x, IA_RestOctetsLH0x_t), + CSN_ERROR (IA_RestOctetsLH_t, "1 -- reserved for future use", CSN_ERROR_STREAM_NOT_SUPPORTED), + M_TYPE_OR_NULL (IA_RestOctetsLH_t, AdditionsR13, IA_AdditionsR13_t), CSN_DESCR_END (IA_RestOctetsLH_t) diff --git a/tests/rlcmac/ts_44_018_test.err b/tests/rlcmac/ts_44_018_test.err index 46348f9..8b804a5 100644 --- a/tests/rlcmac/ts_44_018_test.err +++ b/tests/rlcmac/ts_44_018_test.err @@ -6,5 +6,5 @@ DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.DynamicOrFixedAllocation = 1 | : Access.DynamicOrFixedAllocation | TFI_ASSIGNMENT = 3 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 1 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | PR_MODE = 1 | : End Allocation.DynamicAllocation | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_ALPHA = 0 | GAMMA = 15 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.DynamicOrFixedAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 43|43|43|43|43|0| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.SingleBlockAllocation = 0 | : Access.SingleBlockAllocation | Exist_ALPHA = 0 | GAMMA = 15 | 0x01 = 1 | : TBF_STARTING_TIME | N32 = 14 | N51 = 50 | N26 = 13 | : End TBF_STARTING_TIME | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.SingleBlockAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 21|149|149|149|149|128|-22| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Downlink_ImmAssignment = 1 | : ul_dl.Packet_Downlink_ImmAssignment | TLLI = 0xd6e1ae5a | Exist_TFI_to_TA_VALID = 1 | TFI_ASSIGNMENT = 3 | RLC_MODE = 0 | Exist_ALPHA = 0 | GAMMA = 15 | POLLING = 0 | TA_VALID = 0 | Exist_TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | BTS_PWR_CTRL_MODE = 0 | PR_MODE = 1 | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Downlink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 0|86|86|-22| -DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | : EGPRS | UnionType = 0 | Choice IA_EGPRS_Choice = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 25 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 9 | : TBF_STARTING_TIME | N32 = 20 | N51 = 56 | N26 = 24 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End EGPRS | : AdditionsR13 | Exist_AdditionsR13 = 1 | ImplicitRejectPS = 1 | PEO_BCCH_CHANGE_MARK = 1 | RCC = 3 | : End AdditionsR13 | : End u.lh | Padding = 2|27|3|43|43|43| -DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | : EGPRS | UnionType = 0 | Choice IA_EGPRS_Choice = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 17 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 9 | : TBF_STARTING_TIME | N32 = 16 | N51 = 54 | N26 = 18 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 3 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End EGPRS | : AdditionsR13 | Exist_AdditionsR13 = 1 | ImplicitRejectPS = 0 | PEO_BCCH_CHANGE_MARK = 0 | RCC = 0 | : End AdditionsR13 | : End u.lh | Padding = 11|43|43|43|43|43| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.IA_EGPRS_PUA = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 12 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.OnePhaseAccess = 1 | : Access.OnePhaseAccess | TFI_ASSIGNMENT = 7 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 3 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 0 | : End Allocation.DynamicAllocation | EGPRS_CHANNEL_CODING_COMMAND = 2 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_BEP_PERIOD2 = 1 | BEP_PERIOD2 = 5 | RESEGMENT = 1 | EGPRS_WindowSize = 4 | Exist_ALPHA = 0 | GAMMA = 13 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.OnePhaseAccess | : End u.IA_EGPRS_PUA | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|172|172|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.IA_EGPRS_PUA = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 8 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 13 | : TBF_STARTING_TIME | N32 = 20 | N51 = 45 | N26 = 0 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|86|86|86|86|-22| -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30798 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I7fedbad1ac4d744d1d3941553e573d4202e9d24a Gerrit-Change-Number: 30798 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: add decoder and test vectors for IA Rest Octets
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30797 ) Change subject: rlcmac: add decoder and test vectors for IA Rest Octets ...................................................................... rlcmac: add decoder and test vectors for IA Rest Octets This new API is needed for the MS side GPRS implementation in order to be able to establish an Uplink TBF. Both wireshark and osmo-pcu rely on hand-written code for parsing and generating the IA Rest Octets IE, making no use of the CSN.1 codec. We already have some (mostly commented out) CSN.1 definitions needed for decoding the IA Rest Octets IE, inherited as-is from wireshark. Ths patch adds the missing bits and a few unit test vectors. Note that decoding of the LH part, specifically the EGPRS Packet Uplink Assignment structure, is currently done incorrectly because there is a problem in the IA_EGPRS_t definition. This will be fixed in a follow-up patch. For reference, see 3GPP TS 44.018, table 10.5.2.16.1. Change-Id: I39a29dc9b5b22ce4374ae33336696014e326d012 Related: OS#5500 --- M include/osmocom/gprs/rlcmac/gprs_rlcmac.h M src/rlcmac/ts_44_018.c M tests/rlcmac/ts_44_018_test.c M tests/rlcmac/ts_44_018_test.err M tests/rlcmac/ts_44_018_test.ok 5 files changed, 170 insertions(+), 48 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved; Verified pespin: Looks good to me, but someone else must approve diff --git a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h index 81410ef..5e6613b 100644 --- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h +++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h @@ -811,13 +811,59 @@ typedef struct { + gboolean Exist_AdditionsR13; + guint8 ImplicitRejectPS; + guint8 PEO_BCCH_CHANGE_MARK; + guint8 RCC; +} IA_AdditionsR13_t; + +typedef struct +{ + guint8 Compressed_Inter_RAT_HO_INFO_IND; + IA_AdditionsR13_t AdditionsR13; +} IA_RestOctetsLL_t; + +typedef struct +{ + IA_EGPRS_t EGPRS; + IA_AdditionsR13_t AdditionsR13; +} IA_RestOctetsLH_t; + +typedef struct +{ + IA_FreqParamsBeforeTime_t IA_FrequencyParams; + guint8 Compressed_Inter_RAT_HO_INFO_IND; + IA_AdditionsR13_t AdditionsR13; +} IA_RestOctetsHL_t; + +typedef struct +{ + guint8 UnionType; + union { + IA_PacketAssignment_UL_DL_t UplinkDownlinkAssignment; + Second_Part_Packet_Assignment_t SecondPartPacketAssignment; + } u; + + gboolean Exist_AdditionsR10; + guint8 ImplicitRejectCS; + guint8 ImplicitRejectPS; + + gboolean Exist_AdditionsR13; + guint8 PEO_BCCH_CHANGE_MARK; + guint8 RCC; +} IA_RestOctetsHH_t; + +typedef struct +{ guint8 UnionType; union { - IA_PacketAssignment_UL_DL_t UplinkDownlinkAssignment; - Second_Part_Packet_Assignment_t Second_Part_Packet_Assignment; + IA_RestOctetsLL_t ll; + IA_RestOctetsLH_t lh; + IA_RestOctetsHL_t hl; + IA_RestOctetsHH_t hh; } u; -} IA_PacketAssignment_t; +} IA_RestOctets_t; #if 0 typedef struct @@ -5379,5 +5425,7 @@ int osmo_gprs_rlcmac_decode_si13ro(SI_13_t *storage, const uint8_t *data, size_t data_len); +int osmo_gprs_rlcmac_decode_imm_ass_ro(IA_RestOctets_t *storage, + const uint8_t *data, size_t data_len); void osmo_gprs_rlcmac_set_log_cat(int cat); diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index 288fa6c..aa43b07 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -160,12 +160,6 @@ CSN_DESCR_END (P2_Rest_Octets_t) #endif -/* <IA Rest Octets> - * Note!! - * - first two bits skipped and frequencyparameters skipped - * - additions for R99 and EGPRS added - */ -#if 0 static const CSN_DESCR_BEGIN(DynamicAllocation_t) M_UINT (DynamicAllocation_t, USF, 3), @@ -175,9 +169,7 @@ M_UINT (DynamicAllocation_t, P0, 4), M_UINT (DynamicAllocation_t, PR_MODE, 1), CSN_DESCR_END (DynamicAllocation_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(EGPRS_TwoPhaseAccess_t) M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_ALPHA, 1), @@ -189,12 +181,10 @@ M_NEXT_EXIST (EGPRS_TwoPhaseAccess_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), M_UINT (EGPRS_TwoPhaseAccess_t, P0, 4), - M_UINT (EGPRS_TwoPhaseAccess_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (EGPRS_TwoPhaseAccess_t, BTS_PWR_CTRL_MODE, 1), /* shall be 0 */ M_UINT (EGPRS_TwoPhaseAccess_t, PR_MODE, 1), CSN_DESCR_END (EGPRS_TwoPhaseAccess_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(EGPRS_OnePhaseAccess_t) M_UINT (EGPRS_OnePhaseAccess_t, TFI_ASSIGNMENT, 5), @@ -224,9 +214,8 @@ M_NEXT_EXIST (EGPRS_OnePhaseAccess_t, Exist_TBF_STARTING_TIME, 1), M_TYPE (EGPRS_OnePhaseAccess_t, TBF_STARTING_TIME, StartingTime_t), CSN_DESCR_END (EGPRS_OnePhaseAccess_t) -#endif -#if 0 +/* < EGPRS Packet Uplink Assignment > */ static const CSN_DESCR_BEGIN(IA_EGPRS_00_t) M_UINT (IA_EGPRS_00_t, ExtendedRA, 5), @@ -237,23 +226,19 @@ M_TYPE (IA_EGPRS_00_t, Access.TwoPhaseAccess, EGPRS_TwoPhaseAccess_t), M_TYPE (IA_EGPRS_00_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), CSN_DESCR_END (IA_EGPRS_00_t) -#endif -#if 0 static const CSN_ChoiceElement_t IA_EGPRS_Choice[] = { {2, 0x00, 0, M_TYPE (IA_EGPRS_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t)}, - {2, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "01 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, - {1, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "1 <IA_EGPRS>", CSN_ERROR_STREAM_NOT_SUPPORTED)} + {2, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "01 <Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, + {1, 0x01, 0, CSN_ERROR(IA_EGPRS_t, "1 <Second Part Packet Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED)}, }; -#endif /* Please observe the double usage of UnionType element. * First, it is used to store the second bit of LL/LH identification of EGPRS contents. * Thereafter, UnionType will be used to store the index to detected choice. */ -#if 0 static const CSN_DESCR_BEGIN(IA_EGPRS_t) M_UINT (IA_EGPRS_t, UnionType , 1 ), @@ -266,9 +251,7 @@ M_UINT (IA_FreqParamsBeforeTime_t, MAIO, 6), M_VAR_ARRAY (IA_FreqParamsBeforeTime_t, MobileAllocation, Length, 8), CSN_DESCR_END (IA_FreqParamsBeforeTime_t) -#endif -#if 0 static const CSN_DESCR_BEGIN (GPRS_SingleBlockAllocation_t) M_NEXT_EXIST (GPRS_SingleBlockAllocation_t, Exist_ALPHA, 1), @@ -280,12 +263,10 @@ M_NEXT_EXIST_LH(GPRS_SingleBlockAllocation_t, Exist_P0_BTS_PWR_CTRL_PR_MODE, 3), M_UINT (GPRS_SingleBlockAllocation_t, P0, 4), - M_UINT (GPRS_SingleBlockAllocation_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (GPRS_SingleBlockAllocation_t, BTS_PWR_CTRL_MODE, 1), /* shall be 0 */ M_UINT (GPRS_SingleBlockAllocation_t, PR_MODE, 1), CSN_DESCR_END (GPRS_SingleBlockAllocation_t) -#endif -#if 0 static const CSN_DESCR_BEGIN (GPRS_DynamicOrFixedAllocation_t) M_UINT (GPRS_DynamicOrFixedAllocation_t, TFI_ASSIGNMENT, 5), @@ -309,17 +290,13 @@ M_NEXT_EXIST (GPRS_DynamicOrFixedAllocation_t, Exist_TBF_STARTING_TIME, 1), M_TYPE (GPRS_DynamicOrFixedAllocation_t, TBF_STARTING_TIME, StartingTime_t), CSN_DESCR_END (GPRS_DynamicOrFixedAllocation_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(PU_IA_AdditionsR99_t) M_NEXT_EXIST (PU_IA_AdditionsR99_t, Exist_ExtendedRA, 1), M_UINT (PU_IA_AdditionsR99_t, ExtendedRA, 5), CSN_DESCR_END (PU_IA_AdditionsR99_t) -#endif -#if 0 static const CSN_DESCR_BEGIN (Packet_Uplink_ImmAssignment_t) M_UNION (Packet_Uplink_ImmAssignment_t, 2), @@ -329,9 +306,7 @@ M_NEXT_EXIST_OR_NULL_LH(Packet_Uplink_ImmAssignment_t, Exist_AdditionsR99, 1), M_TYPE (Packet_Uplink_ImmAssignment_t, AdditionsR99, PU_IA_AdditionsR99_t), CSN_DESCR_END (Packet_Uplink_ImmAssignment_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(PD_IA_AdditionsR99_t) M_UINT (PD_IA_AdditionsR99_t, EGPRS_WindowSize, 5), @@ -340,9 +315,7 @@ M_NEXT_EXIST (PD_IA_AdditionsR99_t, Exist_BEP_PERIOD2, 1), M_UINT (PD_IA_AdditionsR99_t, BEP_PERIOD2, 4), CSN_DESCR_END (PD_IA_AdditionsR99_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(Packet_Downlink_ImmAssignment_t) M_UINT (Packet_Downlink_ImmAssignment_t, TLLI, 32), @@ -364,40 +337,81 @@ M_NEXT_EXIST (Packet_Downlink_ImmAssignment_t, Exist_P0_PR_MODE, 3), M_UINT (Packet_Downlink_ImmAssignment_t, P0, 4), - M_UINT (Packet_Downlink_ImmAssignment_t, BTS_PWR_CTRL_MODE, 1), + M_UINT (Packet_Downlink_ImmAssignment_t, BTS_PWR_CTRL_MODE, 1), /* shall be 0 */ M_UINT (Packet_Downlink_ImmAssignment_t, PR_MODE, 1), M_NEXT_EXIST_OR_NULL_LH(Packet_Downlink_ImmAssignment_t, Exist_AdditionsR99, 1), M_TYPE (Packet_Downlink_ImmAssignment_t, AdditionsR99, PD_IA_AdditionsR99_t), CSN_DESCR_END (Packet_Downlink_ImmAssignment_t) -#endif -#if 0 static const CSN_DESCR_BEGIN (Second_Part_Packet_Assignment_t) M_NEXT_EXIST_OR_NULL_LH(Second_Part_Packet_Assignment_t, Exist_SecondPart, 2), M_NEXT_EXIST (Second_Part_Packet_Assignment_t, Exist_ExtendedRA, 1), M_UINT (Second_Part_Packet_Assignment_t, ExtendedRA, 5), CSN_DESCR_END (Second_Part_Packet_Assignment_t) -#endif -#if 0 static const CSN_DESCR_BEGIN(IA_PacketAssignment_UL_DL_t) M_UNION (IA_PacketAssignment_UL_DL_t, 2), M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Uplink_ImmAssignment, Packet_Uplink_ImmAssignment_t), M_TYPE (IA_PacketAssignment_UL_DL_t, ul_dl.Packet_Downlink_ImmAssignment, Packet_Downlink_ImmAssignment_t), CSN_DESCR_END (IA_PacketAssignment_UL_DL_t) -#endif -#if 0 static const -CSN_DESCR_BEGIN(IA_PacketAssignment_t) - M_UNION (IA_PacketAssignment_t, 2), - M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, IA_PacketAssignment_UL_DL_t), - M_TYPE (IA_PacketAssignment_t, u.UplinkDownlinkAssignment, Second_Part_Packet_Assignment_t), -CSN_DESCR_END (IA_PacketAssignment_t) -#endif +CSN_DESCR_BEGIN (IA_AdditionsR13_t) + M_NEXT_EXIST_LH (IA_AdditionsR13_t, Exist_AdditionsR13, 3), + M_UINT (IA_AdditionsR13_t, ImplicitRejectPS, 1), + M_UINT (IA_AdditionsR13_t, PEO_BCCH_CHANGE_MARK, 2), + M_UINT (IA_AdditionsR13_t, RCC, 3), +CSN_DESCR_END (IA_AdditionsR13_t) + +static const +CSN_DESCR_BEGIN (IA_RestOctetsLL_t) + M_UINT_LH (IA_RestOctetsLL_t, Compressed_Inter_RAT_HO_INFO_IND, 1), + M_TYPE_OR_NULL (IA_RestOctetsLL_t, AdditionsR13, IA_AdditionsR13_t), +CSN_DESCR_END (IA_RestOctetsLL_t) + +static const +CSN_DESCR_BEGIN (IA_RestOctetsLH_t) + M_TYPE (IA_RestOctetsLH_t, EGPRS, IA_EGPRS_t), + M_TYPE_OR_NULL (IA_RestOctetsLH_t, AdditionsR13, IA_AdditionsR13_t), +CSN_DESCR_END (IA_RestOctetsLH_t) + +static const +CSN_DESCR_BEGIN (IA_RestOctetsHL_t) + M_TYPE (IA_RestOctetsHL_t, IA_FrequencyParams, IA_FreqParamsBeforeTime_t), + M_UINT_LH (IA_RestOctetsHL_t, Compressed_Inter_RAT_HO_INFO_IND, 1), + M_TYPE_OR_NULL (IA_RestOctetsHL_t, AdditionsR13, IA_AdditionsR13_t), +CSN_DESCR_END (IA_RestOctetsHL_t) + +static const +CSN_DESCR_BEGIN (IA_RestOctetsHH_t) + M_UNION (IA_RestOctetsHH_t, 2), + M_TYPE (IA_RestOctetsHH_t, u.UplinkDownlinkAssignment, IA_PacketAssignment_UL_DL_t), + M_TYPE (IA_RestOctetsHH_t, u.SecondPartPacketAssignment, Second_Part_Packet_Assignment_t), + + M_NEXT_EXIST_OR_NULL_LH (IA_RestOctetsHH_t, Exist_AdditionsR10, 2), + M_UINT (IA_RestOctetsHH_t, ImplicitRejectCS, 1), + M_UINT (IA_RestOctetsHH_t, ImplicitRejectPS, 1), + + M_NEXT_EXIST_OR_NULL_LH (IA_RestOctetsHH_t, Exist_AdditionsR13, 2), + M_UINT (IA_RestOctetsHH_t, PEO_BCCH_CHANGE_MARK, 2), + M_UINT (IA_RestOctetsHH_t, RCC, 3), +CSN_DESCR_END (IA_RestOctetsHH_t) + +/* 10.5.2.16 IA Rest Octets */ +static const +CSN_DESCR_BEGIN (IA_RestOctets_t) + M_UNION_LH (IA_RestOctets_t, 4), + M_TYPE (IA_RestOctets_t, u.ll, IA_RestOctetsLL_t), + M_TYPE (IA_RestOctets_t, u.lh, IA_RestOctetsLH_t), + M_TYPE (IA_RestOctets_t, u.hl, IA_RestOctetsHL_t), + M_TYPE (IA_RestOctets_t, u.hh, IA_RestOctetsHH_t), + + /* TODO: Additions for Rel-14 and Rel-15 */ + M_PADDING_BITS (IA_RestOctets_t), +CSN_DESCR_END (IA_RestOctets_t) static const CSN_DESCR_BEGIN(SI13_AdditionsR6) @@ -647,3 +661,12 @@ "SI13 Rest Octets", data, data_len); } + +int osmo_gprs_rlcmac_decode_imm_ass_ro(IA_RestOctets_t *storage, + const uint8_t *data, size_t data_len) +{ + return _osmo_gprs_rlcmac_decode(storage, + CSNDESCR(IA_RestOctets_t), + "IA Rest Octets", + data, data_len); +} diff --git a/tests/rlcmac/ts_44_018_test.c b/tests/rlcmac/ts_44_018_test.c index d1cc170..05d5aab 100644 --- a/tests/rlcmac/ts_44_018_test.c +++ b/tests/rlcmac/ts_44_018_test.c @@ -52,6 +52,38 @@ rc = osmo_gprs_rlcmac_decode_si13ro(&si13ro, &buf[0], sizeof(buf)); printf("osmo_gprs_rlcmac_decode_si13ro() returns %d\n", rc); } + + printf("\n"); +} + +static void test_imm_ass_ro(void) +{ + printf("*** %s ***\n", __func__); + + static const char *testData[] = { + "c8c2859f032b2b2b2b2b", // HH, Packet Uplink Assignment + "c1ebb26b2b2b2b2b2b2b", // HH, Packet Uplink Assignment (single block) + "dd6e1ae5a8c7841b2b2b", // HH, Packet Downlink Assignment + "464269c616b21b032b2b2b", // LH, EGPRS Packet Uplink Assignment (one phase) + "444261b4b40b2b2b2b2b2b", // LH, EGPRS Packet Uplink Assignment (two phase) + /* TODO: add more samples (LL and HL) */ + }; + + for (unsigned int i = 0; i < ARRAY_SIZE(testData); i++) { + uint8_t buf[11]; /* up to 11 octets as per 10.5.2.16 */ + IA_RestOctets_t iaro = { 0 }; + int rc; + + printf("testData[%d] = %s\n", i, testData[i]); + + rc = osmo_hexparse(testData[i], &buf[0], sizeof(buf)); + OSMO_ASSERT(rc == (strlen(testData[i]) / 2)); + + rc = osmo_gprs_rlcmac_decode_imm_ass_ro(&iaro, &buf[0], sizeof(buf)); + printf("osmo_gprs_rlcmac_decode_imm_ass_ro() returns %d\n", rc); + } + + printf("\n"); } static const struct log_info_cat test_log_categories[] = { }; @@ -74,6 +106,7 @@ log_set_use_color(osmo_stderr_target, 0); test_si13ro(); + test_imm_ass_ro(); talloc_free(tall_ctx); } diff --git a/tests/rlcmac/ts_44_018_test.err b/tests/rlcmac/ts_44_018_test.err index ebed024..46348f9 100644 --- a/tests/rlcmac/ts_44_018_test.err +++ b/tests/rlcmac/ts_44_018_test.err @@ -3,3 +3,8 @@ DLCSN1 INFO osmo_csn1_stream_decode (SI13 Rest Octets): Exist = 1 | BCCH_CHANGE_MARK = 1 | SI_CHANGE_FIELD = 0 | Exist_MA = 0 | u.PBCCH_Not_present = 0 | : u.PBCCH_Not_present | RAC = 1 | SPGC_CCCH_SUP = 0 | PRIORITY_ACCESS_THR = 6 | NETWORK_CONTROL_ORDER = 0 | : GPRS_Cell_Options | NMO = 1 | T3168 = 0 | T3192 = 7 | DRX_TIMER_MAX = 7 | ACCESS_BURST_TYPE = 0 | CONTROL_ACK_TYPE = 1 | BS_CV_MAX = 6 | Exist_PAN = 1 | PAN_DEC = 1 | PAN_INC = 2 | PAN_MAX = 4 | Exist_Extension_Bits = 1 | : Extension_Bits | extension_length = 16 | Extension_Info = 148 | Extension_Info = 104 | : End Extension_Bits | : End GPRS_Cell_Options | : GPRS_Power_Control_Parameters | ALPHA = 8 | T_AVG_W = 12 | T_AVG_T = 10 | PC_MEAS_CHAN = 0 | N_AVG_I = 2 | : End GPRS_Power_Control_Parameters | : End u.PBCCH_Not_present | Exist_AdditionsR99 = 1 | : AdditionsR99 | SGSNR = 1 | Exist_AdditionsR4 = 1 | : AdditionsR4 | SI_STATUS_IND = 1 | Exist_AdditionsR6 = 0 | : End AdditionsR4 | : End AdditionsR99 | Padding = 10|202|202|202|202|202|202|-22| DLCSN1 INFO osmo_csn1_stream_decode (SI13 Rest Octets): Exist = 1 | BCCH_CHANGE_MARK = 1 | SI_CHANGE_FIELD = 0 | Exist_MA = 0 | u.PBCCH_Not_present = 0 | : u.PBCCH_Not_present | RAC = 1 | SPGC_CCCH_SUP = 0 | PRIORITY_ACCESS_THR = 6 | NETWORK_CONTROL_ORDER = 0 | : GPRS_Cell_Options | NMO = 1 | T3168 = 0 | T3192 = 7 | DRX_TIMER_MAX = 7 | ACCESS_BURST_TYPE = 0 | CONTROL_ACK_TYPE = 1 | BS_CV_MAX = 6 | Exist_PAN = 1 | PAN_DEC = 1 | PAN_INC = 2 | PAN_MAX = 4 | Exist_Extension_Bits = 1 | : Extension_Bits | extension_length = 16 | Extension_Info = 148 | Extension_Info = 40 | : End Extension_Bits | : End GPRS_Cell_Options | : GPRS_Power_Control_Parameters | ALPHA = 8 | T_AVG_W = 12 | T_AVG_T = 10 | PC_MEAS_CHAN = 0 | N_AVG_I = 2 | : End GPRS_Power_Control_Parameters | : End u.PBCCH_Not_present | Exist_AdditionsR99 = 1 | : AdditionsR99 | SGSNR = 1 | Exist_AdditionsR4 = 1 | : AdditionsR4 | SI_STATUS_IND = 0 | Exist_AdditionsR6 = 0 | : End AdditionsR4 | : End AdditionsR99 | Padding = 10|202|202|202|202|202|202|-22| DLCSN1 INFO osmo_csn1_stream_decode (SI13 Rest Octets): Exist = 1 | BCCH_CHANGE_MARK = 3 | SI_CHANGE_FIELD = 0 | Exist_MA = 0 | u.PBCCH_Not_present = 0 | : u.PBCCH_Not_present | RAC = 1 | SPGC_CCCH_SUP = 0 | PRIORITY_ACCESS_THR = 6 | NETWORK_CONTROL_ORDER = 0 | : GPRS_Cell_Options | NMO = 1 | T3168 = 0 | T3192 = 0 | DRX_TIMER_MAX = 3 | ACCESS_BURST_TYPE = 0 | CONTROL_ACK_TYPE = 0 | BS_CV_MAX = 10 | Exist_PAN = 1 | PAN_DEC = 1 | PAN_INC = 2 | PAN_MAX = 4 | Exist_Extension_Bits = 1 | : Extension_Bits | extension_length = 11 | Extension_Info = 212 | Extension_Info = 7 | : End Extension_Bits | : End GPRS_Cell_Options | : GPRS_Power_Control_Parameters | ALPHA = 8 | T_AVG_W = 10 | T_AVG_T = 10 | PC_MEAS_CHAN = 0 | N_AVG_I = 2 | : End GPRS_Power_Control_Parameters | : End u.PBCCH_Not_present | Exist_AdditionsR99 = 1 | : AdditionsR99 | SGSNR = 1 | Exist_AdditionsR4 = 1 | : AdditionsR4 | SI_STATUS_IND = 1 | Exist_AdditionsR6 = 0 | : End AdditionsR4 | : End AdditionsR99 | Padding = 1|89|89|89|89|89|89|89|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.DynamicOrFixedAllocation = 1 | : Access.DynamicOrFixedAllocation | TFI_ASSIGNMENT = 3 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 1 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | PR_MODE = 1 | : End Allocation.DynamicAllocation | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_ALPHA = 0 | GAMMA = 15 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.DynamicOrFixedAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 43|43|43|43|43|0| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.SingleBlockAllocation = 0 | : Access.SingleBlockAllocation | Exist_ALPHA = 0 | GAMMA = 15 | 0x01 = 1 | : TBF_STARTING_TIME | N32 = 14 | N51 = 50 | N26 = 13 | : End TBF_STARTING_TIME | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.SingleBlockAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 21|149|149|149|149|128|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Downlink_ImmAssignment = 1 | : ul_dl.Packet_Downlink_ImmAssignment | TLLI = 0xd6e1ae5a | Exist_TFI_to_TA_VALID = 1 | TFI_ASSIGNMENT = 3 | RLC_MODE = 0 | Exist_ALPHA = 0 | GAMMA = 15 | POLLING = 0 | TA_VALID = 0 | Exist_TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | BTS_PWR_CTRL_MODE = 0 | PR_MODE = 1 | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Downlink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 0|86|86|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | : EGPRS | UnionType = 0 | Choice IA_EGPRS_Choice = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 25 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 9 | : TBF_STARTING_TIME | N32 = 20 | N51 = 56 | N26 = 24 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End EGPRS | : AdditionsR13 | Exist_AdditionsR13 = 1 | ImplicitRejectPS = 1 | PEO_BCCH_CHANGE_MARK = 1 | RCC = 3 | : End AdditionsR13 | : End u.lh | Padding = 2|27|3|43|43|43| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | : EGPRS | UnionType = 0 | Choice IA_EGPRS_Choice = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 17 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 9 | : TBF_STARTING_TIME | N32 = 16 | N51 = 54 | N26 = 18 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 3 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End EGPRS | : AdditionsR13 | Exist_AdditionsR13 = 1 | ImplicitRejectPS = 0 | PEO_BCCH_CHANGE_MARK = 0 | RCC = 0 | : End AdditionsR13 | : End u.lh | Padding = 11|43|43|43|43|43| diff --git a/tests/rlcmac/ts_44_018_test.ok b/tests/rlcmac/ts_44_018_test.ok index 864e03c..6847f07 100644 --- a/tests/rlcmac/ts_44_018_test.ok +++ b/tests/rlcmac/ts_44_018_test.ok @@ -9,3 +9,16 @@ osmo_gprs_rlcmac_decode_si13ro() returns 0 testData[4] = b0005840654a92b53c2942db2b2b2b2b2b2b2b2b osmo_gprs_rlcmac_decode_si13ro() returns 0 + +*** test_imm_ass_ro *** +testData[0] = c8c2859f032b2b2b2b2b +osmo_gprs_rlcmac_decode_imm_ass_ro() returns 0 +testData[1] = c1ebb26b2b2b2b2b2b2b +osmo_gprs_rlcmac_decode_imm_ass_ro() returns 0 +testData[2] = dd6e1ae5a8c7841b2b2b +osmo_gprs_rlcmac_decode_imm_ass_ro() returns 0 +testData[3] = 464269c616b21b032b2b2b +osmo_gprs_rlcmac_decode_imm_ass_ro() returns 0 +testData[4] = 444261b4b40b2b2b2b2b2b +osmo_gprs_rlcmac_decode_imm_ass_ro() returns 0 + -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30797 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I39a29dc9b5b22ce4374ae33336696014e326d012 Gerrit-Change-Number: 30797 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: rename s/IA_EGPRS_00_t/IA_EGPRS_PktUlAss_t/
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30799 ) Change subject: rlcmac: rename s/IA_EGPRS_00_t/IA_EGPRS_PktUlAss_t/ ...................................................................... rlcmac: rename s/IA_EGPRS_00_t/IA_EGPRS_PktUlAss_t/ Use a self-explanatory name instead of the one with magic numbers. It's safe to rename it because this API is not used anywhere yet. Change-Id: I884cba359bfda21cf45fa846e5b7ff20d129bdf7 Related: OS#5500 --- M include/osmocom/gprs/rlcmac/gprs_rlcmac.h M src/rlcmac/ts_44_018.c M tests/rlcmac/ts_44_018_test.err 3 files changed, 12 insertions(+), 12 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h index d5912c9..f322455 100644 --- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h +++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h @@ -673,7 +673,7 @@ EGPRS_TwoPhaseAccess_t TwoPhaseAccess; /* 04.18/10.5.2.16 Multiblock allocation */ EGPRS_OnePhaseAccess_t OnePhaseAccess; /* 04.60/10.5.2.16 TFI using Dynamic or Fixed Allocation */ } Access; -} IA_EGPRS_00_t; +} IA_EGPRS_PktUlAss_t; typedef struct { @@ -816,7 +816,7 @@ { guint8 UnionType; union { - IA_EGPRS_00_t IA_EGPRS_PUA; + IA_EGPRS_PktUlAss_t EGPRS_PktUlAss; /* TODO: <Multiple Blocks Packet Downlink Assignment> */ } u; } IA_RestOctetsLH0x_t; diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index 5481166..fd30416 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -217,15 +217,15 @@ /* < EGPRS Packet Uplink Assignment > */ static const -CSN_DESCR_BEGIN(IA_EGPRS_00_t) - M_UINT (IA_EGPRS_00_t, ExtendedRA, 5), +CSN_DESCR_BEGIN(IA_EGPRS_PktUlAss_t) + M_UINT (IA_EGPRS_PktUlAss_t, ExtendedRA, 5), - M_REC_ARRAY (IA_EGPRS_00_t, AccessTechnologyType, NrOfAccessTechnologies, 4), + M_REC_ARRAY (IA_EGPRS_PktUlAss_t, AccessTechnologyType, NrOfAccessTechnologies, 4), - M_UNION (IA_EGPRS_00_t, 2), - M_TYPE (IA_EGPRS_00_t, Access.TwoPhaseAccess, EGPRS_TwoPhaseAccess_t), - M_TYPE (IA_EGPRS_00_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), -CSN_DESCR_END (IA_EGPRS_00_t) + M_UNION (IA_EGPRS_PktUlAss_t, 2), + M_TYPE (IA_EGPRS_PktUlAss_t, Access.TwoPhaseAccess, EGPRS_TwoPhaseAccess_t), + M_TYPE (IA_EGPRS_PktUlAss_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), +CSN_DESCR_END (IA_EGPRS_PktUlAss_t) static const CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t) @@ -357,7 +357,7 @@ static const CSN_DESCR_BEGIN (IA_RestOctetsLH0x_t) M_UNION (IA_RestOctetsLH0x_t, 2), - M_TYPE (IA_RestOctetsLH0x_t, u.IA_EGPRS_PUA, IA_EGPRS_00_t), + M_TYPE (IA_RestOctetsLH0x_t, u.EGPRS_PktUlAss, IA_EGPRS_PktUlAss_t), CSN_ERROR (IA_RestOctetsLH0x_t, "01 <Multiple Blocks Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED), CSN_DESCR_END (IA_RestOctetsLH0x_t) diff --git a/tests/rlcmac/ts_44_018_test.err b/tests/rlcmac/ts_44_018_test.err index 8b804a5..61d77c8 100644 --- a/tests/rlcmac/ts_44_018_test.err +++ b/tests/rlcmac/ts_44_018_test.err @@ -6,5 +6,5 @@ DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.DynamicOrFixedAllocation = 1 | : Access.DynamicOrFixedAllocation | TFI_ASSIGNMENT = 3 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 1 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | PR_MODE = 1 | : End Allocation.DynamicAllocation | CHANNEL_CODING_COMMAND = 1 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_ALPHA = 0 | GAMMA = 15 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.DynamicOrFixedAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 43|43|43|43|43|0| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Uplink_ImmAssignment = 0 | : ul_dl.Packet_Uplink_ImmAssignment | Access.SingleBlockAllocation = 0 | : Access.SingleBlockAllocation | Exist_ALPHA = 0 | GAMMA = 15 | 0x01 = 1 | : TBF_STARTING_TIME | N32 = 14 | N51 = 50 | N26 = 13 | : End TBF_STARTING_TIME | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.SingleBlockAllocation | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Uplink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 21|149|149|149|149|128|-22| DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.hh = 3 | : u.hh | u.UplinkDownlinkAssignment = 0 | : u.UplinkDownlinkAssignment | ul_dl.Packet_Downlink_ImmAssignment = 1 | : ul_dl.Packet_Downlink_ImmAssignment | TLLI = 0xd6e1ae5a | Exist_TFI_to_TA_VALID = 1 | TFI_ASSIGNMENT = 3 | RLC_MODE = 0 | Exist_ALPHA = 0 | GAMMA = 15 | POLLING = 0 | TA_VALID = 0 | Exist_TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | Exist_P0_PR_MODE = 1 | P0 = 0 | BTS_PWR_CTRL_MODE = 0 | PR_MODE = 1 | Exist_AdditionsR99 = 0 | : End ul_dl.Packet_Downlink_ImmAssignment | : End u.UplinkDownlinkAssignment | Exist_AdditionsR10 = 0 | Exist_AdditionsR13 = 0 | : End u.hh | Padding = 0|86|86|-22| -DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.IA_EGPRS_PUA = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 12 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.OnePhaseAccess = 1 | : Access.OnePhaseAccess | TFI_ASSIGNMENT = 7 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 3 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 0 | : End Allocation.DynamicAllocation | EGPRS_CHANNEL_CODING_COMMAND = 2 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_BEP_PERIOD2 = 1 | BEP_PERIOD2 = 5 | RESEGMENT = 1 | EGPRS_WindowSize = 4 | Exist_ALPHA = 0 | GAMMA = 13 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.OnePhaseAccess | : End u.IA_EGPRS_PUA | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|172|172|-22| -DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.IA_EGPRS_PUA = 0 | : u.IA_EGPRS_PUA | ExtendedRA = 8 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 13 | : TBF_STARTING_TIME | N32 = 20 | N51 = 45 | N26 = 0 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.IA_EGPRS_PUA | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|86|86|86|86|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.EGPRS_PktUlAss = 0 | : u.EGPRS_PktUlAss | ExtendedRA = 12 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.OnePhaseAccess = 1 | : Access.OnePhaseAccess | TFI_ASSIGNMENT = 7 | POLLING = 0 | Allocation.DynamicAllocation = 0 | : Allocation.DynamicAllocation | USF = 3 | USF_GRANULARITY = 0 | Exist_P0_PR_MODE = 0 | : End Allocation.DynamicAllocation | EGPRS_CHANNEL_CODING_COMMAND = 2 | TLLI_BLOCK_CHANNEL_CODING = 1 | Exist_BEP_PERIOD2 = 1 | BEP_PERIOD2 = 5 | RESEGMENT = 1 | EGPRS_WindowSize = 4 | Exist_ALPHA = 0 | GAMMA = 13 | Exist_TIMING_ADVANCE_INDEX = 1 | TIMING_ADVANCE_INDEX = 0 | Exist_TBF_STARTING_TIME = 0 | : End Access.OnePhaseAccess | : End u.EGPRS_PktUlAss | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|172|172|-22| +DLCSN1 INFO osmo_csn1_stream_decode (IA Rest Octets): u.lh = 1 | : u.lh | lh0x = 0 | : lh0x | u.EGPRS_PktUlAss = 0 | : u.EGPRS_PktUlAss | ExtendedRA = 8 | AccessTechnologyType = Exist | AccessTechnologyType = 0 | AccessTechnologyType = Exist | AccessTechnologyType = 3 | AccessTechnologyType = 0 | Access.TwoPhaseAccess = 0 | : Access.TwoPhaseAccess | Exist_ALPHA = 0 | GAMMA = 13 | : TBF_STARTING_TIME | N32 = 20 | N51 = 45 | N26 = 0 | : End TBF_STARTING_TIME | NR_OF_RADIO_BLOCKS_ALLOCATED = 1 | Exist_P0_BTS_PWR_CTRL_PR_MODE = 0 | : End Access.TwoPhaseAccess | : End u.EGPRS_PktUlAss | : End lh0x | : AdditionsR13 | Exist_AdditionsR13 = 0 | : End AdditionsR13 | : End u.lh | Padding = 0|86|86|86|86|-22| -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30799 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I884cba359bfda21cf45fa846e5b7ff20d129bdf7 Gerrit-Change-Number: 30799 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: remove unneeded includes
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30802 ) Change subject: rlcmac: remove unneeded includes ...................................................................... rlcmac: remove unneeded includes Change-Id: Ie82fb9e5fe607f925bb8a698a789ef79f168add2 --- M src/rlcmac/ts_24_008.c M src/rlcmac/ts_44_018.c 2 files changed, 0 insertions(+), 6 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlcmac/ts_24_008.c b/src/rlcmac/ts_24_008.c index 6531173..1d64499 100644 --- a/src/rlcmac/ts_24_008.c +++ b/src/rlcmac/ts_24_008.c @@ -20,9 +20,6 @@ * GNU General Public License for more details. */ -#include <assert.h> -#include <arpa/inet.h> - #include <osmocom/core/utils.h> #include <osmocom/core/bitvec.h> #include <osmocom/core/logging.h> diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index 1de16d6..68be92e 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -20,9 +20,6 @@ * GNU General Public License for more details. */ -#include <assert.h> -#include <arpa/inet.h> - #include <osmocom/core/utils.h> #include <osmocom/core/bitvec.h> #include <osmocom/core/logging.h> -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30802 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ie82fb9e5fe607f925bb8a698a789ef79f168add2 Gerrit-Change-Number: 30802 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: use OSMO_ASSERT instead of plain assert()
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30803 ) Change subject: rlcmac: use OSMO_ASSERT instead of plain assert() ...................................................................... rlcmac: use OSMO_ASSERT instead of plain assert() Change-Id: Ia834285cbaba34e2f0783bf83bd2f3934d74d778 --- M src/rlcmac/ts_44_060.c 1 file changed, 2 insertions(+), 3 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/rlcmac/ts_44_060.c b/src/rlcmac/ts_44_060.c index e557ae8..fb2dd08 100644 --- a/src/rlcmac/ts_44_060.c +++ b/src/rlcmac/ts_44_060.c @@ -22,7 +22,6 @@ * GNU General Public License for more details. */ -#include <assert.h> #include <arpa/inet.h> #include <osmocom/core/utils.h> @@ -5189,7 +5188,7 @@ } unsigned dataLen = 23 - readIndex/8; LOGPC(g_log_cat, LOGL_NOTICE, "DATA[%u] = ", dataLen); - assert(dataLen <= 20); + OSMO_ASSERT(dataLen <= 20); for (i = 0; i < dataLen; i++) { data->RLC_DATA[i] = bitvec_read_field(vector, &readIndex, 8); @@ -5253,7 +5252,7 @@ } unsigned dataNumOctets = 23 - writeIndex/8; LOGPC(g_log_cat, LOGL_NOTICE, "DATA[%u] = ", dataNumOctets); - assert(dataNumOctets <= 20); + OSMO_ASSERT(dataNumOctets <= 20); for (i = 0; i < dataNumOctets; i++) { bitvec_write_field(vector, &writeIndex, data->RLC_DATA[i], 8); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30803 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ia834285cbaba34e2f0783bf83bd2f3934d74d778 Gerrit-Change-Number: 30803 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: implement the missing IA_MultiBlock_PktDlAss_t
by fixeria 02 Jan '23

02 Jan '23
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30800 ) Change subject: rlcmac: implement the missing IA_MultiBlock_PktDlAss_t ...................................................................... rlcmac: implement the missing IA_MultiBlock_PktDlAss_t Add missing definition for the <Multiple Blocks Packet Downlink Assignment> structure. It's not 100% complete, but should serve a good starting point if we ever need to support this. Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611 Related: OS#5500 --- M include/osmocom/gprs/rlcmac/gprs_rlcmac.h M src/rlcmac/ts_44_018.c 2 files changed, 23 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h index f322455..b325f3e 100644 --- a/include/osmocom/gprs/rlcmac/gprs_rlcmac.h +++ b/include/osmocom/gprs/rlcmac/gprs_rlcmac.h @@ -677,6 +677,12 @@ typedef struct { + StartingTime_t TBF_STARTING_TIME; + guint8 NOF_BLOCKS; +} IA_MultiBlock_PktDlAss_t; + +typedef struct +{ guint8 Length; guint8 MAIO; guint8 MobileAllocation[62]; @@ -817,7 +823,7 @@ guint8 UnionType; union { IA_EGPRS_PktUlAss_t EGPRS_PktUlAss; - /* TODO: <Multiple Blocks Packet Downlink Assignment> */ + IA_MultiBlock_PktDlAss_t MultiBlock_PktDlAss; } u; } IA_RestOctetsLH0x_t; diff --git a/src/rlcmac/ts_44_018.c b/src/rlcmac/ts_44_018.c index fd30416..1de16d6 100644 --- a/src/rlcmac/ts_44_018.c +++ b/src/rlcmac/ts_44_018.c @@ -227,6 +227,21 @@ M_TYPE (IA_EGPRS_PktUlAss_t, Access.OnePhaseAccess, EGPRS_OnePhaseAccess_t), CSN_DESCR_END (IA_EGPRS_PktUlAss_t) +/* < Multiple Blocks Packet Downlink Assignment > */ +static const +CSN_DESCR_BEGIN(IA_MultiBlock_PktDlAss_t) + M_TYPE (IA_MultiBlock_PktDlAss_t, TBF_STARTING_TIME, StartingTime_t), + M_UINT (IA_MultiBlock_PktDlAss_t, NOF_BLOCKS, 4), + +#if 1 /* TODO: 0 -- Reserved for future use */ + M_FIXED (IA_MultiBlock_PktDlAss_t, 1, 0x00), +#else /* | 1 ... */ + M_UNION (IA_MultiBlock_PktDlAss_t, 2), + M_TYPE (IA_MultiBlock_PktDlAss_t, u.Distribution, ), + M_TYPE (IA_MultiBlock_PktDlAss_t, u.NonDistribution), +#endif +CSN_DESCR_END (IA_MultiBlock_PktDlAss_t) + static const CSN_DESCR_BEGIN(IA_FreqParamsBeforeTime_t) M_UINT (IA_FreqParamsBeforeTime_t, Length, 6), @@ -358,7 +373,7 @@ CSN_DESCR_BEGIN (IA_RestOctetsLH0x_t) M_UNION (IA_RestOctetsLH0x_t, 2), M_TYPE (IA_RestOctetsLH0x_t, u.EGPRS_PktUlAss, IA_EGPRS_PktUlAss_t), - CSN_ERROR (IA_RestOctetsLH0x_t, "01 <Multiple Blocks Packet Downlink Assignment>", CSN_ERROR_STREAM_NOT_SUPPORTED), + M_TYPE (IA_RestOctetsLH0x_t, u.MultiBlock_PktDlAss, IA_MultiBlock_PktDlAss_t), CSN_DESCR_END (IA_RestOctetsLH0x_t) static const -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611 Gerrit-Change-Number: 30800 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: add decoder and test vectors for IA Rest Octets
by fixeria 02 Jan '23

02 Jan '23
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30797 ) Change subject: rlcmac: add decoder and test vectors for IA Rest Octets ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30797 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I39a29dc9b5b22ce4374ae33336696014e326d012 Gerrit-Change-Number: 30797 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 02 Jan 2023 12:56:05 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: rlcmac: implement the missing IA_MultiBlock_PktDlAss_t
by fixeria 02 Jan '23

02 Jan '23
Attention is currently required from: pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/30800 ) Change subject: rlcmac: implement the missing IA_MultiBlock_PktDlAss_t ...................................................................... Patch Set 1: Code-Review+2 (1 comment) File include/osmocom/gprs/rlcmac/gprs_rlcmac.h: https://gerrit.osmocom.org/c/libosmo-gprs/+/30800/comment/7319835f_61429aaa PS1, Line 682: } IA_MultiBlock_PktDlAss_t; > Add a TODO here explaining what's missing, referencing the TS spec, etc. I am adding the new definition to ts_44_018.c (name of this file is the spec. reference itself). If you check this file, you'll find a TODO comment in the actual definition. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/30800 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I544245f690fdd14a94f858a5f3cd8f8d39d17611 Gerrit-Change-Number: 30800 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> 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, 02 Jan 2023 12:54:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.