dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32734 )
Change subject: paging: do not confirm PAGING COMMAND messages
......................................................................
paging: do not confirm PAGING COMMAND messages
when osmo-bts receives a MAC block from osmo-pcu through the PCUIF it
puts it in the review queue without further interpreting it. This also
means that it will send confirmations to the PCU for IMMEDIATE
ASSIGNMENT and PAGING COMMAND. This is not entirely correct because only
IMMEDIATE ASSIGNMENT messages shouldbe confirmed. osmo-pcu has no
problem with this since it silently drops the confirmations for PAGING
COMMAND messages. This peculiarity of the PCUIF implementation makes the
confirmation logic hard to understand, so let's add some logic to
osmo-bts that makes sure that only IMMEDIATE ASSIGNMENT messages are
confirmed.
Related: OS#5927
Change-Id: I8b8264d28b1b1deb08774cdba58dd4c6dafe115d
---
M include/osmo-bts/paging.h
M src/common/paging.c
M src/common/pcu_sock.c
3 files changed, 35 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/34/32734/1
diff --git a/include/osmo-bts/paging.h b/include/osmo-bts/paging.h
index 1afb254..45ff754 100644
--- a/include/osmo-bts/paging.h
+++ b/include/osmo-bts/paging.h
@@ -37,7 +37,7 @@
/* Add a ready formatted MAC block message to the paging queue, this can be an IMMEDIATE ASSIGNMENT, or a
* PAGING COMMAND (from the PCU) */
-int paging_add_macblock(struct paging_state *ps, const char *imsi,
+int paging_add_macblock(struct paging_state *ps, const char *imsi, bool confirm,
const uint8_t *macblock, uint8_t macblock_len);
/* generate paging message for given gsm time */
diff --git a/src/common/paging.c b/src/common/paging.c
index 5e11a98..4698c7c 100644
--- a/src/common/paging.c
+++ b/src/common/paging.c
@@ -63,6 +63,7 @@
} normal;
struct {
uint8_t msg[GSM_MACBLOCK_LEN];
+ bool confirm;
} macblock;
} u;
};
@@ -269,7 +270,7 @@
/* Add a ready formatted MAC block message to the paging queue, this can be an IMMEDIATE ASSIGNMENT, or a
* PAGING COMMAND (from the PCU) */
-int paging_add_macblock(struct paging_state *ps, const char *imsi,
+int paging_add_macblock(struct paging_state *ps, const char *imsi, bool confirm,
const uint8_t *macblock, uint8_t macblock_len)
{
struct llist_head *group_q;
@@ -312,6 +313,7 @@
LOGP(DPAG, LOGL_INFO, "Add MAC block to paging queue (group=%u)\n",
paging_group);
memcpy(pr->u.macblock.msg, macblock, GSM_MACBLOCK_LEN);
+ pr->u.macblock.confirm = confirm;
/* enqueue the new message to the HEAD of the queue */
llist_add(&pr->list, group_q);
@@ -640,8 +642,10 @@
/* get MAC block message and free record */
memcpy(out_buf, pr[num_pr]->u.macblock.msg,
GSM_MACBLOCK_LEN);
- pcu_tx_pch_data_cnf(gt->fn, pr[num_pr]->u.macblock.msg,
- GSM_MACBLOCK_LEN);
+ if (pr[num_pr]->u.macblock.confirm) {
+ pcu_tx_pch_data_cnf(gt->fn, pr[num_pr]->u.macblock.msg,
+ GSM_MACBLOCK_LEN);
+ }
talloc_free(pr[num_pr]);
return GSM_MACBLOCK_LEN;
}
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 2b5b99c..1d1ef08 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -668,6 +668,8 @@
struct msgb *msg;
int rc = 0;
char imsi[4] = { 0 };
+ struct gsm48_imm_ass *gsm48_imm_ass;
+ bool confirm = false;
LOGP(DPCU, LOGL_DEBUG, "Data request received: sapi=%s arfcn=%d "
"block=%d data=%s\n", sapi_string[data_req->sapi],
@@ -677,7 +679,10 @@
switch (data_req->sapi) {
case PCU_IF_SAPI_PCH:
memcpy(imsi, data_req->data, 3);
- paging_add_macblock(bts->paging_state, imsi, data_req->data + 3, data_req->len-3);
+ gsm48_imm_ass = (struct gsm48_imm_ass *)data_req->data + 3;
+ if (gsm48_imm_ass->msg_type == GSM48_MT_RR_IMM_ASS)
+ confirm = true;
+ paging_add_macblock(bts->paging_state, imsi, confirm, data_req->data + 3, data_req->len-3);
break;
case PCU_IF_SAPI_AGCH:
msg = msgb_alloc(data_req->len, "pcu_agch");
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32734
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I8b8264d28b1b1deb08774cdba58dd4c6dafe115d
Gerrit-Change-Number: 32734
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: jolly, pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/32694 )
Change subject: gprs_rlcmac: also use direct TLLI PCUIF for paging MAC blocks
......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
> Thanks for making that clear. To be honest I also do not see a why pagings should be confirmed. […]
So, I now know for sure: osmo-bts confirms IMMEDIATE ASSIGNMENT and PAGING COMMAND, but osmo-pcu silently drops confirmations for PAGING COMMAND. This means I just have to fix this patch so that it uses the PCUIF V.11 interface correctly. We also do not have to worry about the TLLI, its irrelevant.
PS2:
Thanks for your helpful review comments. I will now rework this patch.
--
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: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 16 May 2023 13:46:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels, pespin, fixeria.
matanp has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 )
Change subject: ctrl: Add getting neighbor list
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
> @matanp, thanks for your patches! I am impressed by your level of expertise in C and FLOSS community […]
Thanks a lot! I am actually not that good in C, but I believe contributing to open source projects and getting code reviews is the best way to become better.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32565
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7
Gerrit-Change-Number: 32565
Gerrit-PatchSet: 4
Gerrit-Owner: matanp <matan1008(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 16 May 2023 12:38:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32716 )
Change subject: fix missing write-back of rnc-id
......................................................................
Patch Set 4:
(1 comment)
File src/osmo-hnbgw/hnbgw_vty.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/32716/comment/fe65ae38_21c79160
PS4, Line 423: vty_out(vty, " rnc-id %u%s", g_hnbgw->config.rnc_id, VTY_NEWLINE);
I think rnc-id sounds more important and hence should probably be put before timers and logging related stuff. What do you think?
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32716
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Ide006379b26949e34371bd316a22c130ea09da82
Gerrit-Change-Number: 32716
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 16 May 2023 12:36:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/32715 )
Change subject: vty test: show missing write-back of 'rnc-id'
......................................................................
Patch Set 4: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/32715
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I9eecda8678c32abbeaf39344ccdb14ed5a0828ce
Gerrit-Change-Number: 32715
Gerrit-PatchSet: 4
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 16 May 2023 12:35:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-cbc/+/32730 )
Change subject: README.md: Document generation of SBcAP code from ASN.1 files
......................................................................
README.md: Document generation of SBcAP code from ASN.1 files
Change-Id: Id6edb2dcbd39ca101110f1ca57fcd67bf08c0ef0
---
M README.md
1 file changed, 36 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, approved
diff --git a/README.md b/README.md
index 6cb375e..8f98dad 100644
--- a/README.md
+++ b/README.md
@@ -67,3 +67,30 @@
The current patch queue for osmo-cbc can be seen at
https://gerrit.osmocom.org/#/q/project:osmo-cbc+status:open
+
+
+Generating asn1c code
+---------------------
+
+Upstream master as1nc from [vlm](https://github.com/vlm/asn1c) [doesn't support
+APER encoding](https://github.com/vlm/asn1c/issues/452). Nevertheless, the
+upstream fork maintained by a big contributor
+[mouse07410](https://github.com/mouse07410/asn1c) does support it, and it is
+used in osmo-cbc to generate the SBc-AP code from ASN.1 files present in
+src/sbcap/asn1/.
+
+In order to regenerate the code, one shall adjust the ASN1C_SKELETON_PATH and
+ASN1C_BIN_PATH in configure.ac to point to the built & installed asn1c from
+mouse07410 (usually `vlm_master` branch). Last generated code was built using
+commit hash 08b293e8aa342d465d26805d1d66f3595b2ce261.
+
+Then, do the usual `autoreconf -fi && ./configure`, using a buildir != srcdir
+(important, in order to avoid ending up with tempotary files in srcdir and
+making it difficult to stash the relevant changes).
+
+Finally, run `make -C src/ regen`, which will regenerate the files and copy over
+the skeletons, with git possibily showing changes in the following paths:
+- include/osmocom/sbcap/
+- src/sbcap/gen/
+- src/sbcap/skel/
+
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/32730
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: Id6edb2dcbd39ca101110f1ca57fcd67bf08c0ef0
Gerrit-Change-Number: 32730
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin, fixeria, matanp.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 )
Change subject: ctrl: Add getting neighbor list
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
@matanp, thanks for your patches! I am impressed by your level of expertise in C and FLOSS community conduct. Welcome at Osmocom!
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32565
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7
Gerrit-Change-Number: 32565
Gerrit-PatchSet: 4
Gerrit-Owner: matanp <matan1008(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: matanp <matan1008(a)gmail.com>
Gerrit-Comment-Date: Tue, 16 May 2023 12:29:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: pespin, fixeria, matanp.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 )
Change subject: ctrl: Add getting neighbor list
......................................................................
Patch Set 4: Code-Review+1
(1 comment)
Patchset:
PS4:
it would be really cool to add a CTRL transcript test to verify the new commands ... but I see osmo-bsc has no CTRL transcript tests at all yet, so adding those should rather be a separate patch. Hence this patch is perfect as it is.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/32565
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7
Gerrit-Change-Number: 32565
Gerrit-PatchSet: 4
Gerrit-Owner: matanp <matan1008(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: matanp <matan1008(a)gmail.com>
Gerrit-Comment-Date: Tue, 16 May 2023 12:22:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment