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 2023

  • 1 participants
  • 1947 discussions
[S] Change in osmo-pcu[master]: osmobts_sock: cosmetic, put a dot between "v" and version number
by dexter 01 Sep '23

01 Sep '23
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34239 ) Change subject: osmobts_sock: cosmetic, put a dot between "v" and version number ...................................................................... Patch Set 3: (2 comments) Patchset: PS3: See now: Ibe49064d04dff0617357e3e0b00fea961b657784 and Ic7f6246265fa31be189e4aea36dfaa89bd0eeddd File src/osmobts_sock.c: https://gerrit.osmocom.org/c/osmo-pcu/+/34239/comment/235a175e_bede6cee PS2, Line 220: to OsmoBTS > Would be more useful to change this part to `to OsmoBTS/OsmoBSC` or even remove it completely, since […] Done -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7c70c4d4440fa9885e1efb80e6f2e4e821ac916f Gerrit-Change-Number: 34239 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 01 Sep 2023 09:57:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-pcu[master]: osmobts_sock: cosmetic: rename osmobts_sock.c to pcuif_sock.c
by dexter 01 Sep '23

01 Sep '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34274 ) Change subject: osmobts_sock: cosmetic: rename osmobts_sock.c to pcuif_sock.c ...................................................................... osmobts_sock: cosmetic: rename osmobts_sock.c to pcuif_sock.c since OsmoPCU is no longer exclusively used in co-location to OsmoBTS the module osmobts_sock (PCUIF) should get a more generic name. Related: OS#5927 Change-Id: Ic7f6246265fa31be189e4aea36dfaa89bd0eeddd --- M src/Makefile.am R src/pcuif_sock.c 2 files changed, 14 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/74/34274/1 diff --git a/src/Makefile.am b/src/Makefile.am index ded6632..8b8f31e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,7 +82,7 @@ rlc_window.cpp \ rlc_window_dl.cpp \ rlc_window_ul.cpp \ - osmobts_sock.c \ + pcuif_sock.c \ gprs_codel.c \ coding_scheme.c \ egprs_rlc_compression.cpp \ diff --git a/src/osmobts_sock.c b/src/pcuif_sock.c similarity index 100% rename from src/osmobts_sock.c rename to src/pcuif_sock.c -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34274 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic7f6246265fa31be189e4aea36dfaa89bd0eeddd Gerrit-Change-Number: 34274 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-pcu[master]: pcuif_sock: improve log output (OsmoBTS/OsmoBSC)
by dexter 01 Sep '23

01 Sep '23
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34275 ) Change subject: pcuif_sock: improve log output (OsmoBTS/OsmoBSC) ...................................................................... pcuif_sock: improve log output (OsmoBTS/OsmoBSC) When printing the PCUIF protocol version, we only mention OsmoBTS, but since OsmoPCU can also be used in co-location with OsmoBSC, we should also mention OsmoBSC here. Let's write "OsmoBTS/OsmoBSC" Related: OS#5927 Change-Id: Ibe49064d04dff0617357e3e0b00fea961b657784 --- M src/pcuif_sock.c 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/34275/1 diff --git a/src/pcuif_sock.c b/src/pcuif_sock.c index c77605f..f8c0ecc 100644 --- a/src/pcuif_sock.c +++ b/src/pcuif_sock.c @@ -217,7 +217,7 @@ int pcu_l1if_open(void) { int rc; - LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface v%u to OsmoBTS\n", PCU_IF_VERSION); + LOGP(DL1IF, LOGL_INFO, "Opening OsmoPCU L1 interface v%u to OsmoBTS/OsmoBSC\n", PCU_IF_VERSION); memset(&pcu_sock_state, 0x00, sizeof(pcu_sock_state)); INIT_LLIST_HEAD(&pcu_sock_state.upqueue); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34275 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibe49064d04dff0617357e3e0b00fea961b657784 Gerrit-Change-Number: 34275 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in osmo-pcu[master]: osmobts_sock: cosmetic, put a dot between "v" and version number
by dexter 01 Sep '23

01 Sep '23
dexter has abandoned this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34239 ) Change subject: osmobts_sock: cosmetic, put a dot between "v" and version number ...................................................................... Abandoned -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34239 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7c70c4d4440fa9885e1efb80e6f2e4e821ac916f Gerrit-Change-Number: 34239 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: abandon
1 0
0 0
[S] Change in osmo-bts[master]: pcu_sock: print SAPI and msg_id when sending confirmation
by dexter 01 Sep '23

01 Sep '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34240 ) Change subject: pcu_sock: print SAPI and msg_id when sending confirmation ...................................................................... pcu_sock: print SAPI and msg_id when sending confirmation At the moment we do not print the SAPI, nor the msg_id when we send a confirmation back to the PCU Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 elated: OS#5927 --- M src/common/pcu_sock.c 1 file changed, 15 insertions(+), 1 deletion(-) Approvals: pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index e100464..f99c7d2 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -628,7 +628,8 @@ /* FIXME: allow multiple BTS */ bts = llist_entry(g_bts_sm->bts_list.next, struct gsm_bts, list); - LOGP(DPCU, LOGL_DEBUG, "Sending PCH confirm\n"); + LOGP(DPCU, LOGL_DEBUG, "Sending DATA.cnf: sapi=%s msg_id=%08x\n", + sapi_string[sapi], msg_id); msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_2, bts->nr); if (!msg) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34240 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ibd5b4225e597b69eaabaeee437fb637943a55602 Gerrit-Change-Number: 34240 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bsc[master]: pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH
by dexter 01 Sep '23

01 Sep '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34060 ) Change subject: pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH ...................................................................... pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH In PCUIF v.11 we use PCU_IF_SAPI_AGCH_2 exclusively. We use this SAPI to transfer IMMEDIATE ASSIGNMENT messages for uplink and downlink. One new feature of PCU_IF_SAPI_AGCH_2 is that the PCU may ask to send a confirmation when the MAC block is sent. CAUTION: This patch breaks compatibility to current master osmo-pcu (See also "Depends") Related: OS#5927 Depends: osmo-pcu.git I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292 Change-Id: I709c27adaf09a6766cfde4d76d878626d30ebb3c --- M include/osmocom/bsc/pcu_if.h M include/osmocom/bsc/pcuif_proto.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/pcu_sock.c 4 files changed, 60 insertions(+), 13 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/bsc/pcu_if.h b/include/osmocom/bsc/pcu_if.h index d2d3444..6a07f2e 100644 --- a/include/osmocom/bsc/pcu_if.h +++ b/include/osmocom/bsc/pcu_if.h @@ -24,8 +24,8 @@ int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, uint8_t is_11bit, enum ph_burst_type burst_type); -/* Confirm the sending of an immediate assignment to the pcu */ -int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t msg_id); +/* Confirm the sending of an AGCH or PCH MAC block to the pcu */ +int pcu_tx_data_cnf(struct gsm_bts *bts, uint32_t msg_id, uint8_t sapi); /* Open connection to PCU */ int pcu_sock_init(struct gsm_network *net); diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h index aa22447..cd2a298 100644 --- a/include/osmocom/bsc/pcuif_proto.h +++ b/include/osmocom/bsc/pcuif_proto.h @@ -42,6 +42,7 @@ #define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ #define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ #define PCU_IF_SAPI_PCH_2 0x08 /* assignment on PCH (confirmed using message id) */ +#define PCU_IF_SAPI_AGCH_2 0x09 /* assignment on AGCH (confirmed using message id) */ /* flags */ #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ @@ -276,6 +277,18 @@ bool confirm; } __attribute__((packed)); +/* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The struct is sent as a data request + * (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */ +struct gsm_pcu_if_agch { + /* message id as reference for confirmation */ + uint32_t msg_id; + /* GSM mac-block (with immediate assignment message) */ + uint8_t data[GSM_MACBLOCK_LEN]; + /* Set to true in case the receiving end must send a confirmation + * when the MAC block (data) has been sent. */ + bool confirm; +} __attribute__((packed)); + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 76948c9..860e4a2 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -44,6 +44,7 @@ #include <osmocom/gsm/rsl.h> #include <osmocom/core/talloc.h> #include <osmocom/bsc/pcu_if.h> +#include <osmocom/bsc/pcuif_proto.h> #include <osmocom/bsc/gsm_08_08.h> #include <osmocom/netif/rtp.h> #include <osmocom/core/tdef.h> @@ -2567,7 +2568,7 @@ else { msgb_pull(msg, 1); /* drop previous data to use msg_pull_u32 */ msg_id = msgb_pull_u32(msg); - pcu_tx_pch_confirm(sign_link->trx->bts, msg_id); + pcu_tx_data_cnf(sign_link->trx->bts, msg_id, PCU_IF_SAPI_PCH_2); } return 0; } diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c index 696d5f3..dc2b8e9 100644 --- a/src/osmo-bsc/pcu_sock.c +++ b/src/osmo-bsc/pcu_sock.c @@ -57,6 +57,7 @@ [PCU_IF_SAPI_PRACH] = "PRACH", [PCU_IF_SAPI_PTCCH] = "PTCCH", [PCU_IF_SAPI_PCH_2] = "PCH_2", + [PCU_IF_SAPI_AGCH_2] = "AGCH_2", }; bool pcu_connected(const struct gsm_network *net) @@ -435,14 +436,14 @@ return pcu_sock_send(bts->network, msg); } -/* Confirm the sending of an immediate assignment to the pcu */ -int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t msg_id) +int pcu_tx_data_cnf(struct gsm_bts *bts, uint32_t msg_id, uint8_t sapi) { struct msgb *msg; struct gsm_pcu_if *pcu_prim; struct gsm_pcu_if_data_cnf *data_cnf; - LOG_BTS(bts, DPCU, LOGL_INFO, "Sending PCH confirm with message id\n"); + LOGP(DPCU, LOGL_DEBUG, "Sending DATA.cnf: sapi=%s msg_id=%08x\n", + sapi_string[sapi], msg_id); msg = pcu_msgb_alloc(PCU_IF_MSG_DATA_CNF_2, bts->nr); if (!msg) @@ -450,7 +451,7 @@ pcu_prim = (struct gsm_pcu_if *) msg->data; data_cnf = &pcu_prim->u.data_cnf2; - data_cnf->sapi = PCU_IF_SAPI_PCH_2; + data_cnf->sapi = sapi; data_cnf->msg_id = msg_id; return pcu_sock_send(bts->network, msg); @@ -528,8 +529,9 @@ { uint8_t pag_grp; int rc = 0; - struct gsm_pcu_if_pch *pch; - struct gsm48_imm_ass *gsm48_imm_ass; + const struct gsm_pcu_if_pch *pch; + const struct gsm_pcu_if_agch *agch; + const struct gsm48_imm_ass *gsm48_imm_ass; LOG_BTS(bts, DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d " "block=%d data=%s\n", sapi_string[data_req->sapi], @@ -537,9 +539,21 @@ osmo_hexdump(data_req->data, data_req->len)); switch (data_req->sapi) { - case PCU_IF_SAPI_AGCH: - if (rsl_imm_assign_cmd(bts, data_req->len, data_req->data)) - rc = -EIO; + case PCU_IF_SAPI_AGCH_2: + if (data_req->len < sizeof(struct gsm_pcu_if_agch)) { + LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n", + data_req->len); + break; + } + + agch = (struct gsm_pcu_if_agch *)data_req->data; + if (rsl_imm_assign_cmd(bts, GSM_MACBLOCK_LEN, agch->data)) + return -EIO; + + /* Send the confirmation immediately. This is as accurate as we can get since from this point on the + * BTS hardware is responsible to schedule the sending of the IMMEDIATE ASSIGNMENT */ + if (agch->confirm) + return pcu_tx_data_cnf(bts, agch->msg_id, PCU_IF_SAPI_AGCH_2); break; case PCU_IF_SAPI_PCH_2: if (data_req->len < sizeof(struct gsm_pcu_if_pch)) { @@ -558,7 +572,7 @@ if (pcu_rx_rr_paging_pch(bts, pag_grp, pch)) return -EIO; if (pch->confirm) - return pcu_tx_pch_confirm(bts, pch->msg_id); + return pcu_tx_data_cnf(bts, pch->msg_id, PCU_IF_SAPI_PCH_2); break; default: LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with " -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/34060 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I709c27adaf09a6766cfde4d76d878626d30ebb3c Gerrit-Change-Number: 34060 Gerrit-PatchSet: 6 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-bts[master]: pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH
by dexter 01 Sep '23

01 Sep '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34059 ) Change subject: pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH ...................................................................... pcu_sock: use PCU_IF_SAPI_AGCH_2 instead PCU_IF_SAPI_AGCH In PCUIF v.11 we use PCU_IF_SAPI_AGCH_2 exclusively. We use this SAPI to transfer IMMEDIATE ASSIGNMENT messages for uplink and downlink. In both cases we send a confirmation back to the PCU. For details see coresponding patch in osmo-pcu.git (see Depends) CAUTION: This patch breaks compatibility to current master osmo-pcu (See also "Depends") Related: OS#5927 Depends: osmo-pcu.git I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292 Depends: osmo-ttcn3-hacks.git Iec00d8144dfb2cd8bcee9093c96a3cc98aea6458 Change-Id: I29858fa20ad8bd0aefe81a5c40ad77a2559a8c10 --- M include/osmo-bts/bts.h M include/osmo-bts/pcu_if.h M include/osmo-bts/pcuif_proto.h M src/common/bts.c M src/common/paging.c M src/common/pcu_sock.c 6 files changed, 67 insertions(+), 8 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h index b2dd024..d332935 100644 --- a/include/osmo-bts/bts.h +++ b/include/osmo-bts/bts.h @@ -442,4 +442,11 @@ int bts_set_c0_pwr_red(struct gsm_bts *bts, const uint8_t red); +/* Context information to be put in the control buffer (db) of the AGCH msg + * buffer */ +struct bts_agch_msg_cb { + uint32_t msg_id; + bool confirm; +} __attribute__ ((packed)); + #endif /* _BTS_H */ diff --git a/include/osmo-bts/pcu_if.h b/include/osmo-bts/pcu_if.h index 4b37560..3563c5b 100644 --- a/include/osmo-bts/pcu_if.h +++ b/include/osmo-bts/pcu_if.h @@ -23,7 +23,7 @@ int pcu_tx_time_ind(uint32_t fn); int pcu_tx_interf_ind(const struct gsm_bts_trx *trx, uint32_t fn); int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed); -int pcu_tx_pch_data_cnf(uint32_t msg_id); +int pcu_tx_data_cnf(uint32_t msg_id, uint8_t sapi); int pcu_tx_susp_req(struct gsm_lchan *lchan, uint32_t tlli, const uint8_t *ra_id, uint8_t cause); int pcu_sock_send(struct msgb *msg); diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 498d9d4..b47dc75 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -36,6 +36,7 @@ #define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ #define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ #define PCU_IF_SAPI_PCH_2 0x08 /* assignment on PCH (confirmed using message id) */ +#define PCU_IF_SAPI_AGCH_2 0x09 /* assignment on AGCH (confirmed using message id) */ /* flags */ #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ @@ -235,6 +236,18 @@ bool confirm; } __attribute__((packed)); +/* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The struct is sent as a data request + * (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */ +struct gsm_pcu_if_agch { + /* message id as reference for confirmation */ + uint32_t msg_id; + /* GSM mac-block (with immediate assignment message) */ + uint8_t data[GSM_MACBLOCK_LEN]; + /* Set to true in case the receiving end must send a confirmation + * when the MAC block (data) has been sent. */ + bool confirm; +} __attribute__((packed)); + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/common/bts.c b/src/common/bts.c index 0f2a019..3cd91e7 100644 --- a/src/common/bts.c +++ b/src/common/bts.c @@ -47,6 +47,7 @@ #include <osmo-bts/bts_sm.h> #include <osmo-bts/dtx_dl_amr_fsm.h> #include <osmo-bts/pcuif_proto.h> +#include <osmo-bts/pcu_if.h> #include <osmo-bts/rsl.h> #include <osmo-bts/oml.h> #include <osmo-bts/signal.h> @@ -729,6 +730,7 @@ struct msgb *msg = NULL; int rc = 0; int is_empty = 1; + const struct bts_agch_msg_cb *msg_cb; /* Do queue house keeping. * This needs to be done every time a CCCH message is requested, since @@ -759,6 +761,11 @@ rate_ctr_inc2(bts->ctrs, BTS_CTR_AGCH_SENT); + /* Confirm sending of the AGCH message towards the PCU */ + msg_cb = (struct bts_agch_msg_cb *) msg->cb; + if (msg_cb->confirm) + pcu_tx_data_cnf(msg_cb->msg_id, PCU_IF_SAPI_AGCH_2); + /* Copy AGCH message */ memcpy(out_buf, msgb_l3(msg), msgb_l3len(msg)); rc = msgb_l3len(msg); diff --git a/src/common/paging.c b/src/common/paging.c index 9738bd6..0d3877d 100644 --- a/src/common/paging.c +++ b/src/common/paging.c @@ -734,7 +734,7 @@ GSM_MACBLOCK_LEN); /* send a confirmation back (if required) */ if (pr[num_pr]->u.macblock.confirm) - pcu_tx_pch_data_cnf(pr[num_pr]->u.macblock.msg_id); + pcu_tx_data_cnf(pr[num_pr]->u.macblock.msg_id, PCU_IF_SAPI_PCH_2); talloc_free(pr[num_pr]); return GSM_MACBLOCK_LEN; } diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 333937a..e100464 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -60,6 +60,7 @@ [PCU_IF_SAPI_PRACH] = "PRACH", [PCU_IF_SAPI_PTCCH] = "PTCCH", [PCU_IF_SAPI_PCH_2] = "PCH_2", + [PCU_IF_SAPI_AGCH_2] = "AGCH_2", }; /* @@ -618,7 +619,7 @@ return pcu_sock_send(msg); } -int pcu_tx_pch_data_cnf(uint32_t msg_id) +int pcu_tx_data_cnf(uint32_t msg_id, uint8_t sapi) { struct gsm_bts *bts; struct msgb *msg; @@ -634,7 +635,7 @@ return -ENOMEM; pcu_prim = (struct gsm_pcu_if *) msg->data; pcu_prim->u.data_cnf2 = (struct gsm_pcu_if_data_cnf) { - .sapi = PCU_IF_SAPI_PCH_2, + .sapi = sapi, .msg_id = msg_id, }; @@ -688,19 +689,30 @@ gsm_pcu_if_pch->imsi, gsm_pcu_if_pch->confirm, gsm_pcu_if_pch->data); break; } - case PCU_IF_SAPI_AGCH: - msg = msgb_alloc(data_req->len, "pcu_agch"); + case PCU_IF_SAPI_AGCH_2: + { + const struct gsm_pcu_if_agch *gsm_pcu_if_agch; + struct bts_agch_msg_cb *msg_cb; + + gsm_pcu_if_agch = (struct gsm_pcu_if_agch *)data_req->data; + + msg = msgb_alloc(GSM_MACBLOCK_LEN, "pcu_agch"); if (!msg) { rc = -ENOMEM; break; } - msg->l3h = msgb_put(msg, data_req->len); - memcpy(msg->l3h, data_req->data, data_req->len); + msg->l3h = msgb_put(msg, GSM_MACBLOCK_LEN); + memcpy(msg->l3h, gsm_pcu_if_agch->data, GSM_MACBLOCK_LEN); + + msg_cb = (struct bts_agch_msg_cb *) msg->cb; + msg_cb->confirm = gsm_pcu_if_agch->confirm; + msg_cb->msg_id = gsm_pcu_if_agch->msg_id; if (bts_agch_enqueue(bts, msg) < 0) { msgb_free(msg); rc = -EIO; } break; + } case PCU_IF_SAPI_PDTCH: case PCU_IF_SAPI_PTCCH: trx = gsm_bts_trx_num(bts, data_req->trx_nr); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34059 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I29858fa20ad8bd0aefe81a5c40ad77a2559a8c10 Gerrit-Change-Number: 34059 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in osmo-pcu[master]: pcu_l1_if: add support for PCU_IF_SAPI_AGCH_2 for PCUIF v.11
by dexter 01 Sep '23

01 Sep '23
dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/34058 ) Change subject: pcu_l1_if: add support for PCU_IF_SAPI_AGCH_2 for PCUIF v.11 ...................................................................... pcu_l1_if: add support for PCU_IF_SAPI_AGCH_2 for PCUIF v.11 When a downlink IMMEDIATE ASSIGNMENT message is sent through the PCH, an IMSI is always required in order to be able to calculate the paging group. However, when the downlink IMMEDIATE ASSIGNMENT has to be sent before the MS has completed the GMM ATTACH REQUEST, the IMSI is still unknown. In this case we may assume that the MS is still in non-DRX mode, which means it listens on all CCCH blocks (PCH and AGCH). This means we may send the IMMEDIATE ASSIGNMENT through the AGCH in this situation. This will also have the advantage that the scheduling through the AGCH will have less latency than the paging queue. Unfortunately the SAPI PCU_IF_SAPI_AGCH only supports sending whole MAC blocks, so it won't be possible to attach a TLLI that can be used for confirmation. To fix this, let's add a new SAPI_PCUI_IF_AGCH_2, that works similar as SAPI PCU_IF_SAPI_PCH_2 and use it to send the IMMEDIATE ASSIGNMENT through the AGCH. CAUTION: This patch breaks compatibility with current master osmo-bts and osmo-bsc (see "Depends") Related: OS#5927 Depends: osmo-bts.git I29858fa20ad8bd0aefe81a5c40ad77a2559a8c10 Change-Id: I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292 --- M include/osmocom/pcu/pcuif_proto.h M src/bts.cpp M src/pcu_l1_if.cpp M src/pcu_l1_if.h 4 files changed, 98 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index aa22447..cd2a298 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -42,6 +42,7 @@ #define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ #define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ #define PCU_IF_SAPI_PCH_2 0x08 /* assignment on PCH (confirmed using message id) */ +#define PCU_IF_SAPI_AGCH_2 0x09 /* assignment on AGCH (confirmed using message id) */ /* flags */ #define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ @@ -276,6 +277,18 @@ bool confirm; } __attribute__((packed)); +/* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The struct is sent as a data request + * (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */ +struct gsm_pcu_if_agch { + /* message id as reference for confirmation */ + uint32_t msg_id; + /* GSM mac-block (with immediate assignment message) */ + uint8_t data[GSM_MACBLOCK_LEN]; + /* Set to true in case the receiving end must send a confirmation + * when the MAC block (data) has been sent. */ + bool confirm; +} __attribute__((packed)); + struct gsm_pcu_if { /* context based information */ uint8_t msg_type; /* message type */ diff --git a/src/bts.cpp b/src/bts.cpp index 5c483d5..0950f7a 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -1033,7 +1033,10 @@ rip->burst_type); bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_UL_TBF); if (plen >= 0) { - pcu_l1if_tx_agch(bts, bv, plen); + if (the_pcu->pcu_if_version >= 0x0b) + pcu_l1if_tx_agch2(bts, bv, plen, false, GSM_RESERVED_TMSI); + else + pcu_l1if_tx_agch(bts, bv, plen); rc = 0; } else { rc = plen; @@ -1047,8 +1050,12 @@ bv, rip->ra, rip->rfn, rip->burst_type, (uint8_t)osmo_tdef_get(bts->T_defs_bts, 3142, OSMO_TDEF_S, -1)); bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_REJ); - if (plen >= 0) - pcu_l1if_tx_agch(bts, bv, plen); + if (plen >= 0) { + if (the_pcu->pcu_if_version >= 0x0b) + pcu_l1if_tx_agch2(bts, bv, plen, false, GSM_RESERVED_TMSI); + else + pcu_l1if_tx_agch(bts, bv, plen); + } bitvec_free(bv); /* rc was already properly set before goto */ return rc; @@ -1128,10 +1135,26 @@ GSM_L1_BURST_TYPE_ACCESS_0); if (plen >= 0) { bts_do_rate_ctr_inc(bts, CTR_IMMEDIATE_ASSIGN_DL_TBF); - if (the_pcu->pcu_if_version >= 0x0b) - pcu_l1if_tx_pch2(bts, immediate_assignment, plen, true, tbf->imsi(), tbf->tlli()); - else + + if (the_pcu->pcu_if_version >= 0x0b) { + if (ms_imsi_is_valid(tbf->ms())) { + pcu_l1if_tx_pch2(bts, immediate_assignment, plen, true, tbf->imsi(), tbf->tlli()); + } else { + /* During GMM ATTACH REQUEST, the IMSI is not yet known to the PCU or SGSN. (It is + * requested after the GMM ATTACH REQUEST with the GMM IDENTITY REQUEST.) When the PCU + * has to assign a DL TBF but the IMSI is not known, then the IMMEDIATE ASSIGNMENT is + * sent on the AGCH. The reason for this is that without an IMSI we can not calculate + + the paging group, which would be necessary for transmission on PCH. Since the IMSI + * is usually only unknown during the GMM ATTACH REQUEST, we may assume that the MS + * is in non-DRX mode and hence it is listening on all CCCH blocks, including AGCH. + * + * See also: 3gpp TS 44.060, section 5.5.1.5 + * 3gpp TS 45.002, section 6.5.3, 6.5.6 */ + pcu_l1if_tx_agch2(bts, immediate_assignment, plen, true, tbf->tlli()); + } + } else { pcu_l1if_tx_pch(bts, immediate_assignment, plen, tbf->imsi()); + } } bitvec_free(immediate_assignment); diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp index f92f08e..4af6953 100644 --- a/src/pcu_l1_if.cpp +++ b/src/pcu_l1_if.cpp @@ -251,6 +251,8 @@ void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen) { + /* TODO: When PCUIF v.11 has become mainline, we will use pcu_l1if_tx_agch2() exclusively. + * This will make this function obsolote, so we can remove it. */ uint8_t data[GSM_MACBLOCK_LEN]; /* prefix PLEN */ /* FIXME: why does OpenBTS has no PLEN and no fill in message? */ @@ -263,10 +265,31 @@ pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH, 0, 0, 0, data, sizeof(data)); } +/* Send a MAC block via the access grant channel. This will (obviously) only work for MAC blocks that contain + * an IMMEDIATE ASSIGNMENT. In case the confirm flag is set, the receiving end is required to send a confirmation + * back when the IMMEDIATE ASSIGNMENT has been sent. */ +void pcu_l1if_tx_agch2(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, bool confirm, uint32_t msg_id) +{ + struct gsm_pcu_if_agch agch = { 0 }; + + agch.confirm = confirm; + agch.msg_id = msg_id; + agch.data[0] = (plen << 2) | 0x01; + bitvec_pack(block, agch.data + 1); + + if (the_pcu->gsmtap_categ_mask & (1 << PCU_GSMTAP_C_DL_AGCH)) + gsmtap_send(the_pcu->gsmtap, 0, 0, GSMTAP_CHANNEL_AGCH, 0, 0, 0, 0, agch.data, GSM_MACBLOCK_LEN); + + pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_AGCH_2, 0, 0, 0, (uint8_t*)&agch, sizeof(agch)); +} + #define IMSI_DIGITS_FOR_PAGING 3 /* Send a MAC block via the paging channel. (See also comment below) */ void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi) { + /* TODO: When PCUIF v.11 has become mainline, we will use pcu_l1if_tx_pch2() exclusively. + * This will make this function obsolote, so we can remove it. */ + uint8_t data[IMSI_DIGITS_FOR_PAGING + GSM_MACBLOCK_LEN]; /* prepend last three IMSI digits (if present) from which BTS/BSC will calculate the paging group */ @@ -561,6 +584,7 @@ switch (data_cnf->sapi) { case PCU_IF_SAPI_PCH_2: + case PCU_IF_SAPI_AGCH_2: bts_rcv_imm_ass_cnf(bts, NULL, data_cnf->msg_id); break; default: diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h index 138636d..b6da337 100644 --- a/src/pcu_l1_if.h +++ b/src/pcu_l1_if.h @@ -147,6 +147,7 @@ uint32_t fn, uint8_t block_nr, uint8_t *data, size_t data_len); void pcu_l1if_tx_agch(struct gprs_rlcmac_bts *bts, bitvec *block, int len); +void pcu_l1if_tx_agch2(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, bool confirm, uint32_t msg_id); #endif #ifdef __cplusplus -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34058 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9effdcec1da91a6e2e7a7c41f95d3300ad1bb292 Gerrit-Change-Number: 34058 Gerrit-PatchSet: 5 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> 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
[S] Change in osmo-ttcn3-hacks[master]: NAS_Templates: add template for NAS key set identifier
by dexter 01 Sep '23

01 Sep '23
Attention is currently required from: pespin. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270 ) Change subject: NAS_Templates: add template for NAS key set identifier ...................................................................... Patch Set 1: (1 comment) File library/NAS_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270/comment/df5c2d07_4cd4… PS1, Line 330: const BIT3 c_NAS_KEY_SET_ID_NO_KEY := '111'B; > enum I am not sure, but I think c_NAS_KEY_SET_ID_NO_KEY is just a reserved value to say that NO_KEY is used. The other values may be just 3 bit integers. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34270 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2df0c9d1bf4bf0073b5f7b77708b8de59f96a639 Gerrit-Change-Number: 34270 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 01 Sep 2023 08:43:56 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: NAS_Templates: add template for EPS update type
by dexter 01 Sep '23

01 Sep '23
Attention is currently required from: pespin. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269 ) Change subject: NAS_Templates: add template for EPS update type ...................................................................... Patch Set 1: (1 comment) File library/NAS_Templates.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269/comment/8f91c35b_1636… PS1, Line 320: const BIT3 c_EPS_UPD_TYPE_TA_UPD := '000'B; > this should be an enum afaiu. One could define the enum like so: type enumerated typeOfUpdate_t { c_EPS_UPD_TYPE_TA_UPD ('000'B), c_EPS_UPD_TYPE_COMB_TA_LA_UPD ('001'B), c_EPS_UPD_TYPE_COMB_TA_LA_UPD_IMSI_ATTACH ('010'B), c_EPS_UPD_TYPE_TA_UPD_PERIODIC ('011'B) }; But I can get this to work. When I use the type, then the compiler complains that the type is not a bitstring (!?), when I am stick using BIT3 it says there is no local or imported definition of.. Also in this file there are also other constants that are defined in the same way I did, so I am not sure if using two different ways to define/organize constants is a good idea anyway. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/34269 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I6ffac88cc1d3967dc8000e17a65cdba79a013cf7 Gerrit-Change-Number: 34269 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 01 Sep 2023 08:41:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 191
  • 192
  • 193
  • 194
  • 195
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.