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 pysim[master]: ts_51_011, ts_31_102: point to proper EF_EXTn file
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/31067 ) Change subject: ts_51_011, ts_31_102: point to proper EF_EXTn file ...................................................................... Patch Set 2: Code-Review+1 (1 comment) Patchset: PS2: I guess someone already thought about this, but I'd find intersting to have some sort of unit tests here, at least encoding/decoding some buffers or filesystems under test/ -- To view, visit https://gerrit.osmocom.org/c/pysim/+/31067 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I5301d41225266d35c05e41588811502e5595520d Gerrit-Change-Number: 31067 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:08:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: ts_51_011: Implement Extended BCD Coding
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/31066 ) Change subject: ts_51_011: Implement Extended BCD Coding ...................................................................... Patch Set 2: (2 comments) File pySim/ts_51_011.py: https://gerrit.osmocom.org/c/pysim/+/31066/comment/de70b284_cf61cc9e PS2, Line 347: # we only translate a=* / b=# as they habe a clear representation typo: have https://gerrit.osmocom.org/c/pysim/+/31066/comment/5750772b_0aebd402 PS2, Line 366: 'dialing_nr'/ExtendedBcdAdapter(BcdAdapter(Rpad(Bytes(10)))), Just to be sure: Shouldn't this be: ExtendedBcdAdapter(Rpad(Bytes(10))) -- To view, visit https://gerrit.osmocom.org/c/pysim/+/31066 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: Ifcec13e9b296dba7bec34b7872192b7ce185c23c Gerrit-Change-Number: 31066 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:06:43 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: ts_51_011: Support EF.SDN
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/31065 ) Change subject: ts_51_011: Support EF.SDN ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/31065 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: If91332b10138096d465a9dccf90744de2c14b2be Gerrit-Change-Number: 31065 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:04:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in pysim[master]: ts_51_011: Fix bit-order in EF.VGCSS and EF.VBSS
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/31064 ) Change subject: ts_51_011: Fix bit-order in EF.VGCSS and EF.VBSS ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/31064 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I77674c23823aae71c9504b1a85cd75266edadc6f Gerrit-Change-Number: 31064 Gerrit-PatchSet: 2 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:03:56 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: Initial support for GRR-UNITDATA.ind/req
by pespin 25 Jan '23

25 Jan '23
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31049 ) Change subject: llc: Initial support for GRR-UNITDATA.ind/req ...................................................................... llc: Initial support for GRR-UNITDATA.ind/req This allows forwarding GRR-UNITDATA.ind/req up & down the stack, to be on pair with the BSSGP LLC SAP. Change-Id: I6a4454b4aa2c96e1f4ce7e2a5d5aba8ec1cf3f60 --- M include/osmocom/gprs/llc/llc_prim.h M include/osmocom/gprs/llc/llc_private.h M src/llc/llc.c M src/llc/llc_bssgp.c M src/llc/llc_grr.c M tests/llc/llc_prim_test.c M tests/llc/llc_prim_test.err M tests/llc/llc_prim_test.ok 8 files changed, 316 insertions(+), 156 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/gprs/llc/llc_prim.h b/include/osmocom/gprs/llc/llc_prim.h index 23b41cf..22ee7b7 100644 --- a/include/osmocom/gprs/llc/llc_prim.h +++ b/include/osmocom/gprs/llc/llc_prim.h @@ -204,13 +204,20 @@ size_t ll_pdu_len; /* Specific fields */ union { - /* OSMO_GPRS_LLC_GRR_[UNIT]DATA | Req */ + /* OSMO_GPRS_LLC_GRR_DATA | Req */ struct { - uint8_t qos_params[3]; - uint8_t radio_prio; - uint8_t cause; /* only for OSMO_GPRS_LLC_GRR_UNITDATA | Req */ uint8_t sapi; + uint8_t radio_prio; + uint8_t qos_params[3]; + } data_req; + /* OSMO_GPRS_LLC_GRR_UNITDATA| Req */ + struct { + uint8_t sapi; + uint8_t radio_prio; + uint8_t qos_params[3]; + uint8_t cause; + } unitdata_req; }; }; @@ -286,3 +293,7 @@ /* Alloc primitive for BSSGP SAP: */ struct osmo_gprs_llc_prim *osmo_gprs_llc_prim_alloc_bssgp_ul_unitdata_ind( uint32_t tlli, uint8_t *ll_pdu, size_t ll_pdu_len); + +/* Alloc primitive for GRR SAP: */ +struct osmo_gprs_llc_prim *osmo_gprs_llc_prim_alloc_grr_unitdata_ind( + uint32_t tlli, uint8_t *ll_pdu, size_t ll_pdu_len); diff --git a/include/osmocom/gprs/llc/llc_private.h b/include/osmocom/gprs/llc/llc_private.h index 4d44b74..1db33b6 100644 --- a/include/osmocom/gprs/llc/llc_private.h +++ b/include/osmocom/gprs/llc/llc_private.h @@ -282,6 +282,8 @@ /* llc_grr.c */ int gprs_llc_prim_lower_up_grr(struct osmo_gprs_llc_prim *llc_prim); +struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_grr_unitdata_req( + uint32_t tlli, uint8_t *ll_pdu, size_t ll_pdu_len); /* llc_ll.c */ int gprs_llc_prim_ll_upper_down(struct osmo_gprs_llc_prim *llc_prim); @@ -307,7 +309,8 @@ struct gprs_llc_lle *gprs_llc_find_lle_by_tlli_sapi(uint32_t tlli, uint8_t sapi); struct gprs_llc_lle *gprs_llc_lle_for_rx_by_tlli_sapi(const uint32_t tlli, uint8_t sapi, enum gprs_llc_frame_func cmd); -int gprs_llc_lle_hdr_rx(struct gprs_llc_lle *lle, struct gprs_llc_pdu_decoded *pdu_dec); +int gprs_llc_lle_rx_unitdata_ind(struct gprs_llc_lle *lle, uint8_t *ll_pdu, size_t ll_pdu_len, + struct gprs_llc_pdu_decoded *pdu_dec); void gprs_llc_llme_free(struct gprs_llc_llme *llme); int gprs_llc_lle_tx_xid(const struct gprs_llc_lle *lle, uint8_t *xid_payload, unsigned int xid_payload_len, bool is_cmd); int gprs_llc_lle_tx_xid_req(struct gprs_llc_lle *lle, uint8_t *l3par, unsigned int l3par_len); diff --git a/src/llc/llc.c b/src/llc/llc.c index 1f52851..1c572d6 100644 --- a/src/llc/llc.c +++ b/src/llc/llc.c @@ -309,7 +309,10 @@ /* TODO: we are probably missing the ciphering enc part, see osmo-sgsn apply_gea() */ /* LLC payload is put directly below: */ - llc_prim = gprs_llc_prim_alloc_bssgp_dl_unitdata_req(lle->llme->tlli, NULL, 4096 - sizeof(llc_prim)); + if (g_ctx->location == OSMO_GPRS_LLC_LOCATION_SGSN) + llc_prim = gprs_llc_prim_alloc_bssgp_dl_unitdata_req(lle->llme->tlli, NULL, 4096 - sizeof(llc_prim)); + else + llc_prim = gprs_llc_prim_alloc_grr_unitdata_req(lle->llme->tlli, NULL, 4096 - sizeof(llc_prim)); msg = llc_prim->oph.msg; msg->l3h = msg->tail; @@ -319,8 +322,15 @@ msgb_free(msg); return rc; } - llc_prim->bssgp.ll_pdu = msgb_l3(msg); - llc_prim->bssgp.ll_pdu_len = msgb_l3len(msg); + + if (g_ctx->location == OSMO_GPRS_LLC_LOCATION_SGSN) { + llc_prim->bssgp.ll_pdu = msgb_l3(msg); + llc_prim->bssgp.ll_pdu_len = msgb_l3len(msg); + } else { + llc_prim->grr.ll_pdu = msgb_l3(msg); + llc_prim->grr.ll_pdu_len = msgb_l3len(msg); + llc_prim->grr.unitdata_req.sapi = lle->sapi; + } /* Increment V(U) */ lle->vu_send = (lle->vu_send + 1) % 512; @@ -328,7 +338,7 @@ if ((lle->vu_send + 1) / 512) lle->oc_ui_send += 512; - /* Send BSSGP-DL-UNITDATA.req */ + /* Send BSSGP-DL-UNITDATA.req (SGSN) / GRR-UNITDATA.req (MS) */ rc = gprs_llc_prim_call_down_cb(llc_prim); return rc; } @@ -593,7 +603,7 @@ } /* Receive and process decoded LLC PDU from lower layer (GRR/BSSGP): */ -int gprs_llc_lle_hdr_rx(struct gprs_llc_lle *lle, struct gprs_llc_pdu_decoded *pdu_dec) +static int gprs_llc_lle_hdr_rx(struct gprs_llc_lle *lle, struct gprs_llc_pdu_decoded *pdu_dec) { const char *llc_pdu_name = gprs_llc_pdu_hdr_dump(pdu_dec); @@ -649,3 +659,129 @@ return 0; } + +/* encrypt information field + FCS, if needed! */ +static int apply_gea(const struct gprs_llc_lle *lle, uint16_t crypt_len, uint16_t nu, + uint32_t oc, uint8_t sapi, uint8_t *fcs, uint8_t *data) +{ + uint8_t cipher_out[GSM0464_CIPH_MAX_BLOCK]; + + if (lle->llme->algo == GPRS_ALGO_GEA0) + return -EINVAL; + + /* Compute the 'Input' Paraemeter */ + uint32_t fcs_calc, iv = gprs_cipher_gen_input_ui(lle->llme->iov_ui, sapi, + nu, oc); + /* Compute gamma that we need to XOR with the data */ + int r = gprs_cipher_run(cipher_out, crypt_len, lle->llme->algo, + lle->llme->kc, iv, + fcs ? GPRS_CIPH_SGSN2MS : GPRS_CIPH_MS2SGSN); + if (r < 0) { + LOGLLC(LOGL_ERROR, "Error producing %s gamma for UI " + "frame: %d\n", get_value_string(gprs_cipher_names, + lle->llme->algo), r); + return -ENOMSG; + } + + if (fcs) { + /* Mark frame as encrypted and update FCS */ + data[2] |= 0x02; + fcs_calc = gprs_llc_fcs(data, fcs - data); + fcs[0] = fcs_calc & 0xff; + fcs[1] = (fcs_calc >> 8) & 0xff; + fcs[2] = (fcs_calc >> 16) & 0xff; + data += 3; + } + + /* XOR the cipher output with the data */ + for (r = 0; r < crypt_len; r++) + *(data + r) ^= cipher_out[r]; + + return 0; +} + +/* Shared upper part handling of BSSGP-UNITDATA.ind and GRR-UNITDATA.ind */ +int gprs_llc_lle_rx_unitdata_ind(struct gprs_llc_lle *lle, uint8_t *ll_pdu, size_t ll_pdu_len, struct gprs_llc_pdu_decoded *pdu_dec) +{ + struct osmo_gprs_llc_prim *llc_prim_tx; + bool drop_cipherable = false; + int rc; + + /* reset age computation */ + lle->llme->age_timestamp = GPRS_LLME_RESET_AGE; + + /* decrypt information field + FCS, if needed! */ + if (pdu_dec->flags & OSMO_GPRS_LLC_PDU_F_ENC_MODE) { + if (lle->llme->algo != GPRS_ALGO_GEA0) { + rc = apply_gea(lle, pdu_dec->data_len + 3, pdu_dec->seq_tx, + lle->oc_ui_recv, lle->sapi, NULL, + (uint8_t *)pdu_dec->data); /*TODO: either copy buffer or remove "const" from pdu_dec field "data" */ + if (rc < 0) + return rc; + pdu_dec->fcs = *(pdu_dec->data + pdu_dec->data_len); + pdu_dec->fcs |= *(pdu_dec->data + pdu_dec->data_len + 1) << 8; + pdu_dec->fcs |= *(pdu_dec->data + pdu_dec->data_len + 2) << 16; + } else { + LOGLLME(lle->llme, LOGL_NOTICE, "encrypted frame for LLC that " + "has no KC/Algo! Dropping.\n"); + return 0; + } + } else { + if (lle->llme->algo != GPRS_ALGO_GEA0 && + lle->llme->cksn != GSM_KEY_SEQ_INVAL) + drop_cipherable = true; + } + + /* We have to do the FCS check _after_ decryption */ + uint16_t crc_length = ll_pdu_len - CRC24_LENGTH; + if (~pdu_dec->flags & OSMO_GPRS_LLC_PDU_F_PROT_MODE) + crc_length = OSMO_MIN(crc_length, UI_HDR_LEN + N202); + if (pdu_dec->fcs != gprs_llc_fcs(ll_pdu, crc_length)) { + LOGLLE(lle, LOGL_INFO, "Dropping frame with invalid FCS\n"); + return -EIO; + } + + /* Receive and Process the actual LLC frame */ + rc = gprs_llc_lle_hdr_rx(lle, pdu_dec); + if (rc < 0) + return rc; + + /* pdu_dec->data is only set when we need to send LL_[UNIT]DATA_IND up */ + if (pdu_dec->func == OSMO_GPRS_LLC_FUNC_UI && pdu_dec->data && pdu_dec->data_len) { + switch (pdu_dec->sapi) { + case OSMO_GPRS_LLC_SAPI_GMM: + /* send LL-UNITDATA-IND to GMM */ + llc_prim_tx = gprs_llc_prim_alloc_ll_unitdata_ind(lle->llme->tlli, + pdu_dec->sapi, + pdu_dec->data, + pdu_dec->data_len); + llc_prim_tx->ll.unitdata_ind.apply_gea = !drop_cipherable; /* TODO: is this correct? */ + llc_prim_tx->ll.unitdata_ind.apply_gia = false; /* TODO: how to set this? */ + gprs_llc_prim_call_up_cb(llc_prim_tx); + break; + case OSMO_GPRS_LLC_SAPI_SNDCP3: + case OSMO_GPRS_LLC_SAPI_SNDCP5: + case OSMO_GPRS_LLC_SAPI_SNDCP9: + case OSMO_GPRS_LLC_SAPI_SNDCP11: + /* send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */ + llc_prim_tx = gprs_llc_prim_alloc_ll_unitdata_ind(lle->llme->tlli, + pdu_dec->sapi, + pdu_dec->data, + pdu_dec->data_len); + llc_prim_tx->ll.unitdata_ind.apply_gea = !drop_cipherable; /* TODO: is this correct? */ + llc_prim_tx->ll.unitdata_ind.apply_gia = false; /* TODO: how to set this? */ + gprs_llc_prim_call_up_cb(llc_prim_tx); + break; + case OSMO_GPRS_LLC_SAPI_SMS: + /* FIXME */ + case OSMO_GPRS_LLC_SAPI_TOM2: + case OSMO_GPRS_LLC_SAPI_TOM8: + /* FIXME: send LL_DATA_IND/LL_UNITDATA_IND to TOM */ + default: + LOGLLC(LOGL_NOTICE, "Unsupported SAPI %u\n", pdu_dec->sapi); + rc = -EINVAL; + break; + } + } + return rc; +} diff --git a/src/llc/llc_bssgp.c b/src/llc/llc_bssgp.c index 48d4cde..a6fd308 100644 --- a/src/llc/llc_bssgp.c +++ b/src/llc/llc_bssgp.c @@ -78,58 +78,14 @@ * Handling from lower layers: ********************************/ -/* encrypt information field + FCS, if needed! */ -static int apply_gea(const struct gprs_llc_lle *lle, uint16_t crypt_len, uint16_t nu, - uint32_t oc, uint8_t sapi, uint8_t *fcs, uint8_t *data) -{ - uint8_t cipher_out[GSM0464_CIPH_MAX_BLOCK]; - - if (lle->llme->algo == GPRS_ALGO_GEA0) - return -EINVAL; - - /* Compute the 'Input' Paraemeter */ - uint32_t fcs_calc, iv = gprs_cipher_gen_input_ui(lle->llme->iov_ui, sapi, - nu, oc); - /* Compute gamma that we need to XOR with the data */ - int r = gprs_cipher_run(cipher_out, crypt_len, lle->llme->algo, - lle->llme->kc, iv, - fcs ? GPRS_CIPH_SGSN2MS : GPRS_CIPH_MS2SGSN); - if (r < 0) { - LOGLLC(LOGL_ERROR, "Error producing %s gamma for UI " - "frame: %d\n", get_value_string(gprs_cipher_names, - lle->llme->algo), r); - return -ENOMSG; - } - - if (fcs) { - /* Mark frame as encrypted and update FCS */ - data[2] |= 0x02; - fcs_calc = gprs_llc_fcs(data, fcs - data); - fcs[0] = fcs_calc & 0xff; - fcs[1] = (fcs_calc >> 8) & 0xff; - fcs[2] = (fcs_calc >> 16) & 0xff; - data += 3; - } - - /* XOR the cipher output with the data */ - for (r = 0; r < crypt_len; r++) - *(data + r) ^= cipher_out[r]; - - return 0; -} - - static int gprs_llc_prim_handle_bssgp_ul_unitdata_ind(struct osmo_gprs_llc_prim *llc_prim) { int rc; - struct gprs_llc_hdr *lh = (struct gprs_llc_hdr *) llc_prim->bssgp.ll_pdu; struct gprs_llc_pdu_decoded pdu_dec = {0}; const char *llc_pdu_name = NULL; struct gprs_llc_lle *lle = NULL; - bool drop_cipherable = false; - struct osmo_gprs_llc_prim *llc_prim_tx; - rc = gprs_llc_pdu_decode(&pdu_dec, (uint8_t *)lh, llc_prim->bssgp.ll_pdu_len); + rc = gprs_llc_pdu_decode(&pdu_dec, llc_prim->bssgp.ll_pdu, llc_prim->bssgp.ll_pdu_len); if (rc < 0) { LOGLLC(LOGL_ERROR, "%s: Error parsing LLC header\n", osmo_gprs_llc_prim_name(llc_prim)); return rc; @@ -166,82 +122,7 @@ } return 0; } - /* reset age computation */ - lle->llme->age_timestamp = GPRS_LLME_RESET_AGE; - - /* decrypt information field + FCS, if needed! */ - if (pdu_dec.flags & OSMO_GPRS_LLC_PDU_F_ENC_MODE) { - if (lle->llme->algo != GPRS_ALGO_GEA0) { - rc = apply_gea(lle, pdu_dec.data_len + 3, pdu_dec.seq_tx, - lle->oc_ui_recv, lle->sapi, NULL, - (uint8_t *)pdu_dec.data); /*TODO: either copy buffer or remove "const" from pdu_dec field "data" */ - if (rc < 0) - return rc; - pdu_dec.fcs = *(pdu_dec.data + pdu_dec.data_len); - pdu_dec.fcs |= *(pdu_dec.data + pdu_dec.data_len + 1) << 8; - pdu_dec.fcs |= *(pdu_dec.data + pdu_dec.data_len + 2) << 16; - } else { - LOGLLME(lle->llme, LOGL_NOTICE, "encrypted frame for LLC that " - "has no KC/Algo! Dropping.\n"); - return 0; - } - } else { - if (lle->llme->algo != GPRS_ALGO_GEA0 && - lle->llme->cksn != GSM_KEY_SEQ_INVAL) - drop_cipherable = true; - } - - /* We have to do the FCS check _after_ decryption */ - uint16_t crc_length = llc_prim->bssgp.ll_pdu_len - CRC24_LENGTH; - if (~pdu_dec.flags & OSMO_GPRS_LLC_PDU_F_PROT_MODE) - crc_length = OSMO_MIN(crc_length, UI_HDR_LEN + N202); - if (pdu_dec.fcs != gprs_llc_fcs((uint8_t *)lh, crc_length)) { - LOGLLE(lle, LOGL_INFO, "Dropping frame with invalid FCS\n"); - return -EIO; - } - - /* Receive and Process the actual LLC frame */ - rc = gprs_llc_lle_hdr_rx(lle, &pdu_dec); - if (rc < 0) - return rc; - - /* pdu_dec.data is only set when we need to send LL_[UNIT]DATA_IND up */ - if (pdu_dec.func == OSMO_GPRS_LLC_FUNC_UI && pdu_dec.data && pdu_dec.data_len) { - switch (pdu_dec.sapi) { - case OSMO_GPRS_LLC_SAPI_GMM: - /* send LL-UNITDATA-IND to GMM */ - llc_prim_tx = gprs_llc_prim_alloc_ll_unitdata_ind(lle->llme->tlli, - pdu_dec.sapi, - pdu_dec.data, - pdu_dec.data_len); - llc_prim_tx->ll.unitdata_ind.apply_gea = !drop_cipherable; /* TODO: is this correct? */ - llc_prim_tx->ll.unitdata_ind.apply_gia = false; /* TODO: how to set this? */ - gprs_llc_prim_call_up_cb(llc_prim_tx); - break; - case OSMO_GPRS_LLC_SAPI_SNDCP3: - case OSMO_GPRS_LLC_SAPI_SNDCP5: - case OSMO_GPRS_LLC_SAPI_SNDCP9: - case OSMO_GPRS_LLC_SAPI_SNDCP11: - /* send LL_DATA_IND/LL_UNITDATA_IND to SNDCP */ - llc_prim_tx = gprs_llc_prim_alloc_ll_unitdata_ind(lle->llme->tlli, - pdu_dec.sapi, - pdu_dec.data, - pdu_dec.data_len); - llc_prim_tx->ll.unitdata_ind.apply_gea = !drop_cipherable; /* TODO: is this correct? */ - llc_prim_tx->ll.unitdata_ind.apply_gia = false; /* TODO: how to set this? */ - gprs_llc_prim_call_up_cb(llc_prim_tx); - break; - case OSMO_GPRS_LLC_SAPI_SMS: - /* FIXME */ - case OSMO_GPRS_LLC_SAPI_TOM2: - case OSMO_GPRS_LLC_SAPI_TOM8: - /* FIXME: send LL_DATA_IND/LL_UNITDATA_IND to TOM */ - default: - LOGLLC(LOGL_NOTICE, "Unsupported SAPI %u\n", pdu_dec.sapi); - rc = -EINVAL; - break; - } - } + rc = gprs_llc_lle_rx_unitdata_ind(lle, llc_prim->bssgp.ll_pdu, llc_prim->bssgp.ll_pdu_len, &pdu_dec); return rc; } diff --git a/src/llc/llc_grr.c b/src/llc/llc_grr.c index 8486a53..e6d1cf7 100644 --- a/src/llc/llc_grr.c +++ b/src/llc/llc_grr.c @@ -1,6 +1,6 @@ -/* GPRS LLC LLGM SAP as per 3GPP TS 44.064 7.2.3 */ +/* GPRS LLC GRR SAP as per 3GPP TS 44.064 7.2.3, 3GPP TS 24.007 */ /* - * (C) 2022 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> + * (C) 2022-2023 by sysmocom - s.f.m.c. GmbH <info(a)sysmocom.de> * * All Rights Reserved * @@ -38,6 +38,42 @@ { 0, NULL } }; +/******************************** + * Primitive allocation: + ********************************/ + +static inline struct osmo_gprs_llc_prim *llc_prim_grr_alloc(enum osmo_gprs_llc_grr_prim_type type, + enum osmo_prim_operation operation, + unsigned int l3_len) +{ + return gprs_llc_prim_alloc(OSMO_GPRS_LLC_SAP_GRR, type, operation, l3_len); +} + +/* 7.2.3.2 GRR-UNITDATA.ind (MS):*/ +struct osmo_gprs_llc_prim *osmo_gprs_llc_prim_alloc_grr_unitdata_ind( + uint32_t tlli, uint8_t *ll_pdu, + size_t ll_pdu_len) +{ + struct osmo_gprs_llc_prim *llc_prim; + llc_prim = llc_prim_grr_alloc(OSMO_GPRS_LLC_GRR_UNITDATA, PRIM_OP_INDICATION, ll_pdu_len); + llc_prim->grr.tlli = tlli; + llc_prim->grr.ll_pdu = ll_pdu; + llc_prim->grr.ll_pdu_len = ll_pdu_len; + return llc_prim; +} + +/* 7.2.3.2 GRR-UL-UNITDATA.req (MS):*/ +struct osmo_gprs_llc_prim *gprs_llc_prim_alloc_grr_unitdata_req( + uint32_t tlli, uint8_t *ll_pdu, size_t ll_pdu_len) +{ + struct osmo_gprs_llc_prim *llc_prim; + llc_prim = llc_prim_grr_alloc(OSMO_GPRS_LLC_GRR_UNITDATA, PRIM_OP_REQUEST, ll_pdu_len); + llc_prim->grr.tlli = tlli; + llc_prim->grr.ll_pdu = ll_pdu; + llc_prim->grr.ll_pdu_len = ll_pdu_len; + return llc_prim; +} + static int llc_prim_handle_grr_data_ind(struct osmo_gprs_llc_prim *llc_prim) { int rc = gprs_llc_prim_handle_unsupported(llc_prim); @@ -46,7 +82,50 @@ static int llc_prim_handle_grr_unitdata_ind(struct osmo_gprs_llc_prim *llc_prim) { - int rc = gprs_llc_prim_handle_unsupported(llc_prim); + int rc; + struct gprs_llc_pdu_decoded pdu_dec = {0}; + const char *llc_pdu_name = NULL; + struct gprs_llc_lle *lle = NULL; + + rc = gprs_llc_pdu_decode(&pdu_dec, llc_prim->grr.ll_pdu, llc_prim->grr.ll_pdu_len); + if (rc < 0) { + LOGLLC(LOGL_ERROR, "%s: Error parsing LLC header\n", osmo_gprs_llc_prim_name(llc_prim)); + return rc; + } + llc_pdu_name = gprs_llc_pdu_hdr_dump(&pdu_dec); + + LOGLLC(LOGL_DEBUG, "Rx %s: %s\n", osmo_gprs_llc_prim_name(llc_prim), llc_pdu_name); + + switch (gprs_tlli_type(llc_prim->bssgp.tlli)) { + case TLLI_LOCAL: + case TLLI_FOREIGN: + case TLLI_RANDOM: + case TLLI_AUXILIARY: + break; + default: + LOGLLC(LOGL_ERROR, "%s: Discarding frame with strange TLLI type\n", llc_pdu_name); + return -EINVAL; + } + + lle = gprs_llc_lle_for_rx_by_tlli_sapi(llc_prim->grr.tlli, pdu_dec.sapi, pdu_dec.func); + if (!lle) { + switch (pdu_dec.sapi) { + case OSMO_GPRS_LLC_SAPI_SNDCP3: + case OSMO_GPRS_LLC_SAPI_SNDCP5: + case OSMO_GPRS_LLC_SAPI_SNDCP9: + case OSMO_GPRS_LLC_SAPI_SNDCP11: +#if 0 +/* TODO: probaby send some primitive to the upper layers (GMM) */ + /* Ask an upper layer for help. */ + return gsm0408_gprs_force_reattach_oldmsg(msg, NULL); +#endif + default: + break; + } + return 0; + } + rc = gprs_llc_lle_rx_unitdata_ind(lle, llc_prim->grr.ll_pdu, llc_prim->grr.ll_pdu_len, &pdu_dec); + return rc; } diff --git a/tests/llc/llc_prim_test.c b/tests/llc/llc_prim_test.c index ab3bf65..3e3dc82 100644 --- a/tests/llc/llc_prim_test.c +++ b/tests/llc/llc_prim_test.c @@ -65,7 +65,8 @@ switch (llc_prim->oph.sap) { case OSMO_GPRS_LLC_SAP_GRR: - printf("%s(): Rx %s l3=[%s]\n", __func__, pdu_name, osmo_hexdump(llc_prim->grr.ll_pdu, llc_prim->grr.ll_pdu_len)); + printf("%s(): Rx %s l3=[%s]\n", __func__, pdu_name, + osmo_hexdump(llc_prim->grr.ll_pdu, llc_prim->grr.ll_pdu_len)); break; case OSMO_GPRS_LLC_SAP_BSSGP: printf("%s(): Rx %s TLLI=0x%08x l3=[%s]\n", __func__, pdu_name, @@ -78,27 +79,39 @@ return 0; } -static void test_llc_prim_ms(void) -{ - //struct osmo_gprs_llc_prim *llc_prim; - //uint32_t tlli = 0x11223344; - int rc; - - printf("==== %s() [start] ====\n", __func__); - - rc = osmo_gprs_llc_init(OSMO_GPRS_LLC_LOCATION_MS, NULL); - OSMO_ASSERT(rc == 0); - - osmo_gprs_llc_prim_set_up_cb(test_llc_prim_up_cb, NULL); - osmo_gprs_llc_prim_set_down_cb(test_llc_prim_down_cb, NULL); - - //llc_prim = osmo_gprs_llc_prim_alloc_llgm_reset_req(tlli); - //OSMO_ASSERT(llc_prim); - //rc = osmo_gprs_llc_prim_upper_down(llc_prim); - //OSMO_ASSERT(rc == 0); - - printf("==== %s() [end] ====\n", __func__); -} +/* +GSM A-I/F DTAP - Attach Request + Protocol Discriminator: GPRS mobility management messages (8) + DTAP GPRS Mobility Management Message Type: Attach Request (0x01) + MS Network Capability + Length: 2 + 1... .... = GEA/1: Encryption algorithm available + .1.. .... = SM capabilities via dedicated channels: Mobile station supports mobile terminated point to point SMS via dedicated signalling channels + ..1. .... = SM capabilities via GPRS channels: Mobile station supports mobile terminated point to point SMS via GPRS packet data channels + ...0 .... = UCS2 support: The ME has a preference for the default alphabet (defined in 3GPP TS 23.038 [8b]) over UCS2 + .... 01.. = SS Screening Indicator: capability of handling of ellipsis notation and phase 2 error handling (0x1) + .... ..0. = SoLSA Capability: The ME does not support SoLSA + .... ...1 = Revision level indicator: Used by a mobile station supporting R99 or later versions of the protocol + 1... .... = PFC feature mode: Mobile station does support BSS packet flow procedures + .110 000. = Extended GEA bits: 0x30 + .... ...0 = LCS VA capability: LCS value added location request notification capability not supported + Attach Type + Ciphering Key Sequence Number + DRX Parameter + Mobile Identity - TMSI/P-TMSI (0xf43cec71) + Routing Area Identification - Old routing area identification - RAI: 234-70-5-0 + MS Radio Access Capability + GPRS Timer - Ready Timer + Element ID: 0x17 + GPRS Timer: 10 sec + 000. .... = Unit: value is incremented in multiples of 2 seconds (0) + ...0 0101 = Timer value: 5 +*/ +static uint8_t pdu_gmmm_attach_req[] = { + 0x08, 0x01, 0x02, 0xe5, 0xe0, 0x01, 0x0a, 0x00, 0x05, 0xf4, 0xf4, 0x3c, 0xec, 0x71, 0x32, 0xf4, + 0x07, 0x00, 0x05, 0x00, 0x17, 0x19, 0x33, 0x43, 0x2b, 0x37, 0x15, 0x9e, 0xf9, 0x88, 0x79, 0xcb, + 0xa2, 0x8c, 0x66, 0x21, 0xe7, 0x26, 0x88, 0xb1, 0x98, 0x87, 0x9c, 0x00, 0x17, 0x05 +}; /** MS-SGSN LLC (Mobile Station - Serving GPRS Support Node Logical Link Control) SAPI: GPRS Mobility Management @@ -139,6 +152,36 @@ */ static uint8_t pdu_gmm_id_req[] = { 0x08, 0x15, 0x02 }; +static void test_llc_prim_ms(void) +{ + struct osmo_gprs_llc_prim *llc_prim; + uint32_t tlli = 0xf43cec71; + int rc; + + printf("==== %s() [start] ====\n", __func__); + + rc = osmo_gprs_llc_init(OSMO_GPRS_LLC_LOCATION_MS, NULL); + OSMO_ASSERT(rc == 0); + + osmo_gprs_llc_prim_set_up_cb(test_llc_prim_up_cb, NULL); + osmo_gprs_llc_prim_set_down_cb(test_llc_prim_down_cb, NULL); + + /* Tx GMM Attach Request */ + llc_prim = osmo_gprs_llc_prim_alloc_ll_unitdata_req(tlli, OSMO_GPRS_LLC_SAPI_GMM, (uint8_t *)pdu_gmmm_attach_req, sizeof(pdu_gmmm_attach_req)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_llc_prim_upper_down(llc_prim); + OSMO_ASSERT(rc == 0); + + /* Rx LLC-GMM-Attach-Req at MS from SGSN (should be a response message + * but we don't care about upper layers here): */ + llc_prim = osmo_gprs_llc_prim_alloc_grr_unitdata_ind(tlli, pdu_llc_gmm_att_req, sizeof(pdu_llc_gmm_att_req)); + OSMO_ASSERT(llc_prim); + rc = osmo_gprs_llc_prim_lower_up(llc_prim); + OSMO_ASSERT(rc == 0); + + printf("==== %s() [end] ====\n", __func__); +} + static void test_llc_prim_sgsn(void) { struct osmo_gprs_llc_prim *llc_prim; diff --git a/tests/llc/llc_prim_test.err b/tests/llc/llc_prim_test.err index 5bc0481..2c38469 100644 --- a/tests/llc/llc_prim_test.err +++ b/tests/llc/llc_prim_test.err @@ -1,3 +1,8 @@ +DLGLOBAL INFO Rx from upper layers: LL-UNITDATA.request +DLGLOBAL NOTICE Rx LL-UNITDATA.request: unknown TLLI 0xf43cec71, creating LLME on the fly +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 lower layers: BSSGP-UL-UNITDATA.indication DLGLOBAL DEBUG Rx BSSGP-UL-UNITDATA.indication: SAPI=1 (GMM), UI func=UI C/R=0 PM=0 E=0 IP=0 N(U)=0 FCS=f218e2 DLGLOBAL NOTICE LLME(ffffffff/e1c5d364){UNASSIGNED} LLC RX: unknown TLLI 0xe1c5d364, creating LLME on the fly diff --git a/tests/llc/llc_prim_test.ok b/tests/llc/llc_prim_test.ok index 3193fed..4534568 100644 --- a/tests/llc/llc_prim_test.ok +++ b/tests/llc/llc_prim_test.ok @@ -1,4 +1,6 @@ ==== 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_ms() [end] ==== ==== test_llc_prim_sgsn() [start] ==== test_llc_prim_up_cb(): Rx LL-UNITDATA.indication TLLI=0xe1c5d364 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 ] -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I6a4454b4aa2c96e1f4ce7e2a5d5aba8ec1cf3f60 Gerrit-Change-Number: 31049 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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-CC: arehbein <arehbein(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-gprs[master]: llc: Initial support for GRR-UNITDATA.ind/req
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31049 ) Change subject: llc: Initial support for GRR-UNITDATA.ind/req ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31049 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I6a4454b4aa2c96e1f4ce7e2a5d5aba8ec1cf3f60 Gerrit-Change-Number: 31049 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(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-CC: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:02:39 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: osmo-bsc: Fix 'apply-config-file' CTRL command
by pespin 25 Jan '23

25 Jan '23
Attention is currently required from: arehbein, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31029 ) Change subject: osmo-bsc: Fix 'apply-config-file' CTRL command ...................................................................... Patch Set 2: Code-Review+2 (1 comment) File src/osmo-bsc/bsc_ctrl.c: https://gerrit.osmocom.org/c/osmo-bsc/+/31029/comment/5a93abad_b632990f PS2, Line 89: cmd->reply = talloc_asprintf(cmd, "Errors in neighbor configuration"); > why is it too specific? The error message is only printed in case neighbors_check_cfg() is failing. […] Ah I misread the function being called, I thought the function validating the whole BTS config was being called here, which checks several things. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I24ae8cd7e5e0d15eab9fd04b1858072bf0bad36a Gerrit-Change-Number: 31029 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: arehbein <arehbein(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Wed, 25 Jan 2023 13:02:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge <laforge(a)osmocom.org> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: jobs/master,gerrit: fix pysim, sysmo-usim-tool
by osmith 25 Jan '23

25 Jan '23
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/31054 ) Change subject: jobs/master,gerrit: fix pysim, sysmo-usim-tool ...................................................................... jobs/master,gerrit: fix pysim, sysmo-usim-tool Don't attempt to create the CCACHE_DIR and chown it to osmocom-build for the simtester jenkins node, and more generally all that were not created with the ansible provisioning scripts. In case of simtester, there is no osmocom-build user and we don't have the space there to use ccache. Fix for: chown: invalid user: ‘osmocom-build:osmocom-build’ Related: OS#5848 Change-Id: I339d9ba4ad0c959d7325820eb53bfa1f0e04c164 --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 10 insertions(+), 10 deletions(-) Approvals: osmith: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 40e7d68..56470df 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -61,6 +61,10 @@ -w /build -i -u build \ -v "$PWD:/build" \ docker_run_ccache: | + CCACHE_DIR="$HOME/ccache/gerrit-verifications" + mkdir -p "$CCACHE_DIR" + chown osmocom-build:osmocom-build "$CCACHE_DIR" + docker run --rm=true \ --cap-add SYS_PTRACE \ -e ASCIIDOC_WARNINGS_CHECK="1" \ @@ -76,7 +80,7 @@ \ -e CCACHE_DIR="/ccache" \ -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ - -v "$HOME/ccache/gerrit-verifications:/ccache" \ + -v "$CCACHE_DIR:/ccache" \ docker_img: '$USER/debian-buster-jenkins' docker_img_erlang: '$USER/debian-bullseye-erlang' timeout_cmd: '/usr/bin/timeout 30m' @@ -696,10 +700,6 @@ description: set by gerrit-{repos} job builders: - - shell: |- - CCACHE_DIR="$HOME/ccache/gerrit-verifications" - mkdir -p "$CCACHE_DIR" - chown osmocom-build:osmocom-build "$CCACHE_DIR" - shell: '{obj:cmd}' publishers: diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index fb05c53..ab1a0e2 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -39,6 +39,10 @@ -v "$PWD:/build" \ -v "$HOME/.ssh:/home/build/.ssh:ro" \ docker_run_ccache: | + CCACHE_DIR="$HOME/ccache/master-builds" + mkdir -p "$CCACHE_DIR" + chown osmocom-build:osmocom-build "$CCACHE_DIR" + docker run --rm=true \ --cap-add SYS_PTRACE \ -e ASCIIDOC_WARNINGS_CHECK="1" \ @@ -58,7 +62,7 @@ \ -e CCACHE_DIR="/ccache" \ -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ - -v "$HOME/ccache/master-builds:/ccache" \ + -v "$CCACHE_DIR:/ccache" \ docker_img: '$USER/debian-buster-jenkins' timeout_cmd: '/usr/bin/timeout 30m' cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' @@ -566,10 +570,6 @@ - timed: "H H * * *" builders: - - shell: |- - CCACHE_DIR="$HOME/ccache/master-builds" - mkdir -p "$CCACHE_DIR" - chown osmocom-build:osmocom-build "$CCACHE_DIR" - shell: '{obj:cmd}' publishers: 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I339d9ba4ad0c959d7325820eb53bfa1f0e04c164 Gerrit-Change-Number: 31054 Gerrit-PatchSet: 5 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ci[master]: jobs/master,gerrit: fix pysim, sysmo-usim-tool
by osmith 25 Jan '23

25 Jan '23
osmith has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/31054 ) Change subject: jobs/master,gerrit: fix pysim, sysmo-usim-tool ...................................................................... Patch Set 5: Verified+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: I339d9ba4ad0c959d7325820eb53bfa1f0e04c164 Gerrit-Change-Number: 31054 Gerrit-PatchSet: 5 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 25 Jan 2023 12:59:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ci[master]: jobs/master,gerrit: add docker_run_ccache
by osmith 25 Jan '23

25 Jan '23
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/31053 ) Change subject: jobs/master,gerrit: add docker_run_ccache ...................................................................... jobs/master,gerrit: add docker_run_ccache Put arguments for ccache into a new docker_run_ccache variable, and use it with all projects where it makes sense to use ccache. Other projects use docker_run without the ccache parameters again: * osmo_ss7, osmo_dia2gsup, pysim: Erlang/Python projects * osmo-e1-hardware, ice40-usbtrace, no2bootloader, osmo-opencm3-projects: Don't use the default docker image * osmo-gsm-tester: Only builds manuals (jenkins-build-manuals.sh) Jenkins job builder's variable substitution doesn't replace {docker_run} inside docker_run_ccache when used in cmd, so just duplicate the lines. Related: OS#5848 Change-Id: Ib6d7f309b972979d3a3bc87f8fcf71f9e930c0da --- M jobs/gerrit-verifications.yml M jobs/master-builds.yml 2 files changed, 61 insertions(+), 29 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index e66a047..40e7d68 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -51,22 +51,36 @@ docker run --rm=true \ --cap-add SYS_PTRACE \ -e ASCIIDOC_WARNINGS_CHECK="1" \ - -e CCACHE_DIR="/ccache" \ -e HOME=/build \ -e JOB_NAME="$JOB_NAME" \ -e MAKE=make \ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ - -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ -e PARALLEL_MAKE="$PARALLEL_MAKE" \ -e WITH_MANUALS="1" \ -w /build -i -u build \ - -v "$HOME/ccache/gerrit-verifications:/ccache" \ -v "$PWD:/build" \ + docker_run_ccache: | + docker run --rm=true \ + --cap-add SYS_PTRACE \ + -e ASCIIDOC_WARNINGS_CHECK="1" \ + -e HOME=/build \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e WITH_MANUALS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" \ + \ + -e CCACHE_DIR="/ccache" \ + -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + -v "$HOME/ccache/gerrit-verifications:/ccache" \ docker_img: '$USER/debian-buster-jenkins' docker_img_erlang: '$USER/debian-bullseye-erlang' timeout_cmd: '/usr/bin/timeout 30m' - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' gerrit_url: 'ssh://jenkins@gerrit.osmocom.org:29418' repos_url: '{gerrit_url}/{repos}' gerrit_project: '{repos}' @@ -98,7 +112,7 @@ a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' - libsmpp34 @@ -115,7 +129,7 @@ a3_name: IU a3: !!python/tuple [--disable-iu] cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e SMPP="$SMPP" \ -e MGCP="$MGCP" \ @@ -157,7 +171,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e WITH_MANUALS="$WITH_MANUALS" \ "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins_bts_model.sh "$BTS_MODEL" @@ -197,7 +211,7 @@ (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") || (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e GTP="$GTP" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -207,7 +221,7 @@ - osmo_gsup: repos_url: '{gerrit_url}/erlang/{repos}' gerrit_project: 'erlang/{repos}' - cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + cmd: '{docker_run_ccache} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' pipeline_binpkgs: false - osmo-hlr @@ -223,7 +237,7 @@ (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -253,7 +267,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e with_vty="$with_vty" \ -e with_dsp="$with_dsp" \ @@ -273,7 +287,7 @@ (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -302,7 +316,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e INSTR="$INSTR" \ -e WITH_MANUALS="$WITH_MANUALS" \ "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index c0b7ea0..fb05c53 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -25,25 +25,43 @@ docker run --rm=true \ --cap-add SYS_PTRACE \ -e ASCIIDOC_WARNINGS_CHECK="1" \ - -e CCACHE_DIR="/ccache" \ -e HOME=/build \ -e JOB_NAME="$JOB_NAME" \ -e MAKE=make \ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ - -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ -e PARALLEL_MAKE="$PARALLEL_MAKE" \ -e PUBLISH="1" \ -e SSH_AUTH_SOCK=/ssh-agent \ -e WITH_MANUALS="1" \ -w /build -i -u build \ -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \ - -v "$HOME/ccache/master-builds:/ccache" \ -v "$PWD:/build" \ -v "$HOME/.ssh:/home/build/.ssh:ro" \ + docker_run_ccache: | + docker run --rm=true \ + --cap-add SYS_PTRACE \ + -e ASCIIDOC_WARNINGS_CHECK="1" \ + -e HOME=/build \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PUBLISH="1" \ + -e SSH_AUTH_SOCK=/ssh-agent \ + -e WITH_MANUALS="1" \ + -w /build -i -u build \ + -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \ + -v "$PWD:/build" \ + -v "$HOME/.ssh:/home/build/.ssh:ro" \ + \ + -e CCACHE_DIR="/ccache" \ + -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + -v "$HOME/ccache/master-builds:/ccache" \ docker_img: '$USER/debian-buster-jenkins' timeout_cmd: '/usr/bin/timeout 30m' - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' trigger: email: jenkins-notifications(a)lists.osmocom.org laforge(a)gnumonks.org git_base_url: https://gerrit.osmocom.org @@ -81,7 +99,7 @@ - libosmo-dsp: git_base_url: https://gitea.osmocom.org/sdr cmd: | - {docker_run} \ + {docker_run_ccache} \ {docker_img} {timeout_cmd} sh -ex -c \ 'autoreconf -fi; \ ./configure; \ @@ -142,7 +160,7 @@ a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' # Full triggers would be: # trigger: > # master-libosmo-abis, master-libosmo-netif, master-libosmo-sccp, master-openbsc, @@ -205,7 +223,7 @@ a3_name: IU a3: !!python/tuple [--disable-iu] cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e SMPP="$SMPP" \ -e MGCP="$MGCP" \ @@ -239,7 +257,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e WITH_MANUALS="$WITH_MANUALS" \ "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins_bts_model.sh "$BTS_MODEL" @@ -289,7 +307,7 @@ (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") || (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e GTP="$GTP" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -331,7 +349,7 @@ (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -360,7 +378,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e with_vty="$with_vty" \ -e with_dsp="$with_dsp" \ @@ -376,7 +394,7 @@ (IU == "--enable-iu" && WITH_MANUALS == "0") || (IU == "--disable-iu" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ {docker_img} {timeout_cmd} /build/contrib/jenkins.sh @@ -403,7 +421,7 @@ case "$(arch)" in arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; esac - {docker_run} \ + {docker_run_ccache} \ -e INSTR="$INSTR" \ -e WITH_MANUALS="$WITH_MANUALS" \ "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh @@ -412,19 +430,19 @@ - osmo-sysmon - osmo-remsim - osmo-asf4-dfu: - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' email: jenkins-notifications(a)lists.osmocom.org laforge(a)gnumonks.org ewild(a)sysmocom.de ssh: - binaries_ftp.osmocom.org - docs_ftp.osmocom.org - osmo-ccid-firmware: - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' email: jenkins-notifications(a)lists.osmocom.org laforge(a)gnumonks.org ewild(a)sysmocom.de ssh: - binaries_ftp.osmocom.org - docs_ftp.osmocom.org - simtrace2: - cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' email: jenkins-notifications(a)lists.osmocom.org laforge(a)gnumonks.org kredon(a)sysmocom.de ssh: - binaries_ftp.osmocom.org -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31053 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Ib6d7f309b972979d3a3bc87f8fcf71f9e930c0da Gerrit-Change-Number: 31053 Gerrit-PatchSet: 3 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)gnumonks.org> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • ...
  • 221
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.