laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34984?usp=email )
Change subject: LAPD: Always update N(R) in pending TX frames if V(R) is incremented
......................................................................
LAPD: Always update N(R) in pending TX frames if V(R) is incremented
The outcome of the update function is still used to indicate if an RR
frame must be sent or not. Only if there is no I frame in the TX queue,
RR frame must be sent.
Related: OS#4074
Change-Id: I71676c709878105bfd18b9370fecc61b92796a6f
---
M src/gsm/lapdm.c
M src/isdn/lapd_core.c
2 files changed, 25 insertions(+), 8 deletions(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 86dc242..43f5662 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -658,7 +658,8 @@
LAPDm_CTRL_PF_BIT(msg->l2h[1]));
rc = 0;
} else if (LAPDm_CTRL_is_S(msg->l2h[1])) {
- LOGDL(dl, LOGL_ERROR, "Supervisory frame in queue, this shouldn't happen\n");
+ msg->l2h[1] = LAPDm_CTRL_S(dl->v_recv, LAPDm_CTRL_S_BITS(msg->l2h[1]),
+ LAPDm_CTRL_PF_BIT(msg->l2h[1]));
}
}
diff --git a/src/isdn/lapd_core.c b/src/isdn/lapd_core.c
index e352189..57a0225 100644
--- a/src/isdn/lapd_core.c
+++ b/src/isdn/lapd_core.c
@@ -1525,6 +1525,7 @@
uint8_t ns = lctx->n_send;
int length = lctx->length;
int rc;
+ bool i_frame_in_queue = false;
LOGDL(dl, LOGL_INFO, "I received in state %s on SAPI(%u)\n",
lapd_state_name(dl->state), lctx->sapi);
@@ -1615,6 +1616,13 @@
dl->v_recv = inc_mod(dl->v_recv, dl->v_range);
LOGDL(dl, LOGL_INFO, "incrementing V(R) to %u\n", dl->v_recv);
+ /* Update all pending frames in the queue to the new V(R) state. */
+ if (dl->update_pending_frames) {
+ rc = dl->update_pending_frames(lctx);
+ if (!rc)
+ i_frame_in_queue = true;
+ }
+
/* 5.5.3.1: Acknowlege all transmitted frames up the the N(R)-1 */
lapd_acknowledge(lctx); /* V(A) is also set here */
@@ -1680,13 +1688,7 @@
if (!dl->own_busy) {
/* NOTE: V(R) is already set above */
rc = lapd_send_i(dl, __LINE__, false);
-
- /* if update_pending_iframe returns 0 it updated
- * the lapd header of an iframe in the tx queue */
- if (rc && dl->update_pending_frames)
- rc = dl->update_pending_frames(lctx);
-
- if (rc) {
+ if (rc && !i_frame_in_queue) {
LOGDL(dl, LOGL_INFO, "we are not busy and have no pending data, "
"send RR\n");
/* Send RR with F=0 */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34984?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I71676c709878105bfd18b9370fecc61b92796a6f
Gerrit-Change-Number: 34984
Gerrit-PatchSet: 5
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: jolly.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34986?usp=email )
Change subject: LAPDm: Add support for RTS based polling
......................................................................
Patch Set 9: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34986?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6ebe83f829d7751ea9de1d90eb478c7a628db64c
Gerrit-Change-Number: 34986
Gerrit-PatchSet: 9
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Wed, 15 Nov 2023 21:28:01 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: jolly.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/34985?usp=email )
Change subject: LAPD: Add support for RTS based polling and T200
......................................................................
Patch Set 6: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34985?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ib961b5a44911b99b0487641533301749c0286995
Gerrit-Change-Number: 34985
Gerrit-PatchSet: 6
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Wed, 15 Nov 2023 21:27:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: arehbein, fixeria, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email )
Change subject: Introduce per-BTS timers, RLC timer commands
......................................................................
Patch Set 12:
(2 comments)
File src/osmo-bsc/bts_init.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/06a4a40c_5c500598
PS12, Line 41: _templates
> I am wondering why `_templates`? `_def` or `_defaults` maybe?
(I think the term "template" is fine and accurate, i assume no vty edits these)
File src/osmo-bsc/bts_vty.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/31878/comment/f216e673_fd0b3aa1
PS3, Line 2068:
> (explanation in comment above https://gerrit.osmocom. […]
In general, the tdefs API was made modular with flexible re-use in mind.
I havent gone into the smallest details of reading this -- I might find a simplification here or there but in general, I think that this is the way to go: plug tdefs API functions to a custom vty "frontend", tailored to per-BTS timers, which is not provided by the tdefs API in itself.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2c24110d8c977d6cc74c3c8e77bcc709ad9d2675
Gerrit-Change-Number: 31878
Gerrit-PatchSet: 12
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 15 Nov 2023 19:43:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email )
Change subject: Introduce per-BTS timers, RLC timer commands
......................................................................
Patch Set 12: Code-Review-1
(1 comment)
Patchset:
PS12:
Hmm, the task this patch has is actually quite difficult, for these reasons:
- the osmo_tdefs API was implemented with T1234 and X1234 in mind, but not N1234. Looks like we won't get around adding another namespace for N, in the libosmocore tdef API itself. Mainly because T3101 and N3101 collide. (If it's only this one maybe we want an ugly workaround instead? T23101 is N3101?).
Adding the 'N' category is a separate discussion, Vadim and I discussed it a bit in PM and let's say there's potential for diverse opinions.
- the osmo_tdefs API was implemented with a single global timer config in mind, not individual per-object timers. The tdefs API is modular enough to be helpful in implementing this, so no problem here, just many choices to be made.
- confusion: we already have a global timer 'net' / 'T3101'; now we are also adding a per-BTS T3101 as well as N3101. So per-BTS for GPRS, but only global T for CS. And these seemingly identical T3101 items do not interact...? ("are you sure they are separate?" / "did you really use the correct T3101?"...)
I'll not dive into per-line comments now, but I'd like to already say that we need to still work on this patch (and it's not arehbein's fault)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31878?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I2c24110d8c977d6cc74c3c8e77bcc709ad9d2675
Gerrit-Change-Number: 31878
Gerrit-PatchSet: 12
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 15 Nov 2023 19:27:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment