dexter has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/34100 )

Change subject: pcuif_proto: rename tlli to msg_id
......................................................................

pcuif_proto: rename tlli to msg_id

To confirm downlink IMMEDIATE ASSIGNMENT messages, we use the TLLI as an
identifier and the related struct member is also called "tlli".
Unfortunately this is misleading since the message identifier does not
necessarly have to be a TLLI. It is just an implementation detail that
osmo-pcu uses the TLLI as a message identifier.

To make that clear, lets rename the tlli member (and variable and
parameter names where it is passed on) to "msg_id".

(Since this change only renames variables and struct members it will not
break compatibility with other programs that use the PCUIF)

Related: OS#5927
Change-Id: I4a25039dfe329e68879bc68936e49c4b190625e6
---
M include/osmocom/pcu/pcuif_proto.h
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
3 files changed, 33 insertions(+), 11 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  osmith: Looks good to me, approved




diff --git a/include/osmocom/pcu/pcuif_proto.h 
b/include/osmocom/pcu/pcuif_proto.h
index 1dda160..c538b91 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -18,7 +18,7 @@
 #define PCU_IF_MSG_SUSP_REQ    0x03    /* BTS forwards GPRS SUSP REQ to PCU */
 #define PCU_IF_MSG_APP_INFO_REQ        0x04    /* BTS asks PCU to transmit APP 
INFO via PACCH */
 #define PCU_IF_MSG_RTS_REQ     0x10    /* ready to send request */
-#define PCU_IF_MSG_DATA_CNF_DT 0x11    /* confirm (with direct tlli) */
+#define PCU_IF_MSG_DATA_CNF_DT 0x11    /* confirm (using message id) */
 #define PCU_IF_MSG_RACH_IND    0x22    /* receive RACH */
 #define PCU_IF_MSG_INFO_IND    0x32    /* retrieve BTS info */
 #define PCU_IF_MSG_E1_CCU_IND  0x33    /* retrieve E1 CCU comm. parameters */
@@ -41,7 +41,7 @@
 #define PCU_IF_SAPI_PDTCH      0x05    /* packet data/control/ccch block */
 #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_DT     0x08    /* assignment on PCH (confirmed using 
TLLI) */
+#define PCU_IF_SAPI_PCH_DT     0x08    /* assignment on PCH (confirmed using 
message id) */

 /* flags */
 #define PCU_IF_FLAG_ACTIVE     (1 << 0)/* BTS is active */
@@ -93,10 +93,10 @@
        int16_t         lqual_cb;       /* !< \brief Link quality in centiBel */
 } __attribute__ ((packed));

-/* data confirmation with direct tlli (instead of raw mac block with tlli) */
+/* data confirmation with message id (instead of raw mac block) */
 struct gsm_pcu_if_data_cnf_dt {
        uint8_t         sapi;
-       uint32_t        tlli;
+       uint32_t        msg_id;
        uint32_t        fn;
        uint16_t        arfcn;
        uint8_t         trx_nr;
@@ -274,8 +274,8 @@
 /* Struct to send a (confirmed) IMMEDIATE ASSIGNMENT message via PCH. The 
struct is sent as a data request
  * (data_req) under SAPI PCU_IF_SAPI_PCH_DT. */
 struct gsm_pcu_if_pch_dt {
-       /* TLLI as reference for confirmation */
-       uint32_t tlli;
+       /* message id as reference for confirmation */
+       uint32_t msg_id;
        /* IMSI (to derive paging group) */
        char imsi[OSMO_IMSI_BUF_SIZE];
        /* GSM mac-block (with immediate assignment message) */
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index ed64cc1..8597dd4 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -300,11 +300,11 @@
 /* Send a MAC block via the paging channel. This will (obviously) only work 
for MAC blocks that contain an
  * IMMEDIATE ASSIGNMENT or a PAGING COMMAND message. In case the MAC block 
contains an IMMEDIATE ASSIGNMENT
  * message, the receiving end is required to confirm when the IMMEDIATE 
ASSIGNMENT has been sent. */
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int 
plen, const char *imsi, uint32_t tlli)
+void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int 
plen, const char *imsi, uint32_t msg_id)
 {
        struct gsm_pcu_if_pch_dt pch_dt = { 0 };

-       pch_dt.tlli = tlli;
+       pch_dt.msg_id = msg_id;
        if (imsi)
                OSMO_STRLCPY_ARRAY(pch_dt.imsi, imsi);
        /* OS#6097: if strlen(pch_dt.imsi) == 0: We assume the MS is in non-DRX
@@ -563,7 +563,7 @@

        switch (data_cnf_dt->sapi) {
        case PCU_IF_SAPI_PCH_DT:
-               bts_rcv_imm_ass_cnf(bts, NULL, data_cnf_dt->tlli, 
data_cnf_dt->fn);
+               bts_rcv_imm_ass_cnf(bts, NULL, data_cnf_dt->msg_id, 
data_cnf_dt->fn);
                break;
        default:
                LOGP(DL1IF, LOGL_ERROR, "Received PCU data confirm with 
unsupported sapi %d\n", data_cnf_dt->sapi);
@@ -789,7 +789,7 @@

        /* NOTE: The classic way to confirm an IMMEDIATE assignment is to send 
the whole MAC block payload back to the
         * PCU. So it is the MAC block itsself that serves a reference for the 
confirmation. This method has certain
-        * disadvantages so it was replaced with a method that uses the TLLI as 
a reference ("Direct TLLI"). This new
+        * disadvantages so it was replaced with a method that uses the TLLI as 
a reference (msg_id). This new
         * method will replace the old one. The code that handles the old 
method will be removed in the foreseeable
         * future. (see also OS#5927) */
        if (info_ind->version == 0x0a) {
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index bc036bf..3ff17dc 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -156,7 +156,7 @@

 int pcu_tx_neigh_addr_res_req(struct gprs_rlcmac_bts *bts, const struct 
neigh_cache_entry_key *neigh_key);
 void pcu_l1if_tx_pch(struct gprs_rlcmac_bts *bts, struct bitvec *block, int 
plen, const char *imsi);
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int 
plen, const char *imsi, uint32_t tlli);
+void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int 
plen, const char *imsi, uint32_t msg_id);

 int pcu_rx(struct gsm_pcu_if *pcu_prim, size_t pcu_prim_length);
 int pcu_l1if_open(void);

--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/34100
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I4a25039dfe329e68879bc68936e49c4b190625e6
Gerrit-Change-Number: 34100
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to