laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35048?usp=email )
Change subject: LAPD: Indicate sequence error after indicating received data
......................................................................
LAPD: Indicate sequence error after indicating received data
First indicated the received data in an I frame, if possible. Then
indicate the sequence error using MDL-ERROR-INDICATION. This way the
data is delivered before the error is handled by BSC.
Also there is no reason to indicate sequence error on supervisory
frames.
See §8.7.4 of 3GPP TS 44.006.
Related: OS#5968
Change-Id: I535c18018bf0df4124a5e9618238028fa31be289
---
M src/isdn/lapd_core.c
1 file changed, 34 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/src/isdn/lapd_core.c b/src/isdn/lapd_core.c
index d98edae..b32ed26 100644
--- a/src/isdn/lapd_core.c
+++ b/src/isdn/lapd_core.c
@@ -796,8 +796,9 @@
lapd_start_t200(dl);
}
-/* 5.5.3.1: Common function to acknowlege frames up to the given N(R) value */
-static void lapd_acknowledge(struct lapd_msg_ctx *lctx)
+/* 5.5.3.1: Common function to acknowlege frames up to the given N(R) value
+ * In case of a sequence error, the cause is returned with negative sign. */
+static int lapd_acknowledge(struct lapd_msg_ctx *lctx)
{
struct lapd_datalink *dl = lctx->dl;
uint8_t nr = lctx->n_recv;
@@ -838,7 +839,7 @@
*/
if (sub_mod(nr, dl->v_ack, dl->v_range) > sub_mod(dl->v_send, dl->v_ack, dl->v_range)) {
LOGDL(dl, LOGL_NOTICE, "N(R) sequence error\n");
- mdl_error(MDL_CAUSE_SEQ_ERR, lctx);
+ return -MDL_CAUSE_SEQ_ERR;
}
}
@@ -861,6 +862,8 @@
/* Start T203, if T200 is not running in MF EST state, if enabled */
if (!lapd_is_t200_started(dl) && (dl->t203_sec || dl->t203_usec) && (dl->state == LAPD_STATE_MF_EST))
lapd_start_t203(dl);
+
+ return 0;
}
/* L1 -> L2 */
@@ -1576,6 +1579,7 @@
int length = lctx->length;
int rc;
bool i_frame_in_queue = false;
+ int mdl_cause = 0;
LOGDL(dl, LOGL_INFO, "I received in state %s on SAPI(%u)\n",
lapd_state_name(dl->state), lctx->sapi);
@@ -1652,7 +1656,9 @@
}
/* Even if N(s) sequence error, acknowledge to N(R)-1 */
/* 5.5.3.1: Acknowlege all transmitted frames up the N(R)-1 */
- lapd_acknowledge(lctx); /* V(A) is also set here */
+ mdl_cause = lapd_acknowledge(lctx); /* V(A) is also set here */
+ if (mdl_cause < 0)
+ mdl_error(-mdl_cause, lctx);
/* Send message, if possible due to acknowledged data */
lapd_send_i(dl, __LINE__, false);
@@ -1673,7 +1679,7 @@
}
/* 5.5.3.1: Acknowlege all transmitted frames up the the N(R)-1 */
- lapd_acknowledge(lctx); /* V(A) is also set here */
+ mdl_cause = lapd_acknowledge(lctx); /* V(A) is also set here */
/* Only if we are not in own receiver busy condition */
if (!dl->own_busy) {
@@ -1718,6 +1724,10 @@
} else
LOGDL(dl, LOGL_INFO, "I frame ignored during own receiver busy condition\n");
+ /* Indicate sequence error, if exists. */
+ if (mdl_cause < 0)
+ mdl_error(-mdl_cause, lctx);
+
/* Check for P bit */
if (lctx->p_f) {
/* 5.5.2.1 */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35048?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: I535c18018bf0df4124a5e9618238028fa31be289
Gerrit-Change-Number: 35048
Gerrit-PatchSet: 8
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: jolly, neels.
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 9: Code-Review+2
--
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: 9
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:25:49 +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/+/35048?usp=email )
Change subject: LAPD: Indicate sequence error after indicating received data
......................................................................
Patch Set 7: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35048?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: I535c18018bf0df4124a5e9618238028fa31be289
Gerrit-Change-Number: 35048
Gerrit-PatchSet: 7
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:25:32 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: jolly, neels.
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 16: Code-Review+2
--
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: 16
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:25:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053?usp=email )
Change subject: msc: test re-assignment to match codec with MT
......................................................................
Patch Set 2: Code-Review+1
(3 comments)
File msc/BSC_ConnectionHandler.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053/comment/078ac4ba_1cf6…
PS2, Line 986: /* What to Codec (Chosen) to send back in Assignment Complete */
"What to Codec to" doesn't make sense to me?
You mean "What codec to encode/transmit back in Assignment Complete"?
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053/comment/bc9a68e1_bf65…
PS2, Line 993: BSSMAP_FIELD_CodecElements re_ass_req_codecs,
Sounds like "optional" is missing in this field.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053/comment/0ed52d20_3a44…
PS2, Line 995: re_ass_compl_chosen_codec
> Done
Sounds like "optional" is missing in this field.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35053?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I402ed0523a2a87b83f29c5577b2c828102005d53
Gerrit-Change-Number: 35053
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:18:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: arehbein.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email )
Change subject: port from osmo_stream_*_get_ofd() to osmo_stream_srv_get_fd()
......................................................................
Patch Set 3: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/35073?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Change-Id: I12c66badfb4bdfdfe71f1716de960d353d3548b1
Gerrit-Change-Number: 35073
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:17:30 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: fixeria, osmith.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35134?usp=email )
Change subject: rlp: Add support for 576bit RLP frames
......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS1:
> maybe add a new test for 576bit RLP frames?
I don't yet have any real-world captures of 576bit RLP frames, sorry. The 240bit frames were actual captured frames between modems. To get 576bit frame captures I'd have to find a set of modems with RLPv2 support over 14.4kbps channels - something I don't have available to me [yet?].
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35134?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: Idfdcabb19fe8733fb9c5ee76a39b0bf4cdf60c2c
Gerrit-Change-Number: 35134
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:16:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria, osmith.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35123?usp=email )
Change subject: Add a GSM RLP decoder and encoder
......................................................................
Patch Set 6:
(2 comments)
File src/gsm/rlp.c:
https://gerrit.osmocom.org/c/libosmocore/+/35123/comment/8adc5e49_d264ef57
PS5, Line 85: //out->fcs = (data[240/8-3] << 16) | (data[240/8-2]) << 8 | (data[240/8-1] << 0);
> do you want to keep this?
it was removed by the next patch, but I now cleaned it up and removed it here.
File tests/rlp/rlp_test.c:
https://gerrit.osmocom.org/c/libosmocore/+/35123/comment/f2502fb8_d97d439d
PS4, Line 4: #if 0
> debugging leftovers?
Done
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35123?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: I2d9bd8eb4f0cd0f72c436996767b199429596917
Gerrit-Change-Number: 35123
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 27 Nov 2023 16:15:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment