Attention is currently required from: pespin, keith, dexter.
laforge has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmo-abis/+/32374 )
Change subject: e1d: reconnect to osmo-e1d after connection loss
......................................................................
Patch Set 12:
(2 comments)
File src/input/e1d.c:
https://gerrit.osmocom.org/c/libosmo-abis/+/32374/comment/73bac355_655db4cb
PS11, Line 340: osmo_fsm
I think this makes sense (but I wonder what happens if
we do not get a complete D_TSX_ALLOC_SIZE chu […]
you would normally need to buffer
any partial-read and wait until the remainder of the data is received. Alternatively, we
can think about switching from SOCK_STREAM to SOCK_SEQPACKET to avoid that situation in
general.
However, this then means breaking the client/server interface, which in turn means that we
have to keep the old one for backwards compatibility.
at the very least we should add a FIXME here stating that buffering of a partial/short
read (0 < ret < D_TSX_ALLOC_SIZE) should be done, and that dropping the connection
is an ugly hack until we do that.
https://gerrit.osmocom.org/c/libosmo-abis/+/32374/comment/9b28b337_4dd5707d
PS11, Line 391: osmo_fsm
Done
well, now you are dropping the data. So
let's say you want to write 256 bytes, but you can only write 100 of those. Then
you're dropping 156 bytes here, causing dis-continuity of the stream, creating buffer
under or overruns in a synchronous network where transmitter and receiver expect a certain
number of bytes per time frame.
So one would either
a) have to buffer the not-yet-written data and write it once the sokcet can be written-to
again
b) switch to a SOCK_SEQPACKET which doesn't have the stream semantics
c) add a FIXME/comment like in the read case and drop the connection to avoid the
situations described above.
--
To view, visit
https://gerrit.osmocom.org/c/libosmo-abis/+/32374
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: Iaf4d42c2f009b1d7666e319fabdeb2598aa0b338
Gerrit-Change-Number: 32374
Gerrit-PatchSet: 12
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: keith <keith(a)rhizomatica.org>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-CC: tnt <tnt(a)246tNt.com>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: keith <keith(a)rhizomatica.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Jun 2023 11:31:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: comment