[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-14 Thread pespin
Attention is currently required from: laforge, lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 4:

(1 comment)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/326ffe4f_1d522b2f?usp=email
 :
PS4, Line 453:  ra_id.rac = 0xfe;
> I tried to sneak it through. Yes, we should have a define here. […]
@lafo...@gnumonks.org may know from the top of his head?



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-CC: laforge 
Gerrit-CC: neels 
Gerrit-Attention: laforge 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 14 Jan 2025 18:24:20 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-14 Thread lynxis lazus
Attention is currently required from: pespin.

lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 4:

(1 comment)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/fa8b55f7_8980c207?usp=email
 :
PS4, Line 453:  ra_id.rac = 0xfe;
> we definetly want a define here...
I tried to sneak it through. Yes, we should have a define here.

A lai with 0xfffe is reserved: 23.003.
Also lai = 0x0 is reserved.

So I concluded RAC = 0xfe could be reserved as well. I didn't found it in 
23.003 (but maybe somewhere is another reference).



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-CC: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 14 Jan 2025 18:21:36 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-14 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 4: Code-Review+1

(1 comment)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/936f89fc_4ca23807?usp=email
 :
PS4, Line 453:  ra_id.rac = 0xfe;
we definetly want a define here...



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-CC: neels 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 14 Jan 2025 18:15:48 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-14 Thread lynxis lazus
Attention is currently required from: pespin.

Hello Jenkins Builder, pespin,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email

to look at the new patch set (#4).

The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified+1 by Jenkins Builder


Change subject: iu_client: refactor LAC/RAC handling
..

iu_client: refactor LAC/RAC handling

The iu client ignored the PLMN which might ran into duplicate
RACs. Replace all lac/rac handling by the "new" osmo_routing_area_id
struct which has improved handling.
Further it allows to use the embedded lac when CS paging is only required.
The old gprs_ra_id is still used to contain api stability.

Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
---
M src/iu_client.c
1 file changed, 50 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/38945/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 4
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-CC: neels 
Gerrit-Attention: pespin 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-14 Thread lynxis lazus
Attention is currently required from: pespin.

lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/ab12a4ae_2a1a06ea?usp=email
 :
PS2, Line 13: The old gprs_ra_id is still used to contain api stability.
> Yeah we should not touch that.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-CC: daniel 
Gerrit-CC: neels 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 14 Jan 2025 16:35:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(2 comments)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/d392c853_f913a511?usp=email
 :
PS3, Line 254: static bool iu_rnc_lac_rac_find_legacy(struct ranap_iu_rnc 
**rnc, struct iu_lac_rac_entry **lre,
> because we want to keep the old broken codepath of paging.
Done


https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/37ad8427_99a15745?usp=email
 :
PS3, Line 819:  iu_rnc_lac_rac_find_legacy(&rnc, NULL, lac, rac);
> take a look on iu_page_cs which calls this function.
Done



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Jan 2025 15:14:59 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread lynxis lazus
Attention is currently required from: pespin.

lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(1 comment)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/6849e471_5cb69848?usp=email
 :
PS3, Line 819:  iu_rnc_lac_rac_find_legacy(&rnc, NULL, lac, rac);
> No, it is not present at all.
take a look on iu_page_cs which calls this function.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 07 Jan 2025 15:11:37 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread lynxis lazus
Attention is currently required from: pespin.

lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(2 comments)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/c1f5419d_41f5f0b1?usp=email
 :
PS3, Line 254: static bool iu_rnc_lac_rac_find_legacy(struct ranap_iu_rnc 
**rnc, struct iu_lac_rac_entry **lre,
> I wonder why do we still need this...
because we want to keep the old broken codepath of paging.


https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/c1655181_ab254553?usp=email
 :
PS3, Line 819:  iu_rnc_lac_rac_find_legacy(&rnc, NULL, lac, rac);
> Can't we get the plmn when calling iu_page?
No, it is not present at all.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 07 Jan 2025 15:10:43 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3: Code-Review+1

(1 comment)

Patchset:

PS3:
Ah I see the API now.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:43:53 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(2 comments)

File src/iu_client.c:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/4be33bba_47b3fbab?usp=email
 :
PS3, Line 254: static bool iu_rnc_lac_rac_find_legacy(struct ranap_iu_rnc 
**rnc, struct iu_lac_rac_entry **lre,
I wonder why do we still need this...


https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/9d58d777_d1a0497a?usp=email
 :
PS3, Line 819:  iu_rnc_lac_rac_find_legacy(&rnc, NULL, lac, rac);
Can't we get the plmn when calling iu_page?



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:43:30 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/c5a52365_16a77c09?usp=email
 :
PS2, Line 13: The old gprs_ra_id is still used to contain api stability.
> The old gprs_ra_id is used in struct ranap_ue_conn_ctx (iu_client. […]
Yeah we should not touch that.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:40:22 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread lynxis lazus
Attention is currently required from: pespin.

lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/81281397_53221998?usp=email
 :
PS2, Line 13: The old gprs_ra_id is still used to contain api stability.
> Can you point in code where would you like to break it? In general we'd want 
> to avoid it.
The old gprs_ra_id is used in struct ranap_ue_conn_ctx (iu_client.h) and 
ranap_ue_conn_ctx is in msg->dst, which the SGSN is using it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: pespin 
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:24:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin 
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread lynxis lazus
Attention is currently required from: lynxis lazus.

Hello Jenkins Builder,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email

to look at the new patch set (#3).

The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder


Change subject: iu_client: refactor LAC/RAC handling
..

iu_client: refactor LAC/RAC handling

The iu client ignored the PLMN which might ran into duplicate
RACs. Replace all lac/rac handling by the "new" osmo_routing_area_id
struct which has improved handling.
Further it allows to use the embedded lac when CS paging is only required.
The old gprs_ra_id is still used to contain api stability.

Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
---
M src/iu_client.c
1 file changed, 48 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/38945/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 3
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread pespin
Attention is currently required from: lynxis lazus.

pespin has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 2:

(2 comments)

Patchset:

PS2:
n


Commit Message:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/39dbecd8_bf6d9d6e?usp=email
 :
PS2, Line 13: The old gprs_ra_id is still used to contain api stability.
> should I break API here? So far we know it is only used by osmo-sgsn and also 
> there it would better  […]
Can you point in code where would you like to break it? In general we'd want to 
avoid it.



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:16:09 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2025-01-07 Thread lynxis lazus
lynxis lazus has posted comments on this change by lynxis lazus. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )

Change subject: iu_client: refactor LAC/RAC handling
..


Patch Set 2:

(1 comment)

This change is ready for review.

Commit Message:

https://gerrit.osmocom.org/c/osmo-iuh/+/38945/comment/21a8fd25_c16c7edd?usp=email
 :
PS2, Line 13: The old gprs_ra_id is still used to contain api stability.
should I break API here? So far we know it is only used by osmo-sgsn and also 
there it would better to use the new osmo_routing_area_id



--
To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
Gerrit-Change-Number: 38945
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Tue, 07 Jan 2025 13:09:25 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No


[M] Change in osmo-iuh[master]: iu_client: refactor LAC/RAC handling

2024-11-25 Thread lynxis lazus
lynxis lazus has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-iuh/+/38945?usp=email )


Change subject: iu_client: refactor LAC/RAC handling
..

iu_client: refactor LAC/RAC handling

The iu client ignored the PLMN which might ran into duplicate
RACs. Replace all lac/rac handling by the "new" osmo_routing_area_id
struct which has improved handling.
Further it allows to use the embedded lac when CS paging is only required.
The old gprs_ra_id is still used to contain api stability.

Change-Id: Ie38fa3751cfce1c981d8d0bed1b8ff891593a638
---
M src/iu_client.c
1 file changed, 85 insertions(+), 21 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/45/38945/1

diff --git a/src/iu_client.c b/src/iu_client.c
index 3fc29bd..018813d 100644
--- a/src/iu_client.c
+++ b/src/iu_client.c
@@ -49,10 +49,7 @@
 struct iu_lac_rac_entry {
struct llist_head entry;

-   /* LAC: Location Area Code (for CS and PS) */
-   uint16_t lac;
-   /* RAC: Routing Area Code (for PS only) */
-   uint8_t rac;
+   struct osmo_routing_area_id rai;
 };

 /* Entry to cache conn_id <-> sccp_addr mapping in case we receive an empty CR 
*/
@@ -229,7 +226,7 @@
  * If rnc and lre pointers are not NULL, *rnc / *lre are set to NULL if no 
match is found, or to the
  * match if a match is found.  Return true if a match is found. */
 static bool iu_rnc_lac_rac_find(struct ranap_iu_rnc **rnc, struct 
iu_lac_rac_entry **lre,
-   uint16_t lac, uint8_t rac)
+   const struct osmo_routing_area_id *ra_id)
 {
struct ranap_iu_rnc *r;
struct iu_lac_rac_entry *e;
@@ -241,7 +238,33 @@

llist_for_each_entry(r, &rnc_list, entry) {
llist_for_each_entry(e, &r->lac_rac_list, entry) {
-   if (e->lac == lac && e->rac == rac) {
+   if (!osmo_rai_cmp(&e->rai, ra_id)) {
+   if (rnc)
+   *rnc = r;
+   if (lre)
+   *lre = e;
+   return true;
+   }
+   }
+   }
+   return false;
+}
+
+/* legacy, do a first match with ignoring PLMN */
+static bool iu_rnc_lac_rac_find_legacy(struct ranap_iu_rnc **rnc, struct 
iu_lac_rac_entry **lre,
+  uint16_t lac, uint8_t rac)
+{
+   struct ranap_iu_rnc *r;
+   struct iu_lac_rac_entry *e;
+
+   if (rnc)
+   *rnc = NULL;
+   if (lre)
+   *lre = NULL;
+
+   llist_for_each_entry(r, &rnc_list, entry) {
+   llist_for_each_entry(e, &r->lac_rac_list, entry) {
+   if (e->rai.lac.lac == lac && e->rai.rac == rac) {
if (rnc)
*rnc = r;
if (lre)
@@ -270,8 +293,9 @@
return !strcmp(buf, osmo_sccp_addr_dump(b));
 }

-static struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id, 
uint16_t lac,
-   uint8_t rac, struct osmo_sccp_addr 
*addr)
+static struct ranap_iu_rnc *iu_rnc_register(struct osmo_rnc_id *rnc_id,
+   const struct osmo_routing_area_id 
*rai,
+   struct osmo_sccp_addr *addr)
 {
struct ranap_iu_rnc *rnc;
struct ranap_iu_rnc *old_rnc;
@@ -282,31 +306,31 @@

if (rnc) {
if (!same_sccp_addr(&rnc->sccp_addr, addr)) {
-   LOGPIU(LOGL_NOTICE, "RNC %s changed its SCCP addr to %s 
(LAC=%u RAC=%u)\n",
-  osmo_rnc_id_name(rnc_id), 
osmo_sccp_addr_dump(addr), lac, rac);
+   LOGPIU(LOGL_NOTICE, "RNC %s changed its SCCP addr to %s 
(LAC/RAC %s)\n",
+  osmo_rnc_id_name(rnc_id), 
osmo_sccp_addr_dump(addr), osmo_rai_name2(rai));
rnc->sccp_addr = *addr;
}
} else
rnc = iu_rnc_alloc(rnc_id, addr);

/* Detect whether the LAC,RAC is already recorded in another RNC */
-   iu_rnc_lac_rac_find(&old_rnc, &lre, lac, rac);
+   iu_rnc_lac_rac_find(&old_rnc, &lre, rai);

if (old_rnc && old_rnc != rnc) {
-   /* LAC,RAC already exists in a different RNC */
-   LOGPIU(LOGL_NOTICE, "LAC %u RAC %u moved from RNC %s %s",
-  lac, rac, osmo_rnc_id_name(&old_rnc->rnc_id), 
osmo_sccp_addr_dump(&old_rnc->sccp_addr));
+   /* LAC, RAC already exists in a different RNC */
+   LOGPIU(LOGL_NOTICE, "LAC/RAC %s moved from RNC %s %s",
+  osmo_rai_name2(rai),
+  osmo_rnc_id_name(&old_rnc->rnc_id), 
osmo_sccp_addr_dump(&old_rnc->sccp_addr));
LO