Attention is currently required from: neels, pespin, dexter.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/31145 )

Change subject: bts: add IMMEDIATE ASSIGNMENT via PCH transmission
......................................................................


Patch Set 18: Code-Review-1

(1 comment)

File include/osmocom/pcu/pcuif_proto.h:

https://gerrit.osmocom.org/c/osmo-pcu/+/31145/comment/39be9e40_3c907ecb
PS17, Line 280:         uint8_t pgroup[3];
Wait a minute, I am confused by this field. It's named `pgroup`, so that means 
it's supposed to contain a paging group, right? But in reality it's just the 
last three digits of the IMSI converted to ASCII.

For some reason in osmo-pcu we convert these last three digits to ASCII, and 
then in osmo-bts (see `paging_add_imm_ass()`) we convert three ASCII bytes back 
to an integer add feed to `gsm0502_calc_paging_group()`.

> I think this would then make using the struct at the BSC side more complicated

I haven't looked at the BSC's implementation of the relevant part, but I don't 
see how using ASCII instead of plain integers simplifies things either.

> The thing is that this value ends up at extract_paging_group and this 
> function does a str_to_imsi(imsi_digit_buf) with the value ...

So by sending a plain integer stored in `uint16_t` here we actually eliminate 
the need for `str_to_imsi()`.

> If we can feed gsm0502_calc_paging_group() the pgroup value from here 
> directly then we can use an uint16_t.

I am pretty sure we can, why not.

To summarize:

* I see no reason for using ASCII to carry the last three digits of IMSI,
* so let's just send plain integer here, directly from `ms_paging_group()`.
* I agree with Pau that we should simply use `uint16_t`.
* Name the field `imsi`, it's not a paging group itself.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I2a78651593323e8b9627c39918d949a33497b70f
Gerrit-Change-Number: 31145
Gerrit-PatchSet: 18
Gerrit-Owner: dexter <pma...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-CC: neels <nhofm...@sysmocom.de>
Gerrit-Attention: neels <nhofm...@sysmocom.de>
Gerrit-Attention: pespin <pes...@sysmocom.de>
Gerrit-Attention: dexter <pma...@sysmocom.de>
Gerrit-Comment-Date: Tue, 28 Feb 2023 20:59:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pes...@sysmocom.de>
Comment-In-Reply-To: dexter <pma...@sysmocom.de>
Gerrit-MessageType: comment

Reply via email to