pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33889 )
Change subject: rlcmac: Avoid discard packets when in Countdown procedure
......................................................................
rlcmac: Avoid discard packets when in Countdown procedure
Discarding a packet through CoDel during Countdown procedure may end up
in the transmitted CV=14..0 being incorrect, since we are not really yet
recalculating them once we enter Countdown procedure.
Hence, to make it simpler for now, avoid dropping packets when in
Countdown procedure to avoid having to recalculate them.
Change-Id: I311302b5282767dc806b1dfe053994f175390b69
---
M include/osmocom/gprs/rlcmac/llc_queue.h
M src/rlcmac/llc_queue.c
M src/rlcmac/tbf_ul.c
3 files changed, 23 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/include/osmocom/gprs/rlcmac/llc_queue.h b/include/osmocom/gprs/rlcmac/llc_queue.h
index 842969e..331f33b 100644
--- a/include/osmocom/gprs/rlcmac/llc_queue.h
+++ b/include/osmocom/gprs/rlcmac/llc_queue.h
@@ -51,7 +51,7 @@
int gprs_rlcmac_llc_queue_enqueue(struct gprs_rlcmac_llc_queue *q, uint8_t *ll_pdu, unsigned int ll_pdu_len,
enum osmo_gprs_rlcmac_llc_sapi sapi, uint8_t radio_prio);
-struct msgb *gprs_rlcmac_llc_queue_dequeue(struct gprs_rlcmac_llc_queue *q);
+struct msgb *gprs_rlcmac_llc_queue_dequeue(struct gprs_rlcmac_llc_queue *q, bool can_discard);
uint8_t gprs_rlcmac_llc_queue_highest_radio_prio_pending(struct gprs_rlcmac_llc_queue *q);
void gprs_rlcmac_llc_queue_merge_prepend(struct gprs_rlcmac_llc_queue *q, struct gprs_rlcmac_llc_queue *old_q);
diff --git a/src/rlcmac/llc_queue.c b/src/rlcmac/llc_queue.c
index 3ff80d9..066df47 100644
--- a/src/rlcmac/llc_queue.c
+++ b/src/rlcmac/llc_queue.c
@@ -182,7 +182,7 @@
return msg;
}
-struct msgb *gprs_rlcmac_llc_queue_dequeue(struct gprs_rlcmac_llc_queue *q)
+struct msgb *gprs_rlcmac_llc_queue_dequeue(struct gprs_rlcmac_llc_queue *q, bool can_discard)
{
struct msgb *msg;
struct timespec tv_now;
@@ -194,7 +194,7 @@
while ((msg = gprs_rlcmac_llc_queue_pick_msg(q, &prioq))) {
ehdr = msgb_l1(msg);
- if (q->use_codel) {
+ if (can_discard && q->use_codel) {
int bytes = gprs_rlcmac_llc_queue_octets(q);
if (gprs_codel_control(&prioq->codel_state, &ehdr->recv_time, &tv_now, bytes)) {
/* Drop frame: */
diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index baa5ec0..6957658 100644
--- a/src/rlcmac/tbf_ul.c
+++ b/src/rlcmac/tbf_ul.c
@@ -375,7 +375,11 @@
llc_queue = gprs_rlcmac_ul_tbf_llc_queue(ul_tbf);
/* dequeue next LLC frame, if any */
- ul_tbf->llc_tx_msg = gprs_rlcmac_llc_queue_dequeue(llc_queue);
+ /* Improve: Ideally we could be able to discard as long as current CV !=0
+ * (because we must tell PCU that we are done), and if a frame is discarded probably do:
+ * ul_tbf->countdown_proc.cv = gprs_rlcmac_ul_tbf_calculate_cv(ul_tbf);
+ */
+ ul_tbf->llc_tx_msg = gprs_rlcmac_llc_queue_dequeue(llc_queue, !ul_tbf->countdown_proc.active);
if (!ul_tbf->llc_tx_msg)
return;
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33889
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I311302b5282767dc806b1dfe053994f175390b69
Gerrit-Change-Number: 33889
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33888 )
Change subject: rlcmac: ul_tbf: Move logic selecting proper queue to helper function
......................................................................
rlcmac: ul_tbf: Move logic selecting proper queue to helper function
This clarifies the logic behind selecting the proper queue, and it will
be used further in the future, for instance when recalculating CV once
already in Countdown procedure.
Change-Id: Icceaf53048e9662176385b2976e2bc8e3387df71
---
M src/rlcmac/tbf_ul.c
1 file changed, 26 insertions(+), 4 deletions(-)
Approvals:
osmith: Looks good to me, but someone else must approve
Jenkins Builder: Verified
pespin: Looks good to me, approved
diff --git a/src/rlcmac/tbf_ul.c b/src/rlcmac/tbf_ul.c
index 0d78383..baa5ec0 100644
--- a/src/rlcmac/tbf_ul.c
+++ b/src/rlcmac/tbf_ul.c
@@ -328,6 +328,18 @@
return NULL;
}
+/* Returns the MS/GRE queue unless the UL TBF has entered Countdown Procedure.
+ * In that case, it returns the specific frozen queue. */
+static struct gprs_rlcmac_llc_queue *gprs_rlcmac_ul_tbf_llc_queue(const struct gprs_rlcmac_ul_tbf *ul_tbf)
+{
+ struct gprs_rlcmac_llc_queue *llc_queue;
+ if (ul_tbf->countdown_proc.active)
+ llc_queue = ul_tbf->countdown_proc.llc_queue;
+ else
+ llc_queue = ul_tbf->tbf.gre->llc_queue;
+ return llc_queue;
+}
+
bool gprs_rlcmac_ul_tbf_have_data(const struct gprs_rlcmac_ul_tbf *ul_tbf)
{
if (ul_tbf->llc_tx_msg && msgb_length(ul_tbf->llc_tx_msg) > 0)
@@ -360,10 +372,7 @@
msgb_free(ul_tbf->llc_tx_msg);
- if (ul_tbf->countdown_proc.active)
- llc_queue = ul_tbf->countdown_proc.llc_queue;
- else
- llc_queue = ul_tbf->tbf.gre->llc_queue;
+ llc_queue = gprs_rlcmac_ul_tbf_llc_queue(ul_tbf);
/* dequeue next LLC frame, if any */
ul_tbf->llc_tx_msg = gprs_rlcmac_llc_queue_dequeue(llc_queue);
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33888
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: Icceaf53048e9662176385b2976e2bc8e3387df71
Gerrit-Change-Number: 33888
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/33886 )
Change subject: rlcmac: Mark received BSNs falling out of the V(N)/RBB when V(R) is raised
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/33886
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I962111995e741a7e9c230b2dd4904c2fa9a828e9
Gerrit-Change-Number: 33886
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 24 Jul 2023 13:59:11 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/33845 )
Change subject: layer23: modem: gmm: Update own TLLI copy though GMMRR-Assign.req hook
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
File src/host/layer23/src/modem/gmm.c:
https://gerrit.osmocom.org/c/osmocom-bb/+/33845/comment/1481ae2f_6d231b5a
PS1, Line 143: OSMO_ASSERT(gmm_prim->oph.primitive == OSMO_GPRS_GMM_GMMRR_ASSIGN);
> I also thought about it initially but I'm not sure we are really worth is, since in principle this f […]
Not blocking.
--
To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/33845
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: I5c6a2c371ae6d65bf4fe23e665ec939da37112be
Gerrit-Change-Number: 33845
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 24 Jul 2023 13:48:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment