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

Keyboard Shortcuts

Thread View

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

gerrit-log

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

September 2022

  • 2 participants
  • 1860 discussions
Change in osmo-tetra[master]: Reformatting to prevent linter warnings
by wbokslag 18 Sep '22

18 Sep '22
wbokslag has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29407 ) Change subject: Reformatting to prevent linter warnings ...................................................................... Reformatting to prevent linter warnings Change-Id: I0dc35e7d536900b4beed19042183838857b7dac7 --- M src/crc_test.c M src/testpdu.c M src/tetra_cmce_pdu.c M src/tetra_common.c M src/tetra_common.h M src/tetra_mac_pdu.c M src/tetra_mm_pdu.c M src/tetra_mm_pdu.h 8 files changed, 77 insertions(+), 78 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/07/29407/1 diff --git a/src/crc_test.c b/src/crc_test.c index d46d0cc..34fda40 100644 --- a/src/crc_test.c +++ b/src/crc_test.c @@ -59,7 +59,7 @@ crc = ~crc16_itut_bits(0xffff, input2, 60); printf("The CRC is now: %d/0x%x\n", crc, crc); - + /* swap the bytes */ crc = (crc << 8) | (crc >> 8); osmo_pbit2ubit(&input2[60], (uint8_t *)&crc, 16); diff --git a/src/testpdu.c b/src/testpdu.c index 24fd609..329bf9f 100644 --- a/src/testpdu.c +++ b/src/testpdu.c @@ -54,7 +54,7 @@ bitvec_set_uint(&bv, 262, 10); /* MCC */ bitvec_set_uint(&bv, 42, 14); /* MNC */ bitvec_set_uint(&bv, 0, 2); /* Neighbor cell boradcast: not supported */ - bitvec_set_uint(&bv, 0, 2); /* Cell service level: unknown */ + bitvec_set_uint(&bv, 0, 2); /* Cell service level: unknown */ bitvec_set_bit(&bv, 0); /* Late entry information */ printf("SYNC PDU: %s\n", osmo_hexdump(pdu_sync, sizeof(pdu_sync))); diff --git a/src/tetra_cmce_pdu.c b/src/tetra_cmce_pdu.c index b7cf618..5058c71 100644 --- a/src/tetra_cmce_pdu.c +++ b/src/tetra_cmce_pdu.c @@ -24,23 +24,23 @@ #include "tetra_cmce_pdu.h" static const struct value_string cmce_pdut_d_names[] = { - { TCMCE_PDU_T_D_ALERT, "D-ALERT" }, - { TCMCE_PDU_T_D_CALL_PROCEEDING,"D-CALL PROCEEDING" }, - { TCMCE_PDU_T_D_CONNECT, "D-CONNECT" }, - { TCMCE_PDU_T_D_CONNECT_ACK, "D-CONNECT ACK" }, - { TCMCE_PDU_T_D_DISCONNECT, "D-DISCONNECT" }, - { TCMCE_PDU_T_D_INFO, "D-INFO" }, - { TCMCE_PDU_T_D_RELEASE, "D-RELEASE" }, - { TCMCE_PDU_T_D_SETUP, "D-SETUP" }, - { TCMCE_PDU_T_D_STATUS, "D-STATUS" }, - { TCMCE_PDU_T_D_TX_CEASED, "D-TX CEASED" }, - { TCMCE_PDU_T_D_TX_CONTINUE, "D-TX CONTINUE" }, - { TCMCE_PDU_T_D_TX_GRANTED, "D-TX GRANTED" }, - { TCMCE_PDU_T_D_TX_WAIT, "D-TX WAIT" }, - { TCMCE_PDU_T_D_TX_INTERRUPT, "D-TX INTERRUPT" }, - { TCMCE_PDU_T_D_CALL_RESTORE, "D-TX CALL RESTORE" }, - { TCMCE_PDU_T_D_SDS_DATA, "D-SDS DATA" }, - { TCMCE_PDU_T_D_FACILITY, "D-FACILITY" }, + { TCMCE_PDU_T_D_ALERT, "D-ALERT" }, + { TCMCE_PDU_T_D_CALL_PROCEEDING, "D-CALL PROCEEDING" }, + { TCMCE_PDU_T_D_CONNECT, "D-CONNECT" }, + { TCMCE_PDU_T_D_CONNECT_ACK, "D-CONNECT ACK" }, + { TCMCE_PDU_T_D_DISCONNECT, "D-DISCONNECT" }, + { TCMCE_PDU_T_D_INFO, "D-INFO" }, + { TCMCE_PDU_T_D_RELEASE, "D-RELEASE" }, + { TCMCE_PDU_T_D_SETUP, "D-SETUP" }, + { TCMCE_PDU_T_D_STATUS, "D-STATUS" }, + { TCMCE_PDU_T_D_TX_CEASED, "D-TX CEASED" }, + { TCMCE_PDU_T_D_TX_CONTINUE, "D-TX CONTINUE" }, + { TCMCE_PDU_T_D_TX_GRANTED, "D-TX GRANTED" }, + { TCMCE_PDU_T_D_TX_WAIT, "D-TX WAIT" }, + { TCMCE_PDU_T_D_TX_INTERRUPT, "D-TX INTERRUPT" }, + { TCMCE_PDU_T_D_CALL_RESTORE, "D-TX CALL RESTORE" }, + { TCMCE_PDU_T_D_SDS_DATA, "D-SDS DATA" }, + { TCMCE_PDU_T_D_FACILITY, "D-FACILITY" }, { 0, NULL } }; diff --git a/src/tetra_common.c b/src/tetra_common.c index 92b8a1e..453d44f 100644 --- a/src/tetra_common.c +++ b/src/tetra_common.c @@ -47,7 +47,7 @@ [0] = 0, [1] = 6250, [2] = -6250, - [3] = +12500, + [3] = 12500, }; uint32_t tetra_dl_carrier_hz(uint8_t band, uint16_t carrier, uint8_t offset) @@ -78,14 +78,14 @@ uint32_t duplex_spacing = tetra_duplex_spacing[duplex & 7][band & 15]; if (duplex_spacing < 0) /* reserved for future standardization */ - return 0; + return 0; duplex_spacing *= 1000; // make Hz if (reverse) - freq += duplex_spacing; + freq += duplex_spacing; else - freq -= duplex_spacing; + freq -= duplex_spacing; return freq; } diff --git a/src/tetra_common.h b/src/tetra_common.h index d141e9b..dc538d0 100644 --- a/src/tetra_common.h +++ b/src/tetra_common.h @@ -8,7 +8,7 @@ #ifdef DEBUG #define DEBUGP(x, args...) printf(x, ## args) #else -#define DEBUGP(x, args...) do { } while(0) +#define DEBUGP(x, args...) do { } while (0) #endif #define TETRA_SYM_PER_TS 255 diff --git a/src/tetra_mac_pdu.c b/src/tetra_mac_pdu.c index c71e458..288d5ce 100644 --- a/src/tetra_mac_pdu.c +++ b/src/tetra_mac_pdu.c @@ -61,20 +61,19 @@ sid->cck_id = bits_to_uint(cur, 16); else sid->hyperframe_number = bits_to_uint(cur, 16); - sid->option_field = bits_to_uint(cur, 2); cur += 2; - switch(sid->option_field) - { - case TETRA_MAC_OPT_FIELD_EVEN_MULTIFRAME: // Even multiframe definition for TS mode - case TETRA_MAC_OPT_FIELD_ODD_MULTIFRAME: // Odd multiframe definition for TS mode - sid->frame_bitmap = bits_to_uint(cur, 20); cur += 20; - break; - case TETRA_MAC_OPT_FIELD_ACCESS_CODE: // Default definition for access code A - sid->access_code = bits_to_uint(cur, 20); cur += 20; - break; - case TETRA_MAC_OPT_FIELD_EXT_SERVICES: // Extended services broadcast - sid->ext_service = bits_to_uint(cur, 20); cur += 20; - break; + + switch (sid->option_field) { + case TETRA_MAC_OPT_FIELD_EVEN_MULTIFRAME: // Even multiframe definition for TS mode + case TETRA_MAC_OPT_FIELD_ODD_MULTIFRAME: // Odd multiframe definition for TS mode + sid->frame_bitmap = bits_to_uint(cur, 20); cur += 20; + break; + case TETRA_MAC_OPT_FIELD_ACCESS_CODE: // Default definition for access code A + sid->access_code = bits_to_uint(cur, 20); cur += 20; + break; + case TETRA_MAC_OPT_FIELD_EXT_SERVICES: // Extended services broadcast + sid->ext_service = bits_to_uint(cur, 20); cur += 20; + break; } decode_d_mle_sysinfo(&sid->mle_si, si_bits + 124-42); // could be also cur due to previous fixes @@ -95,12 +94,12 @@ { const uint8_t *cur = bits; - cad->type = bits_to_uint(cur, 2); cur += 2; - cad->timeslot = bits_to_uint(cur, 4); cur += 4; - cad->ul_dl = bits_to_uint(cur, 2); cur += 2; - cad->clch_perm = *cur++; - cad->cell_chg_f = *cur++; - cad->carrier_nr = bits_to_uint(cur, 12); cur += 12; + cad->type = bits_to_uint(cur, 2); cur += 2; + cad->timeslot = bits_to_uint(cur, 4); cur += 4; + cad->ul_dl = bits_to_uint(cur, 2); cur += 2; + cad->clch_perm = *cur++; + cad->cell_chg_f = *cur++; + cad->carrier_nr = bits_to_uint(cur, 12); cur += 12; cad->ext_carr_pres = *cur++; if (cad->ext_carr_pres) { @@ -115,15 +114,15 @@ cur += 2; } if (cad->ul_dl == 0) { - cad->aug.ul_dl_ass = bits_to_uint(cur, 2); cur += 2; - cad->aug.bandwidth = bits_to_uint(cur, 3); cur += 3; - cad->aug.modulation = bits_to_uint(cur, 3); cur += 3; - cad->aug.max_ul_qam = bits_to_uint(cur, 3); cur += 3; + cad->aug.ul_dl_ass = bits_to_uint(cur, 2); cur += 2; + cad->aug.bandwidth = bits_to_uint(cur, 3); cur += 3; + cad->aug.modulation = bits_to_uint(cur, 3); cur += 3; + cad->aug.max_ul_qam = bits_to_uint(cur, 3); cur += 3; cur += 3; /* reserved */ - cad->aug.conf_chan_stat=bits_to_uint(cur, 3); cur += 3; - cad->aug.bs_imbalance = bits_to_uint(cur, 4); cur += 4; - cad->aug.bs_tx_rel = bits_to_uint(cur, 5); cur += 5; - cad->aug.napping_sts = bits_to_uint(cur, 2); cur += 2; + cad->aug.conf_chan_stat = bits_to_uint(cur, 3); cur += 3; + cad->aug.bs_imbalance = bits_to_uint(cur, 4); cur += 4; + cad->aug.bs_tx_rel = bits_to_uint(cur, 5); cur += 5; + cad->aug.napping_sts = bits_to_uint(cur, 2); cur += 2; if (cad->aug.napping_sts == 1) cur += 11; /* napping info 21.5.2c */ cur += 4; /* reserved */ @@ -385,14 +384,14 @@ } static const struct value_string addr_type_names[] = { - { ADDR_TYPE_NULL, "Null PDU" }, - { ADDR_TYPE_SSI, "SSI" }, - { ADDR_TYPE_EVENT_LABEL,"Event Label" }, - { ADDR_TYPE_USSI, "USSI (migrading MS un-exchanged)" }, - { ADDR_TYPE_SMI, "SMI (management)" }, - { ADDR_TYPE_SSI_EVENT, "SSI + Event Label" }, - { ADDR_TYPE_SSI_USAGE, "SSI + Usage Marker" }, - { ADDR_TYPE_SMI_EVENT, "SMI + Event Label" }, + { ADDR_TYPE_NULL, "Null PDU" }, + { ADDR_TYPE_SSI, "SSI" }, + { ADDR_TYPE_EVENT_LABEL, "Event Label" }, + { ADDR_TYPE_USSI, "USSI (migrading MS un-exchanged)" }, + { ADDR_TYPE_SMI, "SMI (management)" }, + { ADDR_TYPE_SSI_EVENT, "SSI + Event Label" }, + { ADDR_TYPE_SSI_USAGE, "SSI + Usage Marker" }, + { ADDR_TYPE_SMI_EVENT, "SMI + Event Label" }, { 0, NULL } }; const char *tetra_get_addr_t_name(uint8_t addrt) diff --git a/src/tetra_mm_pdu.c b/src/tetra_mm_pdu.c index 9b004f2..2dcf913 100644 --- a/src/tetra_mm_pdu.c +++ b/src/tetra_mm_pdu.c @@ -24,18 +24,18 @@ #include "tetra_mm_pdu.h" static const struct value_string mm_pdut_d_names[] = { - { TMM_PDU_T_D_OTAR, "D-OTAR" }, - { TMM_PDU_T_D_AUTH, "D-AUTHENTICATION" }, - { TMM_PDU_T_D_CK_CHG_DEM, "D-CK CHANGE DEMAND" }, - { TMM_PDU_T_D_DISABLE, "D-DISABLE" }, - { TMM_PDU_T_D_ENABLE, "D-ENABLE" }, - { TMM_PDU_T_D_LOC_UPD_ACC, "D-LOCATION UPDATE ACCEPT" }, - { TMM_PDU_T_D_LOC_UPD_CMD, "D-LOCATION UPDATE COMMAND" }, - { TMM_PDU_T_D_LOC_UPD_REJ, "D-LOCATION UPDATE REJECT" }, - { TMM_PDU_T_D_LOC_UPD_PROC, "D-LOCATION UPDATE PROCEEDING" }, - { TMM_PDU_T_D_ATT_DET_GRP, "D-ATTACH/DETACH GROUP ID" }, + { TMM_PDU_T_D_OTAR, "D-OTAR" }, + { TMM_PDU_T_D_AUTH, "D-AUTHENTICATION" }, + { TMM_PDU_T_D_CK_CHG_DEM, "D-CK CHANGE DEMAND" }, + { TMM_PDU_T_D_DISABLE, "D-DISABLE" }, + { TMM_PDU_T_D_ENABLE, "D-ENABLE" }, + { TMM_PDU_T_D_LOC_UPD_ACC, "D-LOCATION UPDATE ACCEPT" }, + { TMM_PDU_T_D_LOC_UPD_CMD, "D-LOCATION UPDATE COMMAND" }, + { TMM_PDU_T_D_LOC_UPD_REJ, "D-LOCATION UPDATE REJECT" }, + { TMM_PDU_T_D_LOC_UPD_PROC, "D-LOCATION UPDATE PROCEEDING" }, + { TMM_PDU_T_D_ATT_DET_GRP, "D-ATTACH/DETACH GROUP ID" }, { TMM_PDU_T_D_ATT_DET_GRP_ACK, "D-ATTACH/DETACH GROUP ID ACK" }, - { TMM_PDU_T_D_MM_STATUS, "D-MM STATUS" }, + { TMM_PDU_T_D_MM_STATUS, "D-MM STATUS" }, { TMM_PDU_T_D_MM_PDU_NOTSUPP, "MM PDU/FUNCTION NOT SUPPORTED" }, { 0, NULL } }; diff --git a/src/tetra_mm_pdu.h b/src/tetra_mm_pdu.h index 22c0eae..68f8e09 100644 --- a/src/tetra_mm_pdu.h +++ b/src/tetra_mm_pdu.h @@ -3,14 +3,14 @@ /* 16.10.39 PDU Type */ enum tetra_mm_pdu_type_d { - TMM_PDU_T_D_OTAR = 0x0, - TMM_PDU_T_D_AUTH = 0x1, - TMM_PDU_T_D_CK_CHG_DEM = 0x2, - TMM_PDU_T_D_DISABLE = 0x3, - TMM_PDU_T_D_ENABLE = 0x4, - TMM_PDU_T_D_LOC_UPD_ACC = 0x5, - TMM_PDU_T_D_LOC_UPD_CMD = 0x6, - TMM_PDU_T_D_LOC_UPD_REJ = 0x7, + TMM_PDU_T_D_OTAR = 0x0, + TMM_PDU_T_D_AUTH = 0x1, + TMM_PDU_T_D_CK_CHG_DEM = 0x2, + TMM_PDU_T_D_DISABLE = 0x3, + TMM_PDU_T_D_ENABLE = 0x4, + TMM_PDU_T_D_LOC_UPD_ACC = 0x5, + TMM_PDU_T_D_LOC_UPD_CMD = 0x6, + TMM_PDU_T_D_LOC_UPD_REJ = 0x7, /* RES */ TMM_PDU_T_D_LOC_UPD_PROC = 0x9, TMM_PDU_T_D_ATT_DET_GRP = 0xa, -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29407 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I0dc35e7d536900b4beed19042183838857b7dac7 Gerrit-Change-Number: 29407 Gerrit-PatchSet: 1 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-tetra[master]: added support for fill bits and basic link defragmentation (also than...
by wbokslag 18 Sep '22

18 Sep '22
Attention is currently required from: fixeria. wbokslag has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29387 ) Change subject: added support for fill bits and basic link defragmentation (also thanks to SQ5BPF) ...................................................................... Patch Set 2: (7 comments) Patchset: PS2: Thanks for your attention, I resolved the issues. File src/tetra_llc_pdu.h: https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/55e91c83_fd285847 PS1, Line 80: > unrelated ws changed tl_sdu_len needs to be changed from a uint8_t to uint32_t because, due to defragmentation, pdus may become longer than 255 bits. As such, I feel like it is related to this change, however, I now mention the change in the commit message. File src/tetra_mac_pdu.h: https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/bd224154_54691990 PS1, Line 160: > unrelated ws change Hmm missed this one in my second patch set. I was trying to keep the linter from complaining. In the future, I'll push a commit fixing linting issues in files I touch before committing my actual modifications, is that ok? File src/tetra_mac_pdu.c: https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/2910a82b_bcfbb131 PS1, Line 64: > In this particular place, it's a good change. But it should be done in a separate patch. Removed these changes from the patch https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/c0ffeaa7_7c6328fa PS1, Line 97: cad->type = bits_to_uint(cur, 2); cur += 2; > Please keep the original formatting in this patch. […] Removed these changes from the patch https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/e10a0629_3c39e6e0 PS1, Line 387: > why are you changing this? […] Removed these changes from the patch File src/tetra_upper_mac.c: https://gerrit.osmocom.org/c/osmo-tetra/+/29387/comment/7aa4150d_d951feef PS1, Line 51: msgb_reset > I don't think calling msgb_reset() is needed right after calling msgb_alloc(). […] You're right, removed the msgb_reset() call. -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29387 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I41c9438b0b12c2fac9dff1b226eec5b33f30fbb4 Gerrit-Change-Number: 29387 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 18 Sep 2022 13:57:12 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-tetra[master]: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC f...
by fixeria 18 Sep '22

18 Sep '22
Attention is currently required from: wbokslag. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29386 ) Change subject: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC frame ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29386 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: Ib0967fdeef3bf37c612124626a74d240aa571a66 Gerrit-Change-Number: 29386 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Comment-Date: Sun, 18 Sep 2022 13:49:59 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-tetra[master]: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC f...
by wbokslag 18 Sep '22

18 Sep '22
Attention is currently required from: fixeria. wbokslag has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29386 ) Change subject: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC frame ...................................................................... Patch Set 2: (1 comment) Commit Message: https://gerrit.osmocom.org/c/osmo-tetra/+/29386/comment/72a048ee_2839319e PS1, Line 7: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC frame > Thanks for explaining. Please add this to the commit message. Done -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29386 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: Ib0967fdeef3bf37c612124626a74d240aa571a66 Gerrit-Change-Number: 29386 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 18 Sep 2022 13:46:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: wbokslag <w.bokslag(a)midnightblue.nl> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: Debian: bump compatibility level
by fixeria 18 Sep '22

18 Sep '22
Attention is currently required from: laforge, msuraev. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29381 ) Change subject: Debian: bump compatibility level ...................................................................... Patch Set 5: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29381 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Id1557cd07b5d28dbb6018cbf972ce41008b65867 Gerrit-Change-Number: 29381 Gerrit-PatchSet: 5 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 18 Sep 2022 13:44:53 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-tetra[master]: added support for advanced link defragmentation
by wbokslag 18 Sep '22

18 Sep '22
wbokslag has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29405 ) Change subject: added support for advanced link defragmentation ...................................................................... added support for advanced link defragmentation the rx_tm_sdu and rx_tl_sdu did not belong in tetra_upper_mac and are removed. Instead, we use rx_tm_sdu in tetra_llc.c, who in turn invokes rx_tl_sdu in tetra_mle.c. The llc can now also make use of the advanced link defragmentation code that was already there but unused. Change-Id: I294c684e97c55876f1a207a7152a83dad4ebaa26 --- M src/Makefile M src/tetra_llc.c A src/tetra_llc.h A src/tetra_mle.c A src/tetra_mle.h M src/tetra_upper_mac.c 6 files changed, 110 insertions(+), 88 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/05/29405/1 diff --git a/src/Makefile b/src/Makefile index b21f846..41250a9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,7 @@ libosmo-tetra-phy.a: phy/tetra_burst_sync.o phy/tetra_burst.o $(AR) r $@ $^ -libosmo-tetra-mac.a: lower_mac/tetra_conv_enc.o lower_mac/tch_reordering.o tetra_tdma.o lower_mac/tetra_scramb.o lower_mac/tetra_rm3014.o lower_mac/tetra_interleave.o lower_mac/crc_simple.o tetra_common.o lower_mac/viterbi.o lower_mac/viterbi_cch.o lower_mac/viterbi_tch.o lower_mac/tetra_lower_mac.o tetra_upper_mac.o tetra_mac_pdu.o tetra_llc_pdu.o tetra_llc.o tetra_mle_pdu.o tetra_mm_pdu.o tetra_cmce_pdu.o tetra_sndcp_pdu.o tetra_gsmtap.o tuntap.o +libosmo-tetra-mac.a: lower_mac/tetra_conv_enc.o lower_mac/tch_reordering.o tetra_tdma.o lower_mac/tetra_scramb.o lower_mac/tetra_rm3014.o lower_mac/tetra_interleave.o lower_mac/crc_simple.o tetra_common.o lower_mac/viterbi.o lower_mac/viterbi_cch.o lower_mac/viterbi_tch.o lower_mac/tetra_lower_mac.o tetra_upper_mac.o tetra_mac_pdu.o tetra_llc_pdu.o tetra_llc.o tetra_mle_pdu.o tetra_mle.o tetra_mm_pdu.o tetra_cmce_pdu.o tetra_sndcp_pdu.o tetra_gsmtap.o tuntap.o $(AR) r $@ $^ float_to_bits: float_to_bits.o diff --git a/src/tetra_llc.c b/src/tetra_llc.c index e0d5cab..b8a378d 100644 --- a/src/tetra_llc.c +++ b/src/tetra_llc.c @@ -28,6 +28,7 @@ #include <osmocom/core/bits.h> #include "tetra_llc_pdu.h" +#include "tetra_mle.h" #include "tuntap.h" static int tun_fd = -1; @@ -36,8 +37,6 @@ .rx.defrag_list = LLIST_HEAD_INIT(g_llcs.rx.defrag_list), }; -int rx_tl_sdu(struct msgb *msg, unsigned int len); - static struct tllc_defrag_q_e * get_dqe_for_ns(struct tllc_state *llcs, uint8_t ns, int alloc_if_missing) { @@ -79,8 +78,7 @@ return 0; } -static int tllc_defrag_out(struct tllc_state *llcs, - struct tetra_llc_pdu *lpp) +static int tllc_defrag_out(struct tetra_mac_state *tms, struct tllc_state *llcs, struct tetra_llc_pdu *lpp) { struct tllc_defrag_q_e *dqe; struct msgb *msg; @@ -90,7 +88,7 @@ printf("<<REMOVE>> "); msg->l3h = msg->data; - rx_tl_sdu(msg, msgb_l3len(msg)); + rx_tl_sdu(tms, msg, msgb_l3len(msg)); if (tun_fd < 0) { tun_fd = tun_alloc("tun0"); @@ -110,16 +108,34 @@ /* Receive TM-SDU (MAC SDU == LLC PDU) */ /* this resembles TMA-UNITDATA.ind (TM-SDU / length) */ -int rx_tm_sdu(struct msgb *msg, unsigned int len) +int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) { - struct tetra_llc_pdu lpp; + if (!len) { + return -1; + } else if (len < 4) { + printf("WARNING rx_tm_sdu: l2len too small: %d\n", len); + return -1; + } + struct tetra_llc_pdu lpp; memset(&lpp, 0, sizeof(lpp)); tetra_llc_pdu_parse(&lpp, msg->l2h, len); msg->l3h = lpp.tl_sdu; + msg->tail = msg->l3h + lpp.tl_sdu_len; // Strips off FCS (if present) - printf("TM-SDU(%s,%u,%u): ", - tetra_get_llc_pdut_dec_name(lpp.pdu_type), lpp.ns, lpp.ss); + printf("TM-SDU(%s)", tetra_get_llc_pdut_dec_name(lpp.pdu_type)); + if (lpp.have_fcs) { + printf(" fcs=%s ", (lpp.have_fcs && lpp.fcs_invalid ? "BAD" : "OK")); + } + printf(" l3len=%d", msgb_l3len(msg)); + if (msgb_l3len(msg)) { + printf(" %s", osmo_ubit_dump(msg->l3h, msgb_l3len(msg))); + } + printf("\n"); + + if (!lpp.tl_sdu_len) { + return len; + } switch (lpp.pdu_type) { case TLLC_PDUT_DEC_BL_ADATA: @@ -132,7 +148,7 @@ case TLLC_PDUT_DEC_AL_RECONNECT: case TLLC_PDUT_DEC_AL_DISC: /* directly hand it to MLE */ - rx_tl_sdu(msg, lpp.tl_sdu_len); + rx_tl_sdu(tms, msg, lpp.tl_sdu_len); break; case TLLC_PDUT_DEC_AL_DATA: case TLLC_PDUT_DEC_AL_UDATA: @@ -148,7 +164,7 @@ /* input into LLC defragmenter */ tllc_defrag_in(&g_llcs, &lpp, msg, len); /* check if the fragment is complete and hand it off*/ - tllc_defrag_out(&g_llcs, &lpp); + tllc_defrag_out(tms, &g_llcs, &lpp); break; case TLLC_PDUT_DEC_UNKNOWN: @@ -158,9 +174,5 @@ break; } - if (lpp.tl_sdu && lpp.ss == 0) { - /* this resembles TMA-UNITDATA.ind */ - //rx_tl_sdu(msg, lpp.tl_sdu_len); - } return len; } diff --git a/src/tetra_llc.h b/src/tetra_llc.h new file mode 100644 index 0000000..134fdb5 --- /dev/null +++ b/src/tetra_llc.h @@ -0,0 +1,8 @@ +#ifndef TETRA_LLC_H +#define TETRA_LLC_H + +#include "tetra_common.h" + +int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); + +#endif diff --git a/src/tetra_mle.c b/src/tetra_mle.c new file mode 100644 index 0000000..a957bc9 --- /dev/null +++ b/src/tetra_mle.c @@ -0,0 +1,53 @@ +#include <stdint.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> + +#include <osmocom/core/msgb.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/bits.h> + +#include "tetra_mle_pdu.h" +#include "tetra_mle.h" +#include "tetra_mm_pdu.h" +#include "tetra_cmce_pdu.h" +#include "tetra_sndcp_pdu.h" +#include "tetra_mle_pdu.h" + + + +/* Receive TL-SDU (LLC SDU == MLE PDU) */ +int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) +{ + uint8_t *bits = msg->l3h; + uint8_t mle_pdisc = bits_to_uint(bits, 3); + + printf("TL-SDU(%s): %s ", tetra_get_mle_pdisc_name(mle_pdisc), + osmo_ubit_dump(bits, len)); + switch (mle_pdisc) { + case TMLE_PDISC_MM: + printf("%s\n", tetra_get_mm_pdut_name(bits_to_uint(bits+3, 4), 0)); + break; + case TMLE_PDISC_CMCE: + printf("%s\n", tetra_get_cmce_pdut_name(bits_to_uint(bits+3, 5), 0)); + break; + case TMLE_PDISC_SNDCP: + printf("%s ", tetra_get_sndcp_pdut_name(bits_to_uint(bits+3, 4), 0)); + printf(" NSAPI=%u PCOMP=%u, DCOMP=%u", + bits_to_uint(bits+3+4, 4), + bits_to_uint(bits+3+4+4, 4), + bits_to_uint(bits+3+4+4+4, 4)); + printf(" V%u, IHL=%u", + bits_to_uint(bits+3+4+4+4+4, 4), + 4*bits_to_uint(bits+3+4+4+4+4+4, 4)); + printf(" Proto=%u\n", + bits_to_uint(bits+3+4+4+4+4+4+4+64, 8)); + break; + case TMLE_PDISC_MLE: + printf("%s\n", tetra_get_mle_pdut_name(bits_to_uint(bits+3, 3), 0)); + break; + default: + break; + } + return len; +} diff --git a/src/tetra_mle.h b/src/tetra_mle.h new file mode 100644 index 0000000..1488eb4 --- /dev/null +++ b/src/tetra_mle.h @@ -0,0 +1,8 @@ +#ifndef TETRA_MLE_H +#define TETRA_MLE_H + +#include "tetra_common.h" + +int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); + +#endif diff --git a/src/tetra_upper_mac.c b/src/tetra_upper_mac.c index 775913c..52c4540 100644 --- a/src/tetra_upper_mac.c +++ b/src/tetra_upper_mac.c @@ -32,14 +32,9 @@ #include "tetra_upper_mac.h" #include "tetra_mac_pdu.h" #include "tetra_llc_pdu.h" -#include "tetra_mm_pdu.h" -#include "tetra_cmce_pdu.h" -#include "tetra_sndcp_pdu.h" -#include "tetra_mle_pdu.h" +#include "tetra_llc.h" #include "tetra_gsmtap.h" -static int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); - struct fragslot fragslots[FRAGSLOT_NR_SLOTS]; /* slots are 1-4 but sometimes slot==0 */ @@ -120,64 +115,6 @@ return buf; } -/* Receive TL-SDU (LLC SDU == MLE PDU) */ -static int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) -{ - uint8_t *bits = msg->l3h; - uint8_t mle_pdisc = bits_to_uint(bits, 3); - - printf("TL-SDU(%s): %s", tetra_get_mle_pdisc_name(mle_pdisc), - osmo_ubit_dump(bits, len)); - switch (mle_pdisc) { - case TMLE_PDISC_MM: - printf(" %s", tetra_get_mm_pdut_name(bits_to_uint(bits+3, 4), 0)); - break; - case TMLE_PDISC_CMCE: - printf(" %s", tetra_get_cmce_pdut_name(bits_to_uint(bits+3, 5), 0)); - break; - case TMLE_PDISC_SNDCP: - printf(" %s", tetra_get_sndcp_pdut_name(bits_to_uint(bits+3, 4), 0)); - printf(" NSAPI=%u PCOMP=%u, DCOMP=%u", - bits_to_uint(bits+3+4, 4), - bits_to_uint(bits+3+4+4, 4), - bits_to_uint(bits+3+4+4+4, 4)); - printf(" V%u, IHL=%u", - bits_to_uint(bits+3+4+4+4+4, 4), - 4*bits_to_uint(bits+3+4+4+4+4+4, 4)); - printf(" Proto=%u", - bits_to_uint(bits+3+4+4+4+4+4+4+64, 8)); - break; - case TMLE_PDISC_MLE: - printf(" %s", tetra_get_mle_pdut_name(bits_to_uint(bits+3, 3), 0)); - break; - default: - break; - } - return len; -} - -static int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) -{ - struct tetra_llc_pdu lpp; - uint8_t *bits = msg->l2h; - - memset(&lpp, 0, sizeof(lpp)); - tetra_llc_pdu_parse(&lpp, bits, len); - - printf("TM-SDU(%s,%u,%u)", - tetra_get_llc_pdut_dec_name(lpp.pdu_type), lpp.ns, lpp.ss); - if (lpp.have_fcs) { - printf("(FCS: %s)", lpp.fcs_invalid ? "BAD" : "OK"); - } - printf(": "); - - if (lpp.tl_sdu && lpp.ss == 0) { - msg->l3h = lpp.tl_sdu; - rx_tl_sdu(tms, msg, lpp.tl_sdu_len); - } - return len; -} - static int rx_resrc(struct tetra_tmvsap_prim *tmvp, struct tetra_mac_state *tms) { struct msgb *msg = tmvp->oph.msg; @@ -207,22 +144,26 @@ /* We now have accurate length and start of TM-SDU, set LLC start in msg->l2h */ msg->l2h = msg->l1h + tmpdu_offset; - printf("RESOURCE Encr=%u, len=%d l1_len=%d l2_len %d Addr=%s ", + printf("RESOURCE Encr=%u len_field=%d l1_len=%d l2_len %d Addr=%s", rsd.encryption_mode, rsd.macpdu_length, msgb_l1len(msg), msgb_l2len(msg), tetra_addr_dump(&rsd.addr)); + if (rsd.chan_alloc_pres) + printf(" ChanAlloc=%s", tetra_alloc_dump(&rsd.cad, tms)); + + if (rsd.slot_granting.pres) + printf(" SlotGrant=%u/%u", rsd.slot_granting.nr_slots, + rsd.slot_granting.delay); + if (rsd.addr.type == ADDR_TYPE_NULL) { pdu_bits = -1; /* No more PDUs in slot */ goto out; } + if (msgb_l2len(msg) == 0) { + goto out; /* No l2 data */ + } - if (rsd.chan_alloc_pres) - printf("ChanAlloc=%s ", tetra_alloc_dump(&rsd.cad, tms)); - - if (rsd.slot_granting.pres) - printf("SlotGrant=%u/%u ", rsd.slot_granting.nr_slots, - rsd.slot_granting.delay); - + printf(": %s\n", osmo_ubit_dump(msg->l2h, msgb_l2len(msg))); if (rsd.macpdu_length != MACPDU_LEN_START_FRAG || !REASSEMBLE_FRAGMENTS) { /* Non-fragmented resource (or no reassembly desired) */ if (!rsd.is_encrypted) { -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29405 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I294c684e97c55876f1a207a7152a83dad4ebaa26 Gerrit-Change-Number: 29405 Gerrit-PatchSet: 1 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-tetra[master]: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC f...
by wbokslag 18 Sep '22

18 Sep '22
Attention is currently required from: wbokslag. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-tetra/+/29386 to look at the new patch set (#2). Change subject: Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC frame ...................................................................... Keep timeslot number in range 1-4 instead of 0-3 in parsing of SYNC frame According to the tetra_tdma_time struct definition, the tn should be in range 1-4. Also, tetra_burst_sync_in increments the timeslot number when in a synchronized state. The timeslot is then normalized with normalize_tn which also expects the tn to be within the 1-4 range. Change-Id: Ib0967fdeef3bf37c612124626a74d240aa571a66 --- M src/lower_mac/tetra_lower_mac.c M src/tetra_upper_mac.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/86/29386/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29386 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: Ib0967fdeef3bf37c612124626a74d240aa571a66 Gerrit-Change-Number: 29386 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-tetra[master]: added support for fill bits and basic link defragmentation (also than...
by wbokslag 18 Sep '22

18 Sep '22
Attention is currently required from: wbokslag. Hello Jenkins Builder, fixeria, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-tetra/+/29387 to look at the new patch set (#2). Change subject: added support for fill bits and basic link defragmentation (also thanks to SQ5BPF) ...................................................................... added support for fill bits and basic link defragmentation (also thanks to SQ5BPF) The upper mac now maintains a defragmentation buffer for each timeslot. Resources with length -1 (fragmentation start) are added to the buf for that slot, further mac/frag frames are appended. When a mac/end is encountered, the reconstructed l2 message is passed to rx_tm_sdu. The tetra_llc_pdu struct now uses a uint32_t for tl_sdu_len in order to account for the possibly longer sdus. Fill bits processing was required in order to reliably determine the end of a MAC PDU. Change-Id: I41c9438b0b12c2fac9dff1b226eec5b33f30fbb4 --- M src/tetra-rx.c M src/tetra_llc_pdu.h M src/tetra_mac_pdu.c M src/tetra_mac_pdu.h M src/tetra_upper_mac.c M src/tetra_upper_mac.h 6 files changed, 270 insertions(+), 36 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-tetra refs/changes/87/29387/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29387 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I41c9438b0b12c2fac9dff1b226eec5b33f30fbb4 Gerrit-Change-Number: 29387 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-hlr[master]: Debian: add osmocom user during package install
by msuraev 18 Sep '22

18 Sep '22
msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29311 ) Change subject: Debian: add osmocom user during package install ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29311 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: I625c993ab03dfe32976c651acca9c35c33a768e7 Gerrit-Change-Number: 29311 Gerrit-PatchSet: 7 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Sun, 18 Sep 2022 13:26:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hlr[master]: Debian: install osmo-hlr-dgsm.cfg as example config
by msuraev 18 Sep '22

18 Sep '22
Attention is currently required from: fixeria, msuraev. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hlr/+/29391 ) Change subject: Debian: install osmo-hlr-dgsm.cfg as example config ...................................................................... Set Ready For Review -- To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/29391 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-Change-Id: Ia64f14ada006acb31c5f725dfa0d52f482d3e8b4 Gerrit-Change-Number: 29391 Gerrit-PatchSet: 1 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sun, 18 Sep 2022 13:26:46 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.