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

July 2023

  • 1 participants
  • 3051 discussions
[S] Change in osmo-tetra[master]: fixed import warnings for stdbool on some gcc versions
by wbokslag 26 Jul '23

26 Jul '23
Attention is currently required from: pespin. wbokslag has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/33940 ) Change subject: fixed import warnings for stdbool on some gcc versions ...................................................................... Patch Set 2: (1 comment) File src/tetra_llc_pdu.c: https://gerrit.osmocom.org/c/osmo-tetra/+/33940/comment/b04291db_b7fe0453 PS1, Line 122: static int tetra_llc_check_fcs(struct tetra_llc_pdu *lpp, uint8_t *buf, int len) > why this change? the return clearly specifies it's a bool. You're right, fixed -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/33940 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I979a95eae70d839e20434cc7f08c196c162671a8 Gerrit-Change-Number: 33940 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 26 Jul 2023 18:16:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[M] Change in libosmo-gprs[master]: llc: Submit LL-XID-IND to L3 if N201-U or N201-I changes
by pespin 26 Jul '23

26 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33949 ) Change subject: llc: Submit LL-XID-IND to L3 if N201-U or N201-I changes ...................................................................... llc: Submit LL-XID-IND to L3 if N201-U or N201-I changes Change-Id: I8135c5cef4df69a7c3a540050da0837bf2059df2 --- M src/llc/llc.c M src/llc/llc_ll.c 2 files changed, 37 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/49/33949/1 diff --git a/src/llc/llc.c b/src/llc/llc.c index e5e9538..6164789 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -554,6 +554,7 @@ unsigned int xid_fields_len; int rc, i; struct gprs_llc_xid_field *xid_field_request_l3 = NULL; + bool submit_l3_ind = false; /* Parse and analyze XID-Request */ rc = gprs_llc_xid_decode(xid_fields, ARRAY_SIZE(xid_fields), @@ -577,11 +578,23 @@ switch (xid_fields[i].type) { case OSMO_GPRS_LLC_XID_T_N201_U: LOGLLE(lle, LOGL_INFO, "Peer requested N201-U=%u\n", xid_fields[i].val); - lle->params.n201_u = xid_fields[i].val; + if (lle->params.n201_u != xid_fields[i].val) { + lle->params.n201_u = xid_fields[i].val; + /* TS 44.064 8.5.3.0 "LL-XID-IND shall be indicated to layer 3 if N201-U or N201-I have been changed." */ + submit_l3_ind = true; + } break; case OSMO_GPRS_LLC_XID_T_N201_I: LOGLLE(lle, LOGL_INFO, "Peer requested N201-I=%u\n", xid_fields[i].val); - lle->params.n201_i = xid_fields[i].val; + if (lle->params.n201_i != xid_fields[i].val) { + lle->params.n201_i = xid_fields[i].val; + /* TS 44.064 8.5.3.0 "LL-XID-IND shall be indicated to layer 3 if N201-U or N201-I have been changed." */ + submit_l3_ind = true; + } + break; + case OSMO_GPRS_LLC_XID_T_L3_PAR: + xid_field_request_l3 = &xid_fields[i]; + submit_l3_ind = true; break; default: continue; @@ -593,17 +606,13 @@ OSMO_ASSERT(lle->rx_xid); lle->rx_xid_len = xid_fields_len; - /* Forward SNDCP-XID fields to Layer 3 (SNDCP) */ - for (i = 0; i < xid_fields_len; i++) { - if (xid_fields[i].type == OSMO_GPRS_LLC_XID_T_L3_PAR) { - xid_field_request_l3 = &xid_fields[i]; - gprs_llc_lle_submit_prim_ll_xid_ind(lle, xid_field_request_l3); - /* delay answer until we get LL-XID.resp from SNDCP: */ - return rc; - } + if (submit_l3_ind) { + /* Forward SNDCP-XID fields to Layer 3 (SNDCP) */ + rc = gprs_llc_lle_submit_prim_ll_xid_ind(lle, xid_field_request_l3); + /* ... and delay answer until we get LL-XID.resp from SNDCP. */ + } else { + rc = gprs_llc_lle_tx_xid_resp(lle, NULL, 0); } - - rc = gprs_llc_lle_tx_xid_resp(lle, NULL, 0); return rc; } diff --git a/src/llc/llc_ll.c b/src/llc/llc_ll.c index 0ba690b..2df6e33 100644 --- a/src/llc/llc_ll.c +++ b/src/llc/llc_ll.c @@ -172,14 +172,15 @@ const struct gprs_llc_xid_field *xid_field_request_l3) { struct osmo_gprs_llc_prim *llc_prim_tx; - OSMO_ASSERT(xid_field_request_l3); llc_prim_tx = gprs_llc_prim_alloc_ll_xid_ind(lle->llme->tlli, lle->sapi, NULL, xid_field_request_l3->var.val_len); OSMO_ASSERT(llc_prim_tx); - llc_prim_tx->ll.l3_pdu_len = xid_field_request_l3->var.val_len; - llc_prim_tx->ll.l3_pdu = msgb_put(llc_prim_tx->oph.msg, llc_prim_tx->ll.l3_pdu_len); - if (llc_prim_tx->ll.l3_pdu_len > 0) - memcpy(llc_prim_tx->ll.l3_pdu, xid_field_request_l3->var.val, - llc_prim_tx->ll.l3_pdu_len); + if (xid_field_request_l3) { + llc_prim_tx->ll.l3_pdu_len = xid_field_request_l3->var.val_len; + llc_prim_tx->ll.l3_pdu = msgb_put(llc_prim_tx->oph.msg, llc_prim_tx->ll.l3_pdu_len); + if (llc_prim_tx->ll.l3_pdu_len > 0) + memcpy(llc_prim_tx->ll.l3_pdu, xid_field_request_l3->var.val, + llc_prim_tx->ll.l3_pdu_len); + } llc_prim_tx->ll.xid.n201_i = lle->params.n201_i; llc_prim_tx->ll.xid.n201_u = lle->params.n201_u; return gprs_llc_prim_call_up_cb(llc_prim_tx); -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33949 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8135c5cef4df69a7c3a540050da0837bf2059df2 Gerrit-Change-Number: 33949 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-gprs[master]: llc: Introduce function to log XID fields and use upon Rx/Tx
by pespin 26 Jul '23

26 Jul '23
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33947 to look at the new patch set (#2). Change subject: llc: Introduce function to log XID fields and use upon Rx/Tx ...................................................................... llc: Introduce function to log XID fields and use upon Rx/Tx Change-Id: I8c6b07305c0bcecb4e1681967884a3e62c813592 --- M include/osmocom/gprs/llc/llc_private.h M src/llc/llc.c M src/llc/llc_xid.c 3 files changed, 45 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/47/33947/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8c6b07305c0bcecb4e1681967884a3e62c813592 Gerrit-Change-Number: 33947 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
[M] Change in libosmo-gprs[master]: llc: Apply N201-I & N201-U requested by the network
by pespin 26 Jul '23

26 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33948 ) Change subject: llc: Apply N201-I & N201-U requested by the network ...................................................................... llc: Apply N201-I & N201-U requested by the network Change-Id: I2f2cb8b831266b8e4251c2832e6545bef776658c --- M src/llc/llc.c M src/llc/llc_ll.c M tests/llc/llc_prim_test.c M tests/llc/llc_prim_test.err M tests/llc/llc_prim_test.ok 5 files changed, 92 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/48/33948/1 diff --git a/src/llc/llc.c b/src/llc/llc.c index 827b067..e5e9538 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -573,6 +573,21 @@ * when a MS submits values which defer from * the default! */ + for (i = 0; i < xid_fields_len; i++) { + switch (xid_fields[i].type) { + case OSMO_GPRS_LLC_XID_T_N201_U: + LOGLLE(lle, LOGL_INFO, "Peer requested N201-U=%u\n", xid_fields[i].val); + lle->params.n201_u = xid_fields[i].val; + break; + case OSMO_GPRS_LLC_XID_T_N201_I: + LOGLLE(lle, LOGL_INFO, "Peer requested N201-I=%u\n", xid_fields[i].val); + lle->params.n201_i = xid_fields[i].val; + break; + default: + continue; + } + } + /* Store last received XID-Ind from peer: */ lle->rx_xid = gprs_llc_xid_deepcopy(lle->llme, xid_fields, xid_fields_len); OSMO_ASSERT(lle->rx_xid); diff --git a/src/llc/llc_ll.c b/src/llc/llc_ll.c index b907299..0ba690b 100644 --- a/src/llc/llc_ll.c +++ b/src/llc/llc_ll.c @@ -180,6 +180,8 @@ if (llc_prim_tx->ll.l3_pdu_len > 0) memcpy(llc_prim_tx->ll.l3_pdu, xid_field_request_l3->var.val, llc_prim_tx->ll.l3_pdu_len); + llc_prim_tx->ll.xid.n201_i = lle->params.n201_i; + llc_prim_tx->ll.xid.n201_u = lle->params.n201_u; return gprs_llc_prim_call_up_cb(llc_prim_tx); } @@ -197,7 +199,8 @@ if (llc_prim_tx->ll.l3_pdu_len > 0) memcpy(llc_prim_tx->ll.l3_pdu, xid_field_response_l3->var.val, llc_prim_tx->ll.l3_pdu_len); - + llc_prim_tx->ll.xid.n201_i = lle->params.n201_i; + llc_prim_tx->ll.xid.n201_u = lle->params.n201_u; /* TODO: do something with following. Is it actually needed? */ (void)xid_field_request_l3; diff --git a/tests/llc/llc_prim_test.c b/tests/llc/llc_prim_test.c index b9e2e0e..a7f132a 100644 --- a/tests/llc/llc_prim_test.c +++ b/tests/llc/llc_prim_test.c @@ -160,6 +160,40 @@ */ static uint8_t pdu_gmm_id_req[] = { 0x08, 0x15, 0x02 }; +/* +MS-SGSN LLC (Mobile Station - Serving GPRS Support Node Logical Link Control) SAPI: User data 3 + Address field SAPI: LL3 + 0... .... = Protocol Discriminator_bit: OK + .1.. .... = Command/Response bit: DownLink/UpLink = Command/Response + .... 0011 = SAPI: User data 3 (3) + Unnumbered frame: XID + 111. .... = U format: 0x7 + ...1 .... = P/F bit: True + .... 1011 = Command/Response: XID (0xb) + FCS: 0x4e7c8c (correct) + Information Field: Length = 8 + XID Parameter Type: Version (LLC version number) - Value: 0 + 0... .... = XL Bit: 0x0 + .000 00.. = Type: 0 + .... ..01 = Length: 1 + 0000 0000 = Parameter Byte: 0x00 + XID Parameter Type: N201-U (max info field length for U and UI frames) - Value: 500 + 0... .... = XL Bit: 0x0 + .001 01.. = Type: 5 + .... ..10 = Length: 2 + 0000 0001 = Parameter Byte: 0x01 + 1111 0100 = Parameter Byte: 0xf4 + XID Parameter Type: N201-I (max info field length for I frames) - Value: 1503 + 0... .... = XL Bit: 0x0 + .001 10.. = Type: 6 + .... ..10 = Length: 2 + 0000 0101 = Parameter Byte: 0x05 + 1101 1111 = Parameter Byte: 0xdf +*/ +static uint8_t pdu_llc_xid_cmd_dl[] = { + 0x43, 0xfb, 0x01, 0x00, 0x16, 0x01, 0xf4, 0x1a, 0x05, 0xdf, 0x8c, 0x7c, 0x4e }; + + static void test_llc_prim_ms(void) { struct osmo_gprs_llc_prim *llc_prim; @@ -187,6 +221,20 @@ rc = osmo_gprs_llc_prim_lower_up(llc_prim); OSMO_ASSERT(rc == 0); + /* 3GPP TS 24.007 Appendix C.6: PDP Act Req + Acc happens here in upper + layers ... as a result, SNDCP submits LL-ESTABLISH-REQ: */ + char xid_l3_pars[] = "xid-l3-dummy-buffer"; + llc_prim = osmo_gprs_llc_prim_alloc_ll_establish_req(tlli, OSMO_GPRS_LLC_SAPI_SNDCP3, (uint8_t *)xid_l3_pars, sizeof(xid_l3_pars)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_llc_prim_upper_down(llc_prim); + OSMO_ASSERT(rc == -ENOTSUP); /* ABM mode not supported yet. */ + + /* Networks sends us a XID command: */ + llc_prim = osmo_gprs_llc_prim_alloc_grr_unitdata_ind(tlli, pdu_llc_xid_cmd_dl, sizeof(pdu_llc_xid_cmd_dl)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_llc_prim_lower_up(llc_prim); + OSMO_ASSERT(rc == 0); + /* Test GMM asking LLC to transmit a response for a Paging Request: */ llc_prim = osmo_gprs_llc_prim_alloc_llgmm_trigger_req(tlli, OSMO_GPRS_LLC_LLGM_TRIGGER_PAGE_RESP); OSMO_ASSERT(llc_prim); diff --git a/tests/llc/llc_prim_test.err b/tests/llc/llc_prim_test.err index 7cc72f5..022dfac 100644 --- a/tests/llc/llc_prim_test.err +++ b/tests/llc/llc_prim_test.err @@ -3,6 +3,17 @@ DLGLOBAL INFO Rx from lower layers: GRR-UNITDATA.indication DLGLOBAL DEBUG Rx GRR-UNITDATA.indication: SAPI=1 (GMM), UI func=UI C/R=0 PM=0 E=0 IP=0 N(U)=0 FCS=f218e2 DLGLOBAL DEBUG LLE(ffffffff/f43cec71,GMM){UNASSIGNED} Rx SAPI=1 (GMM), UI func=UI C/R=0 PM=0 E=0 IP=0 N(U)=0 FCS=f218e2 +DLGLOBAL INFO Rx from upper layers: LL-ESTABLISH.request +DLGLOBAL ERROR LLE(ffffffff/f43cec71,SNDCP3){UNASSIGNED} Tx SABM: ABM mode not supported yet! +DLGLOBAL INFO Rx from lower layers: GRR-UNITDATA.indication +DLGLOBAL DEBUG Rx GRR-UNITDATA.indication: SAPI=3 (SNDCP3), U func=XID C/R=1 P/F=1 FCS=4e7c8c +DLGLOBAL DEBUG LLE(ffffffff/f43cec71,SNDCP3){UNASSIGNED} Rx SAPI=3 (SNDCP3), U func=XID C/R=1 P/F=1 FCS=4e7c8c +DLGLOBAL NOTICE LLE(ffffffff/f43cec71,SNDCP3){UNASSIGNED} Received XID indication from MS. +DLGLOBAL DEBUG XID: type LLC-Version, val_len=1, val=0 +DLGLOBAL DEBUG XID: type N201-U, val_len=2, val=500 +DLGLOBAL DEBUG XID: type N201-I, val_len=2, val=1503 +DLGLOBAL INFO LLE(ffffffff/f43cec71,SNDCP3){UNASSIGNED} Peer requested N201-U=500 +DLGLOBAL INFO LLE(ffffffff/f43cec71,SNDCP3){UNASSIGNED} Peer requested N201-I=1503 DLGLOBAL INFO Rx from upper layers: LLGMM-TRIGGER.request DLGLOBAL INFO LLME(ffffffff/f43cec71){UNASSIGNED} LLGMM-TRIGGER.request DLGLOBAL INFO Rx from upper layers: LLGMM-TRIGGER.request @@ -22,5 +33,9 @@ DLGLOBAL INFO Rx from upper layers: LL-ESTABLISH.request DLGLOBAL ERROR LLE(e1c5d364/e1c5d364,SNDCP3){UNASSIGNED} Tx SABM: ABM mode not supported yet! DLGLOBAL INFO Rx from upper layers: LL-XID.request +DLGLOBAL DEBUG XID: type LLC-Version, val_len=1, val=0 +DLGLOBAL DEBUG XID: type N201-U, val_len=2, val=500 +DLGLOBAL DEBUG XID: type N201-I, val_len=2, val=1503 +DLGLOBAL DEBUG XID: type L3-Params, data_len=20, data=7869642d6c332d64756d6d792d62756666657200 DLGLOBAL NOTICE LLE(e1c5d364/e1c5d364,SNDCP3){UNASSIGNED} Sending XID type L3-Params (30 bytes) request to MS... DLGLOBAL INFO Rx from upper layers: LL-UNITDATA.request diff --git a/tests/llc/llc_prim_test.ok b/tests/llc/llc_prim_test.ok index ee381e6..6ca45d9 100644 --- a/tests/llc/llc_prim_test.ok +++ b/tests/llc/llc_prim_test.ok @@ -1,6 +1,7 @@ ==== test_llc_prim_ms() [start] ==== test_llc_prim_down_cb(): Rx GRR-UNITDATA.request l3=[01 c0 01 08 01 02 e5 e0 01 0a 00 05 f4 f4 3c ec 71 32 f4 07 00 05 00 17 19 33 43 2b 37 15 9e f9 88 79 cb a2 8c 66 21 e7 26 88 b1 98 87 9c 00 17 05 22 96 cc ] test_llc_prim_up_cb(): Rx LL-UNITDATA.indication TLLI=0xf43cec71 SAPI=GMM l3=[08 01 01 d5 71 00 00 08 29 26 24 00 00 00 00 71 62 f2 24 6c 84 44 04 11 e5 10 00 ] +test_llc_prim_down_cb(): Rx GRR-UNITDATA.request l3=[03 fb 01 00 16 01 f4 1a 05 df 68 40 d9 ] test_llc_prim_down_cb(): Rx GRR-UNITDATA.request l3=[01 c0 05 4a 85 74 ] test_llc_prim_down_cb(): Rx GRR-UNITDATA.request l3=[01 c0 09 ce 0d f7 ] test_llc_prim_down_cb(): Rx GRR-UNITDATA.request l3=[01 e0 1c a2 b3 ] -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I2f2cb8b831266b8e4251c2832e6545bef776658c Gerrit-Change-Number: 33948 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-trx[master]: ms: restructure the va code to add rach support
by Hoernchen 26 Jul '23

26 Jul '23
Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/33928 ) Change subject: ms: restructure the va code to add rach support ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/33928 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Id8edf31fe1bf72a2f254e634edc7c12b3bba8833 Gerrit-Change-Number: 33928 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
1 0
0 0
[L] Change in osmo-trx[master]: ms/va: add test tool and data
by Hoernchen 26 Jul '23

26 Jul '23
Hoernchen has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/33929 ) Change subject: ms/va: add test tool and data ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/33929 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ie2cf3066500062920201c6fa4c2a4286fd5bbcb0 Gerrit-Change-Number: 33929 Gerrit-PatchSet: 4 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-MessageType: abandon
1 0
0 0
[L] Change in osmo-trx[master]: ms/va: add test tool and data
by Hoernchen 26 Jul '23

26 Jul '23
Attention is currently required from: Hoernchen. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-trx/+/33945 to look at the new patch set (#3). Change subject: ms/va: add test tool and data ...................................................................... ms/va: add test tool and data Change-Id: Ie38ed4996134e84ad0481872a743299bb442b3db --- M .checkpatch.conf M .gitignore M utils/Makefile.am A utils/va-test/burst-gen.cpp A utils/va-test/demodbits_tsc7.s8 A utils/va-test/nb_chunk_tsc7.cfile 6 files changed, 559 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/45/33945/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/33945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ie38ed4996134e84ad0481872a743299bb442b3db Gerrit-Change-Number: 33945 Gerrit-PatchSet: 3 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
[S] Change in libosmo-gprs[master]: llc: Introduce function to log XID fields and use upon rx
by pespin 26 Jul '23

26 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33947 ) Change subject: llc: Introduce function to log XID fields and use upon rx ...................................................................... llc: Introduce function to log XID fields and use upon rx Change-Id: I8c6b07305c0bcecb4e1681967884a3e62c813592 --- M include/osmocom/gprs/llc/llc_private.h M src/llc/llc.c M src/llc/llc_xid.c 3 files changed, 43 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/47/33947/1 diff --git a/include/osmocom/gprs/llc/llc_private.h b/include/osmocom/gprs/llc/llc_private.h index b2b9047..e5c197e 100644 --- a/include/osmocom/gprs/llc/llc_private.h +++ b/include/osmocom/gprs/llc/llc_private.h @@ -345,6 +345,8 @@ struct gprs_llc_xid_field *gprs_llc_xid_deepcopy(void *ctx, const struct gprs_llc_xid_field *src_xid, size_t src_xid_len); +void gprs_llc_dump_xid_fields(const struct gprs_llc_xid_field *xid_fields, + size_t xid_fields_len, unsigned int logl); /* llc_pdu.c: */ int gprs_llc_pdu_decode(struct gprs_llc_pdu_decoded *pdu, diff --git a/src/llc/llc.c b/src/llc/llc.c index 93a11ec..9e16d23 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -569,6 +569,8 @@ * when a MS submits values which defer from * the default! */ + gprs_llc_dump_xid_fields(xid_fields, xid_fields_len, LOGL_DEBUG); + /* Store last received XID-Ind from peer: */ lle->rx_xid = gprs_llc_xid_deepcopy(lle->llme, xid_fields, xid_fields_len); OSMO_ASSERT(lle->rx_xid); diff --git a/src/llc/llc_xid.c b/src/llc/llc_xid.c index 9280416..c46083d 100644 --- a/src/llc/llc_xid.c +++ b/src/llc/llc_xid.c @@ -320,3 +320,33 @@ } return dst_xid; } + +/* Dump a list with XID fields (Debug) */ +void gprs_llc_dump_xid_fields(const struct gprs_llc_xid_field *xid_fields, + size_t xid_fields_len, unsigned int logl) +{ + unsigned int i; + + OSMO_ASSERT(xid_fields); + + for (i = 0; i < xid_fields_len; i++) { + const struct gprs_llc_xid_field *xid_field = &xid_fields[i]; + const uint8_t len = gprs_llc_xid_field_get_len(xid_field); + if (len > 0) { + if (gprs_llc_xid_type_is_variable_len(xid_field->type)) { + OSMO_ASSERT(xid_field->var.val); + LOGLLC(logl, "XID: type %s, data_len=%d, data=%s\n", + gprs_llc_xid_type_name(xid_field->type), + xid_field->var.val_len, + osmo_hexdump_nospc(xid_field->var.val, xid_field->var.val_len)); + } else { + LOGLLC(logl, "XID: type %s, val_len=%d, val=%u\n", + gprs_llc_xid_type_name(xid_field->type), + len, xid_field->val); + } + } else { + LOGLLC(logl, "XID: type %s, data_len=0\n", + gprs_llc_xid_type_name(xid_field->type)); + } + } +} -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33947 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8c6b07305c0bcecb4e1681967884a3e62c813592 Gerrit-Change-Number: 33947 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmo-gprs[master]: llc: xid: Introduce some helper internal functions to make code easie...
by pespin 26 Jul '23

26 Jul '23
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33946 ) Change subject: llc: xid: Introduce some helper internal functions to make code easier to follow ...................................................................... llc: xid: Introduce some helper internal functions to make code easier to follow Take the chance to fix wrong indentation on related function parameter. Change-Id: I8c0163583efc2720a4b2675ce93293c184f80d0c --- M include/osmocom/gprs/llc/llc_private.h M src/llc/llc_xid.c 2 files changed, 37 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/46/33946/1 diff --git a/include/osmocom/gprs/llc/llc_private.h b/include/osmocom/gprs/llc/llc_private.h index 44d32e2..b2b9047 100644 --- a/include/osmocom/gprs/llc/llc_private.h +++ b/include/osmocom/gprs/llc/llc_private.h @@ -343,8 +343,8 @@ const struct gprs_llc_xid_field *fields, unsigned int num_fields); struct gprs_llc_xid_field *gprs_llc_xid_deepcopy(void *ctx, - const struct gprs_llc_xid_field *src_xid, - size_t src_xid_len); + const struct gprs_llc_xid_field *src_xid, + size_t src_xid_len); /* llc_pdu.c: */ int gprs_llc_pdu_decode(struct gprs_llc_pdu_decoded *pdu, diff --git a/src/llc/llc_xid.c b/src/llc/llc_xid.c index deeeaa7..9280416 100644 --- a/src/llc/llc_xid.c +++ b/src/llc/llc_xid.c @@ -76,6 +76,24 @@ [OSMO_GPRS_LLC_XID_T_MAC_IOV_UI] = { .len = 4, .min = 0, .max = UINT32_MAX }, }; +static inline bool gprs_llc_xid_type_is_variable_len(enum gprs_llc_xid_type t) +{ + return gprs_llc_xid_desc[t].var_len; +} + +static inline bool gprs_llc_xid_type_is_fixed_len(enum gprs_llc_xid_type t) +{ + return !gprs_llc_xid_desc[t].var_len; +} + +static inline uint8_t gprs_llc_xid_field_get_len(const struct gprs_llc_xid_field *field) +{ + if (gprs_llc_xid_type_is_variable_len(field->type)) + return field->var.val_len; + else + return gprs_llc_xid_desc[field->type].len; +} + bool gprs_llc_xid_field_is_valid(const struct gprs_llc_xid_field *field) { if (field->type >= ARRAY_SIZE(gprs_llc_xid_desc)) { @@ -84,7 +102,7 @@ return false; } - if (gprs_llc_xid_desc[field->type].var_len) + if (gprs_llc_xid_type_is_variable_len(field->type)) return true; if (field->var.val_len > 0) { @@ -139,10 +157,7 @@ hdr[0] = (field->type & 0x1f) << 2; /* XID field length */ - if (gprs_llc_xid_desc[field->type].var_len) - len = field->var.val_len; - else - len = gprs_llc_xid_desc[field->type].len; + len = gprs_llc_xid_field_get_len(field); if (len == 0) continue; @@ -158,7 +173,7 @@ } /* XID field value (variable length) */ - if (gprs_llc_xid_desc[field->type].var_len) { + if (gprs_llc_xid_type_is_variable_len(field->type)) { if (wptr + len - data > data_len) return -EINVAL; memcpy(wptr, field->var.val, len); @@ -240,7 +255,7 @@ data_len -= len; /* XID field value (variable length) */ - if (gprs_llc_xid_desc[field->type].var_len) { + if (gprs_llc_xid_type_is_variable_len(field->type)) { field->var.val = len ? ptr : NULL; field->var.val_len = len; } else { @@ -285,8 +300,8 @@ /* Return Deep copy of a xid_field array allocated using talloc ctx. */ struct gprs_llc_xid_field *gprs_llc_xid_deepcopy(void *ctx, - const struct gprs_llc_xid_field *src_xid, - size_t src_xid_len) + const struct gprs_llc_xid_field *src_xid, + size_t src_xid_len) { size_t bytes_len = sizeof(*src_xid) * src_xid_len; struct gprs_llc_xid_field *dst_xid; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33946 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I8c0163583efc2720a4b2675ce93293c184f80d0c Gerrit-Change-Number: 33946 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[L] Change in osmo-trx[master]: ms/va: add test tool and data
by Hoernchen 26 Jul '23

26 Jul '23
Hoernchen has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/osmo-trx/+/33945 ) Change subject: ms/va: add test tool and data ...................................................................... ms/va: add test tool and data Change-Id: Ie38ed4996134e84ad0481872a743299bb442b3db --- M .checkpatch.conf M .gitignore M utils/Makefile.am A utils/va-test/burst-gen.cpp A utils/va-test/demodbits_tsc7.s8 A utils/va-test/nb_chunk_tsc7.cfile 6 files changed, 559 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/45/33945/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/33945 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: Ie38ed4996134e84ad0481872a743299bb442b3db Gerrit-Change-Number: 33945 Gerrit-PatchSet: 2 Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • ...
  • 306
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.