Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/32709 )
Change subject: stream: Add client side recv and send for IPA
......................................................................
Patch Set 1:
(2 comments)
File src/stream.c:
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6952):
https://gerrit.osmocom.org/c/libosmo-netif/+/32709/comment/3ae1b305_427a34b4
PS1, Line 1233: msgb_pull(msg, sizeof (struct ipa_head));
space prohibited between function name and open parenthesis '('
Robot Comment from checkpatch (run ID jenkins-gerrit-lint-6952):
https://gerrit.osmocom.org/c/libosmo-netif/+/32709/comment/e4d03b9e_0f6cb802
PS1, Line 1244: msgb_pull(msg, sizeof (struct ipa_head_ext));
space prohibited between function name and open parenthesis '('
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/32709
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: arehbein/osmo_io_ipa
Gerrit-Change-Id: Ic93b2d96fd14ad1a1dc063924498d87f0b1d8a56
Gerrit-Change-Number: 32709
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Fri, 12 May 2023 13:57:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32694 )
Change subject: gprs_rlcmac: also use direct TLLI PCUIF for paging macblocks
......................................................................
gprs_rlcmac: also use direct TLLI PCUIF for paging macblocks
In the current code we still send PAGING COMMAND macblocks via SAPI
PCU_IF_SAPI_PCH, which technically belongs to the older PCUIF version
(v.10), which we are going to deprecate soon.
To give some background information it should be noted that this bug has
its root cause in a misconception on how the receiving end should behave
when it receives PAGING COMMAND macblocks. It was not clear that PAGING
COMMAND and IMMEDIATE ASSIGNMENT (via PCH) require a confirmation by the
receiving end. Since osmo-bts uses the old V.10 PCUIF interface we get a
confirmation for both message types, but osmo-bsc, which uses the newer
V.11 interface will only confirm IMMEDIATE ASSIGNMENT messages, to
distinguish between both message types it uses SAPI PCU_IF_SAPI_PCH for
PAGING COMMAND and PCU_IF_SAPI_PCH_DT for IMMEDIATE ASSIGNMENT
(confirmed). It is not only confusing to use two different SAPIs to
access the PCH, but also wrong. In the new PCUIF interface we should
only use PCU_IF_SAPI_PCH_DT. A coresponding patch for osmo-bsc is
already submitted (see Depends).
Depends: osmo-bsc.git I82443f2b402aa2416469c8c50b1c050323ef3b8f
Related: OS##5927
Change-Id: I99cfe373fa157cfb32b74c113ad9935347653a71
---
M src/gprs_rlcmac.c
M src/pcu_l1_if.cpp
M src/pcu_l1_if.h
3 files changed, 40 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/94/32694/1
diff --git a/src/gprs_rlcmac.c b/src/gprs_rlcmac.c
index 3163c32..07c7e25 100644
--- a/src/gprs_rlcmac.c
+++ b/src/gprs_rlcmac.c
@@ -17,6 +17,7 @@
*/
#include <osmocom/gsm/gsm48.h>
+#include <osmocom/core/bitvec.h>
#include <pcu_l1_if.h>
#include <gprs_rlcmac.h>
@@ -43,7 +44,12 @@
return -1;
}
bts_do_rate_ctr_inc(bts, CTR_PCH_REQUESTS);
- pcu_l1if_tx_pch(bts, paging_request, plen, imsi);
+
+ if (the_pcu->pcu_if_version >= 0x0b)
+ pcu_l1if_tx_pch_dt(bts, paging_request, plen, imsi, mi->tmsi);
+ else
+ pcu_l1if_tx_pch(bts, paging_request, plen, imsi);
+
bitvec_free(paging_request);
return 0;
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 85aaddc..51c03d9 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -286,13 +286,9 @@
pcu_tx_data_req(bts, 0, 0, PCU_IF_SAPI_PCH, 0, 0, 0, data, sizeof(data));
}
-/* Send a block via the paging channel and require a confirmation by the receiving end */
-void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi, uint32_t tlli)
+/* Send a macblock via the paging channel (and get confirmation by the receiving end) */
+void pcu_l1if_tx_pch_dt(struct gprs_rlcmac_bts *bts, struct bitvec *block, int plen, const char *imsi, uint32_t tlli)
{
- /* NOTE: This is in practice only used to transmit IMMEDIATE ASSIGNMENT messages through the paging channel and
- * it is not guaranteed to work with other message types. The prepended TLLI will be used as an identifier in
- * the confirmation message. */
-
struct gsm_pcu_if_pch_dt pch_dt = { 0 };
pch_dt.tlli = tlli;
diff --git a/src/pcu_l1_if.h b/src/pcu_l1_if.h
index f787c40..88e84c3 100644
--- a/src/pcu_l1_if.h
+++ b/src/pcu_l1_if.h
@@ -17,6 +17,7 @@
#define PCU_L1_IF_H
#include <stdint.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -147,8 +148,6 @@
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_pch_dt(struct gprs_rlcmac_bts *bts, bitvec *block, int plen, const char *imsi, uint32_t tlli);
#endif
#ifdef __cplusplus
@@ -158,6 +157,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);
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/+/32694
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I99cfe373fa157cfb32b74c113ad9935347653a71
Gerrit-Change-Number: 32694
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32693 )
Change subject: pcu_sock: fix PCUIF interface (PCH)
......................................................................
pcu_sock: fix PCUIF interface (PCH)
The PCUIF interface implementation in osmo-bsc provides two ways to
access the paging channel (PCH).
1) Under the SAPI PCU_IF_SAPI_PCH PAGING COMMAND messages are accepted
as whole macblocks but the format is in the style that we are going
to deprecate with PCUIF v.11. Also at the moment those PAGING COMMANDs
are not confirmed towards the PCU, but should (see paging.c in osmo-bts,
which confirms PAGING COMMANDs and IMMEDIATE ASSIGNMENT messages).
2) Under the SAPI PCU_IF_SAPI_PCH_DT messages are also accepded as
macblocks but are also tagged with a TLLI for reference. Those are
confirmed towards the PCU as it should be.
The existence of the two SAPIs in the osmo-bsc implementation are due to
a misconception of the PCUIF and if PAGING COMMAND macblocks should be
confirmed as well. The problem is fixed on osmo-pcu now (see Depends).
Since in osmo-bsc PAGING COMMAND and IMMEDIATE ASSIGNMENT are two
different RSL commands we have to distinguish both by the massage type
field in the macblock now. Also since SAPI SAPI_PCU_IF_PCH is now no
longer used in PCUIF v.11 we may drop this code path.
Depends: osmo-pcu.git I99cfe373fa157cfb32b74c113ad9935347653a71
Related: OS##5927
Change-Id: I82443f2b402aa2416469c8c50b1c050323ef3b8f
---
M include/osmocom/bsc/pcu_if.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/pcu_sock.c
3 files changed, 56 insertions(+), 49 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/32693/1
diff --git a/include/osmocom/bsc/pcu_if.h b/include/osmocom/bsc/pcu_if.h
index 5dc6e37..525b2e4 100644
--- a/include/osmocom/bsc/pcu_if.h
+++ b/include/osmocom/bsc/pcu_if.h
@@ -25,11 +25,7 @@
uint8_t is_11bit, enum ph_burst_type burst_type);
/* Confirm the sending of an immediate assignment to the pcu */
-int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli);
-
-
-/* Confirm the sending of an immediate assignment to the pcu */
-int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli);
+int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t tlli);
/* Open connection to PCU */
int pcu_sock_init(struct gsm_network *net);
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 72acc85..54357de 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -2398,7 +2398,7 @@
else {
msgb_pull(msg, 1); /* drop previous data to use msg_pull_u32 */
tlli = msgb_pull_u32(msg);
- pcu_tx_imm_ass_sent(sign_link->trx->bts, tlli);
+ pcu_tx_pch_confirm(sign_link->trx->bts, tlli);
}
return 0;
}
diff --git a/src/osmo-bsc/pcu_sock.c b/src/osmo-bsc/pcu_sock.c
index eb4f265..823b6f6 100644
--- a/src/osmo-bsc/pcu_sock.c
+++ b/src/osmo-bsc/pcu_sock.c
@@ -436,7 +436,7 @@
}
/* Confirm the sending of an immediate assignment to the pcu */
-int pcu_tx_imm_ass_sent(struct gsm_bts *bts, uint32_t tlli)
+int pcu_tx_pch_confirm(struct gsm_bts *bts, uint32_t tlli)
{
struct msgb *msg;
struct gsm_pcu_if *pcu_prim;
@@ -460,9 +460,9 @@
* Encoding::write_paging_request) and extract the mobile identity
* (P-TMSI) from it */
static int pcu_rx_rr_paging(struct gsm_bts *bts, uint8_t paging_group,
- const uint8_t *raw_rr_msg)
+ const struct gsm_pcu_if_pch_dt *pch_dt)
{
- struct gsm48_paging1 *p1 = (struct gsm48_paging1 *) raw_rr_msg;
+ struct gsm48_paging1 *p1 = (struct gsm48_paging1 *) pch_dt->data;
uint8_t chan_needed;
struct osmo_mobile_identity mi;
int rc;
@@ -502,28 +502,25 @@
break;
}
+ pcu_tx_pch_confirm(bts, pch_dt->tlli);
return rc;
}
-/* Helper function for pcu_rx_data_req() to extract paging group info (3 byte) */
-static uint8_t extract_paging_group(struct gsm_bts *bts, uint8_t *data)
+static int pcu_rx_rr_imm_ass(struct gsm_bts *bts, uint8_t paging_group,
+ const struct gsm_pcu_if_pch_dt *pch_dt)
{
- char imsi_digit_buf[4];
- uint8_t pag_grp;
+ LOG_BTS(bts, DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via PCH (TLLI=0x%08x, IMSI=%s, Paging group=0x%02x)\n",
+ pch_dt->tlli, pch_dt->imsi, paging_group);
- /* the first three bytes are the last three digits of the IMSI, which we need to compute the paging group */
- imsi_digit_buf[0] = data[0];
- imsi_digit_buf[1] = data[1];
- imsi_digit_buf[2] = data[2];
- imsi_digit_buf[3] = '\0';
+ /* NOTE: Sending an IMMEDIATE ASSIGNMENT via PCH became necessary with GPRS in order to be able to
+ * assign downlink TBFs directly through the paging channel. However, this method never became part
+ * of the RSL specs. This means that each BTS vendor has to come up with a proprietary method. At
+ * the moment we only support Ericsson RBS here. */
+ if (is_ericsson_bts(bts))
+ return rsl_ericsson_imm_assign_cmd(bts, pch_dt->tlli, sizeof(pch_dt->data), pch_dt->data, paging_group);
- pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc,
- str_to_imsi(imsi_digit_buf));
-
- LOG_BTS(bts, DPCU, LOGL_DEBUG, "Calculating paging group: imsi_digit_buf=%s ==> pag_grp=0x%02x\n",
- imsi_digit_buf, pag_grp);
-
- return pag_grp;
+ LOG_BTS(bts, DPCU, LOGL_ERROR, "BTS model does not support sending immediate assignment via PCH!\n");
+ return -ENOTSUP;
}
static int pcu_rx_data_req(struct gsm_bts *bts, uint8_t msg_type,
@@ -532,6 +529,7 @@
uint8_t pag_grp;
int rc = 0;
struct gsm_pcu_if_pch_dt *pch_dt;
+ 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],
@@ -539,18 +537,13 @@
osmo_hexdump(data_req->data, data_req->len));
switch (data_req->sapi) {
- case PCU_IF_SAPI_PCH:
- /* Extract 3 byte paging group */
- pag_grp = extract_paging_group(bts, data_req->data);
- pcu_rx_rr_paging(bts, pag_grp, data_req->data+3);
- break;
case PCU_IF_SAPI_AGCH:
if (rsl_imm_assign_cmd(bts, data_req->len, data_req->data))
rc = -EIO;
break;
case PCU_IF_SAPI_PCH_DT:
/* DT = direct TLLI. A tlli is prefixed so that the BSC/BTS can confirm the sending of the downlink
- * IMMEDIATE ASSIGNMENT towards the PCU using this TLLI as a reference. */
+ * IMMEDIATE ASSIGNMENT or PAGING COMMAND towards the PCU using this TLLI as a reference. */
if (data_req->len < sizeof(struct gsm_pcu_if_pch_dt)) {
LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with invalid/small length %d\n",
@@ -561,24 +554,10 @@
pch_dt = (struct gsm_pcu_if_pch_dt *)data_req->data;
pag_grp = gsm0502_calc_paging_group(&bts->si_common.chan_desc, str_to_imsi(pch_dt->imsi));
- LOG_BTS(bts, DPCU, LOGL_DEBUG, "PCU Sends immediate assignment via PCH (TLLI=0x%08x, IMSI=%s, Paging group=0x%02x)\n",
- pch_dt->tlli, pch_dt->imsi, pag_grp);
-
- /* NOTE: Sending an IMMEDIATE ASSIGNMENT via PCH became necessary with GPRS in order to be able to
- * assign downlink TBFs directly through the paging channel. However, this method never became part
- * of the RSL specs. This means that each BTS vendor has to come up with a proprietary method. At
- * the moment we only support Ericsson RBS here. */
- if (is_ericsson_bts(bts)) {
- rc = rsl_ericsson_imm_assign_cmd(bts, pch_dt->tlli, sizeof(pch_dt->data),
- pch_dt->data, pag_grp);
- } else {
- LOG_BTS(bts, DPCU, LOGL_ERROR, "BTS model does not support sending immediate assignment via PCH!\n");
- rc = -ENOTSUP;
- }
-
- if (rc)
- rc = -EIO;
- break;
+ gsm48_imm_ass = (struct gsm48_imm_ass *)pch_dt->data;
+ if (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS)
+ return pcu_rx_rr_imm_ass(bts, pag_grp, pch_dt);
+ return pcu_rx_rr_paging(bts, pag_grp, pch_dt);
default:
LOG_BTS(bts, DPCU, LOGL_ERROR, "Received PCU data request with "
"unsupported sapi %d\n", data_req->sapi);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32693
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I82443f2b402aa2416469c8c50b1c050323ef3b8f
Gerrit-Change-Number: 32693
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32679 )
Change subject: hnbgw: put copyright into define
......................................................................
hnbgw: put copyright into define
Fix the following compile error, seen on ubuntu 18.04 with GCC 7.5.0,
opensuse 15.4 and our OE builds:
hnbgw.c:549:15: error: initializer element is not constant
.copyright = hnbgw_copyright,
^~~~~~~~~~~~~~~
Fixes: 04844415 ("move main() to separate file")
Change-Id: I13b2569a369724e0298b064a0876b95d6dafd9d0
---
M src/osmo-hnbgw/hnbgw.c
1 file changed, 25 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
neels: Looks good to me, approved
diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c
index 8876580..6bf7b3f 100644
--- a/src/osmo-hnbgw/hnbgw.c
+++ b/src/osmo-hnbgw/hnbgw.c
@@ -491,13 +491,13 @@
return ranap_msg;
}
-static const char * const hnbgw_copyright =
- "OsmoHNBGW - Osmocom Home Node B Gateway implementation\r\n"
- "Copyright (C) 2016-2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de>\r\n"
- "Contributions by Daniel Willmann, Harald Welte, Neels Hofmeyr\r\n"
- "License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n"
- "This is free software: you are free to change and redistribute it.\r\n"
- "There is NO WARRANTY, to the extent permitted by law.\r\n";
+#define HNBGW_COPYRIGHT \
+ "OsmoHNBGW - Osmocom Home Node B Gateway implementation\r\n" \
+ "Copyright (C) 2016-2023 by sysmocom s.f.m.c. GmbH <info(a)sysmocom.de>\r\n" \
+ "Contributions by Daniel Willmann, Harald Welte, Neels Hofmeyr\r\n" \
+ "License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html>\r\n" \
+ "This is free software: you are free to change and redistribute it.\r\n" \
+ "There is NO WARRANTY, to the extent permitted by law.\r\n"
static const struct log_info_cat hnbgw_log_cat[] = {
[DMAIN] = {
@@ -546,5 +546,5 @@
.name = "OsmoHNBGW",
.version = PACKAGE_VERSION,
.go_parent_cb = hnbgw_vty_go_parent,
- .copyright = hnbgw_copyright,
+ .copyright = HNBGW_COPYRIGHT,
};
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32679
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I13b2569a369724e0298b064a0876b95d6dafd9d0
Gerrit-Change-Number: 32679
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: merged