Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-12-03 Thread pespin
pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..

pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

This patch refactors rcv_resource_request() in several ways:
* Move the ID_TYPE=DL/UL_TFI  handling at the start of the function, so
  that the function is split in 2 sections: First section gathers a
  GprsMS object from the ID_TYPE in the PktResReq. Second section
  handles the packet for the GprsMS based on the expectd ULC slot.
* Initial handling of PktResReq when transmitted by the MS on the UL-TBF
  as an answer to USF. This case is basically the one where the MS
  wishes to change some parameters of the currently active UL-TBF.
  In order to do so, for now simply delete the current TBF and re-create
  a new one to triger the PktUlAss which is expected by the MS.
  This behavior is not entirely correct since in this case the MS is
  expected to keep using actively the old TBF until the PktUlAss is
  received, so in this case ideally we should be keeping the TBF object
  and simply upgrading it and using itself to trigger a PktUlAss in its
  ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it
  can be done later as an incremental step fix. The current behavior is
  alreday better than the previous one, since the MS has been tested to
  be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF.

Related: OS#4947
Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
---
M src/pdch.cpp
1 file changed, 169 insertions(+), 142 deletions(-)

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



diff --git a/src/pdch.cpp b/src/pdch.cpp
index 0988af6..75afc88 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -644,10 +644,16 @@

 void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t 
*request, uint32_t fn, struct pcu_l1_meas *meas)
 {
-   struct gprs_rlcmac_sba *sba;
int rc;
struct gprs_rlcmac_bts *bts = trx->bts;
struct pdch_ulc_node *item;
+   char buf[128];
+   struct GprsMs *ms = NULL;
+   struct gprs_rlcmac_sba *sba;
+   struct gprs_rlcmac_dl_tbf *dl_tbf = NULL;
+   struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
+   struct gprs_rlcmac_ul_tbf *new_ul_tbf = NULL;
+

if (!(item = pdch_ulc_get_node(ulc, fn))) {
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
@@ -655,169 +661,190 @@
return;
}

-   if (request->ID.UnionType) {
-   struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
-   struct gprs_rlcmac_dl_tbf *dl_tbf = NULL;
+   /* First gather MS from TLLI/DL_TFI/UL_TFI:*/
+   if (request->ID.UnionType) { /* ID_TYPE = TLLI */
uint32_t tlli = request->ID.u.TLLI;
-
-   GprsMs *ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+   ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
ms = bts_alloc_ms(bts, 0, 0); /* ms class updated later 
*/
ms_set_tlli(ms, tlli);
}
-
-   /* Keep the ms, even if it gets idle temporarily */
-   ms_ref(ms);
-
-   switch (item->type) {
-   case PDCH_ULC_NODE_TBF_USF:
-   /* Is it actually valid for an MS to send a PKT Res Req 
during USF? */
-   ul_tbf = item->tbf_usf.ul_tbf;
-   LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE 
REQ: "
-   "Unexpectedly received, waiting USF of %s\n",
-   fn, tbf_name(item->tbf_usf.ul_tbf));
-/* Ignore it, let common path expire related ULC entry 
*/
-   goto return_unref;
-   case PDCH_ULC_NODE_SBA:
-   sba = item->sba.sba;
-   LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE 
REQ: "
-   "MS requests UL TBF throguh SBA\n", fn);
-   ms_set_ta(ms, sba->ta);
-   sba_free(sba);
-   /* If MS identified by TLLI sent us a PktResReq through 
SBA, it means it came
-* from CCCH, so it's for sure not using previous UL
-* TBF; drop it if it still exits on our end: */
-   if ((ul_tbf = ms_ul_tbf(ms))) {
-   /* Get rid of previous finished UL TBF before 
providing a new one */
-   LOGPTBFUL(ul_tbf, LOGL_NOTICE,
- "Got PACKET RESOURCE REQ while TBF 
not finished, killing pending UL TBF\n");
-  

Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-12-03 Thread pespin
Attention is currently required from: lynxis lazus.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 4: Code-Review+2


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Reviewer: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Sat, 03 Dec 2022 23:32:54 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-12-03 Thread laforge
Attention is currently required from: pespin, lynxis lazus.
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Sat, 03 Dec 2022 08:38:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-12-03 Thread fixeria
Attention is currently required from: pespin, lynxis lazus.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 4: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: pespin 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Sat, 03 Dec 2022 08:29:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-12-02 Thread pespin
Attention is currently required from: fixeria, lynxis lazus.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 4:

(1 comment)

Patchset:

PS4:
ping?



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Fri, 02 Dec 2022 14:12:24 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-29 Thread pespin
Attention is currently required from: fixeria, lynxis lazus.
Hello Jenkins Builder, fixeria, lynxis lazus, msuraev,

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

https://gerrit.osmocom.org/c/osmo-pcu/+/30293

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

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..

pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

This patch refactors rcv_resource_request() in several ways:
* Move the ID_TYPE=DL/UL_TFI  handling at the start of the function, so
  that the function is split in 2 sections: First section gathers a
  GprsMS object from the ID_TYPE in the PktResReq. Second section
  handles the packet for the GprsMS based on the expectd ULC slot.
* Initial handling of PktResReq when transmitted by the MS on the UL-TBF
  as an answer to USF. This case is basically the one where the MS
  wishes to change some parameters of the currently active UL-TBF.
  In order to do so, for now simply delete the current TBF and re-create
  a new one to triger the PktUlAss which is expected by the MS.
  This behavior is not entirely correct since in this case the MS is
  expected to keep using actively the old TBF until the PktUlAss is
  received, so in this case ideally we should be keeping the TBF object
  and simply upgrading it and using itself to trigger a PktUlAss in its
  ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it
  can be done later as an incremental step fix. The current behavior is
  alreday better than the previous one, since the MS has been tested to
  be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF.

Related: OS#4947
Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
---
M src/pdch.cpp
1 file changed, 169 insertions(+), 142 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/30293/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30293
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 4
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-29 Thread pespin
Attention is currently required from: fixeria, lynxis lazus.
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 3:

(3 comments)

Patchset:

PS3:
> LGTM except our linter is sleeping again. […]
TTCN3: Not yet for the new scenario, it is part of the TODO of the ticket.
Mind this doesn't aim to fully fix the situation, since doing so requires more 
work in several places to make sure everything is fine.


File src/pdch.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/c129002a_3673380b
PS3, Line 740:  /* If MS identified by TLLI sent us a PktResReq through 
SBA, it means it came
> some small indention errors.
Ack


https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/fa51db03_9a0c33bb
PS3, Line 750:  /* Similarly, it is for sure not using any DL-TBF. We
> some small indention errors.
Ack



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: fixeria 
Gerrit-Attention: lynxis lazus 
Gerrit-Comment-Date: Tue, 29 Nov 2022 15:33:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: lynxis lazus 
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-28 Thread lynxis lazus
Attention is currently required from: pespin, fixeria.
lynxis lazus has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 3:

(3 comments)

Patchset:

PS3:
LGTM except our linter is sleeping again.

I guess we don't have tttcn3 or unit tests covering this?


File src/pdch.cpp:

https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/a5548643_fdbdd6b0
PS3, Line 740:  /* If MS identified by TLLI sent us a PktResReq through 
SBA, it means it came
some small indention errors.


https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/08131f92_521a143b
PS3, Line 750:  /* Similarly, it is for sure not using any DL-TBF. We
some small indention errors.



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: lynxis lazus 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Mon, 28 Nov 2022 15:49:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-27 Thread msuraev
Attention is currently required from: pespin, fixeria.
msuraev has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 3: Code-Review+1


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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: msuraev 
Gerrit-Attention: pespin 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Sun, 27 Nov 2022 14:08:17 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-24 Thread pespin
pespin has uploaded a new patch set (#3). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..

pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

This patch refactors rcv_resource_request() in several ways:
* Move the ID_TYPE=DL/UL_TFI  handling at the start of the function, so
  that the function is split in 2 sections: First section gathers a
  GprsMS object from the ID_TYPE in the PktResReq. Second section
  handles the packet for the GprsMS based on the expectd ULC slot.
* Initial handling of PktResReq when transmitted by the MS on the UL-TBF
  as an answer to USF. This case is basically the one where the MS
  wishes to change some parameters of the currently active UL-TBF.
  In order to do so, for now simply delete the current TBF and re-create
  a new one to triger the PktUlAss which is expected by the MS.
  This behavior is not entirely correct since in this case the MS is
  expected to keep using actively the old TBF until the PktUlAss is
  received, so in this case ideally we should be keeping the TBF object
  and simply upgrading it and using itself to trigger a PktUlAss in its
  ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it
  can be done later as an incremental step fix. The current behavior is
  alreday better than the previous one, since the MS has been tested to
  be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF.

Related: OS#4947
Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
---
M src/pdch.cpp
1 file changed, 167 insertions(+), 142 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/30293/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30293
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 3
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-24 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 2:

(1 comment)

File src/pdch.cpp:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1292):
https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/2fbc4cc1_7031081c
PS2, Line 722:   * This is requried by spec, and MS are know to 
continue using the TBF (due to delay in between DL and
'requried' may be misspelled - perhaps 'required'?



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 Nov 2022 15:23:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-24 Thread pespin
pespin has uploaded a new patch set (#2). ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..

pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

This patch refactors rcv_resource_request() in several ways:
* Move the ID_TYPE=DL/UL_TFI  handling at the start of the function, so
  that the function is split in 2 sections: First section gathers a
  GprsMS object from the ID_TYPE in the PktResReq. Second section
  handles the packet for the GprsMS based on the expectd ULC slot.
* Initial handling of PktResReq when transmitted by the MS on the UL-TBF
  as an answer to USF. This case is basically the one where the MS
  wishes to change some parameters of the currently active UL-TBF.
  In order to do so, for now simply delete the current TBF and re-create
  a new one to triger the PktUlAss which is expected by the MS.
  This behavior is not entirely correct since in this case the MS is
  expected to keep using actively the old TBF until the PktUlAss is
  received, so in this case ideally we should be keeping the TBF object
  and simply upgrading it and using itself to trigger a PktUlAss in its
  ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it
  can be done later as an incremental step fix. The current behavior is
  alreday better than the previous one, since the MS has been tested to
  be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF.

Related: OS#4947
Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
---
M src/pdch.cpp
1 file changed, 167 insertions(+), 142 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/30293/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30293
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-24 Thread Jenkins Builder
Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )

Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..


Patch Set 1:

(1 comment)

File src/pdch.cpp:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1291):
https://gerrit.osmocom.org/c/osmo-pcu/+/30293/comment/9e6ff8f3_9290ead3
PS1, Line 726:   * This is requried by spec, and MS are know to 
continue using the TBF (due to delay in between DL and
'requried' may be misspelled - perhaps 'required'?



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

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
Gerrit-Change-Number: 30293
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Thu, 24 Nov 2022 15:22:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-pcu[master]: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

2022-11-24 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-pcu/+/30293 )


Change subject: pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI
..

pdch: Initial support Handling PktResReq with ID_TYPE=UL/DL_TFI

This patch refactors rcv_resource_request() in several ways:
* Move the ID_TYPE=DL/UL_TFI  handling at the start of the function, so
  that the function is split in 2 sections: First section gathers a
  GprsMS object from the ID_TYPE in the PktResReq. Second section
  handles the packet for the GprsMS based on the expectd ULC slot.
* Initial handling of PktResReq when transmitted by the MS on the UL-TBF
  as an answer to USF. This case is basically the one where the MS
  wishes to change some parameters of the currently active UL-TBF.
  In order to do so, for now simply delete the current TBF and re-create
  a new one to triger the PktUlAss which is expected by the MS.
  This behavior is not entirely correct since in this case the MS is
  expected to keep using actively the old TBF until the PktUlAss is
  received, so in this case ideally we should be keeping the TBF object
  and simply upgrading it and using itself to trigger a PktUlAss in its
  ul_tbf->ul_ass_fsm. Doing this however requires far more work, so it
  can be done later as an incremental step fix. The current behavior is
  alreday better than the previous one, since the MS has been tested to
  be PKT_CTRL_ACKing the PKT_UL_ASS and continuing to use the new TBF.

Related: OS#4947
Change-Id: Ie6b1b438d26cd977f88ddb4eff6b3041e0739d92
---
M src/pdch.cpp
1 file changed, 169 insertions(+), 140 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/93/30293/1

diff --git a/src/pdch.cpp b/src/pdch.cpp
index 0988af6..90917f2 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -644,10 +644,16 @@
 
 void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t 
*request, uint32_t fn, struct pcu_l1_meas *meas)
 {
-   struct gprs_rlcmac_sba *sba;
int rc;
struct gprs_rlcmac_bts *bts = trx->bts;
struct pdch_ulc_node *item;
+   char buf[128];
+   struct GprsMs *ms = NULL;
+   struct gprs_rlcmac_sba *sba;
+   struct gprs_rlcmac_dl_tbf *dl_tbf = NULL;
+   struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
+   struct gprs_rlcmac_ul_tbf *new_ul_tbf = NULL;
+

if (!(item = pdch_ulc_get_node(ulc, fn))) {
LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE REQ: "
@@ -655,144 +661,15 @@
return;
}

-   if (request->ID.UnionType) {
-   struct gprs_rlcmac_ul_tbf *ul_tbf = NULL;
-   struct gprs_rlcmac_dl_tbf *dl_tbf = NULL;
+   /* First gather MS from TLLI/DL_TFI/UL_TFI:*/
+   if (request->ID.UnionType) { /* ID_TYPE = TLLI */
uint32_t tlli = request->ID.u.TLLI;
-
-   GprsMs *ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
+   ms = bts_ms_by_tlli(bts, tlli, GSM_RESERVED_TMSI);
if (!ms) {
ms = bts_alloc_ms(bts, 0, 0); /* ms class updated later 
*/
ms_set_tlli(ms, tlli);
}
-
-   /* Keep the ms, even if it gets idle temporarily */
-   ms_ref(ms);
-
-   switch (item->type) {
-   case PDCH_ULC_NODE_TBF_USF:
-   /* Is it actually valid for an MS to send a PKT Res Req 
during USF? */
-   ul_tbf = item->tbf_usf.ul_tbf;
-   LOGPDCH(this, DRLCMAC, LOGL_NOTICE, "FN=%u PKT RESOURCE 
REQ: "
-   "Unexpectedly received, waiting USF of %s\n",
-   fn, tbf_name(item->tbf_usf.ul_tbf));
-/* Ignore it, let common path expire related ULC entry 
*/
-   goto return_unref;
-   case PDCH_ULC_NODE_SBA:
-   sba = item->sba.sba;
-   LOGPDCH(this, DRLCMAC, LOGL_DEBUG, "FN=%u PKT RESOURCE 
REQ: "
-   "MS requests UL TBF throguh SBA\n", fn);
-   ms_set_ta(ms, sba->ta);
-   sba_free(sba);
-   /* If MS identified by TLLI sent us a PktResReq through 
SBA, it means it came
-* from CCCH, so it's for sure not using previous UL
-* TBF; drop it if it still exits on our end: */
-   if ((ul_tbf = ms_ul_tbf(ms))) {
-   /* Get rid of previous finished UL TBF before 
providing a new one */
-   LOGPTBFUL(ul_tbf, LOGL_NOTICE,
- "Got PACKET RESOURCE REQ while TBF 
not finished, killing pending UL TBF\n");
-   tbf_free(ul_tbf);
-   ul_tbf = NULL;
-   }
-