fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/43161?usp=email )
Change subject: Transceiver52M: use lround() for TRXD toa/ci rounding
......................................................................
Transceiver52M: use lround() for TRXD toa/ci rounding
trxd_fill_v0_specific() and trxd_fill_v1_specific() rounded bi->toa
and bi->ci to the nearest integer using the "+ 0.5, then truncate"
idiom. That only rounds correctly for non-negative inputs: for
negative values (toa can be negative for an early burst, ci can be
negative under poor C/I conditions) it biases towards zero instead
of rounding to nearest, e.g. -1.3 + 0.5 = -0.8, truncated to 0
instead of the correct -1.
Use lround() instead, which rounds-half-away-from-zero correctly
for both signs.
Change-Id: I0c52f1b91070e4750a8a0ffbccb222454e694c3b
Related: OS#5283
---
M Transceiver52M/proto_trxd.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/61/43161/1
diff --git a/Transceiver52M/proto_trxd.c b/Transceiver52M/proto_trxd.c
index e5a889d..638f7f3 100644
--- a/Transceiver52M/proto_trxd.c
+++ b/Transceiver52M/proto_trxd.c
@@ -38,7 +38,7 @@
int toa_int;
/* in 1/256 symbols, round to closest integer */
- toa_int = (int) (bi->toa * 256.0 + 0.5);
+ toa_int = (int) lround(bi->toa * 256.0);
v0->rssi = bi->rssi;
osmo_store16be(toa_int, &v0->toa);
}
@@ -48,7 +48,7 @@
int16_t ci_int_cB;
/* deciBels->centiBels, round to closest integer */
- ci_int_cB = (int16_t)((bi->ci * 10) + 0.5);
+ ci_int_cB = (int16_t) lround(bi->ci * 10.0);
v1->idle = !!bi->idle;
v1->modulation = (bi->modulation == MODULATION_GMSK) ?
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43161?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0c52f1b91070e4750a8a0ffbccb222454e694c3b
Gerrit-Change-Number: 43161
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/43162?usp=email )
Change subject: Transceiver52M: use lround() for TRXD rssi rounding
......................................................................
Transceiver52M: use lround() for TRXD rssi rounding
trxd_fill_v0_specific() assigned bi->rssi to v0->rssi via a bare
narrowing double->uint8_t cast, silently truncating towards zero
instead of rounding to nearest. Use lround(), consistent with
the toa/ci rounding fixed in the preceding commit.
Change-Id: Ibdfe9f1b84c797bd7a50b4ee3f395c2af0ee88fd
Related: OS#5283
---
M Transceiver52M/proto_trxd.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/62/43162/1
diff --git a/Transceiver52M/proto_trxd.c b/Transceiver52M/proto_trxd.c
index 638f7f3..418daa6 100644
--- a/Transceiver52M/proto_trxd.c
+++ b/Transceiver52M/proto_trxd.c
@@ -39,7 +39,7 @@
/* in 1/256 symbols, round to closest integer */
toa_int = (int) lround(bi->toa * 256.0);
- v0->rssi = bi->rssi;
+ v0->rssi = (uint8_t) lround(bi->rssi);
osmo_store16be(toa_int, &v0->toa);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43162?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibdfe9f1b84c797bd7a50b4ee3f395c2af0ee88fd
Gerrit-Change-Number: 43162
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43107?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified+1 by Jenkins Builder
Change subject: libosmo-trx/trxc: add SETSLOT parameter parser/builder
......................................................................
libosmo-trx/trxc: add SETSLOT parameter parser/builder
Add struct osmo_trxc_setslot plus osmo_trxc_setslot_parse()/_build()
for the "<tn> <chan_comb> [C<tsc>/S<tsc_set> ...]" SETSLOT parameters,
including VAMOS combinations (VFF/VHH/VFH/HVHH) with per-sub-channel
TSC overrides.
Change-Id: I17a1176b1418edd0caf750d50acda0482d4ad04a
---
M libosmo-trx/include/osmocom/trx/trxc.h
M libosmo-trx/src/trxc.c
M tests/libosmo-trx/trxc_test.c
M tests/libosmo-trx/trxc_test.ok
4 files changed, 253 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/07/43107/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43107?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I17a1176b1418edd0caf750d50acda0482d4ad04a
Gerrit-Change-Number: 43107
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43108?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: libosmo-trx/client: add TRXC client (command queue) API
......................................................................
libosmo-trx/client: add TRXC client (command queue) API
Add the osmo_trxc_client module: a transport-agnostic generalization
of the TRXC command handling logic in osmo-bts-trx (trx_if.c):
* command queue with a single command in flight;
* retransmission on response timeout (default: 2 s);
* suppression of consecutive duplicate commands;
* RSP<->CMD matching, optionally including the parameters;
* filtering of duplicate responses caused by retransmissions;
* escalation of NACKed critical commands (OSMO_TRXC_F_CRITICAL)
to the fatal_error call-back;
* TRXD PDU version negotiation (SETFORMAT), incl. the fallback to
version 0 for old transceivers rejecting it with 'RSP ERR 1'.
The client neither opens nor owns a socket: the application transmits
serialized messages in the tx_msg call-back and feeds received
datagrams into osmo_trxc_client_rx(). The response call-back may
return N > 0 to request a re-transmission of the same command after
N seconds (e.g. POWERON retry, as implemented in osmo-bts-trx).
Change-Id: I817e394f74a10e3adae4a0b58342c82acdf0794e
---
M .gitignore
M libosmo-trx/include/Makefile.am
A libosmo-trx/include/osmocom/trx/trxc_client.h
M libosmo-trx/src/Makefile.am
A libosmo-trx/src/trxc_client.c
M tests/libosmo-trx/Makefile.am
A tests/libosmo-trx/trxc_client_test.c
A tests/libosmo-trx/trxc_client_test.err
A tests/libosmo-trx/trxc_client_test.ok
M tests/testsuite.at
10 files changed, 1,116 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/08/43108/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43108?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I817e394f74a10e3adae4a0b58342c82acdf0794e
Gerrit-Change-Number: 43108
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43109?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: libosmo-trx/client: add optional limit for retransmissions
......................................................................
libosmo-trx/client: add optional limit for retransmissions
The client used to retransmit an unacknowledged command forever, like
osmo-bts-trx does. trxcon, however, gives up after 3 retransmission
attempts, concluding that the transceiver is offline. Add a new API
function osmo_trxc_client_set_max_retrans() enabling this behavior:
once a command has been retransmitted the given number of times
without a response, the client escalates to the fatal_error call-back
(with rsp == NULL) and freezes the command queue. The default (0)
retains the old behavior (no limit).
This is a preparation for porting trxcon to libosmo-trx.
Change-Id: Ib90a032b38c69ae26023e726992d3f5f7e502fcf
---
M libosmo-trx/include/osmocom/trx/trxc_client.h
M libosmo-trx/src/trxc_client.c
M tests/libosmo-trx/trxc_client_test.c
M tests/libosmo-trx/trxc_client_test.err
M tests/libosmo-trx/trxc_client_test.ok
5 files changed, 118 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/09/43109/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43109?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ib90a032b38c69ae26023e726992d3f5f7e502fcf
Gerrit-Change-Number: 43109
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria, pespin.
Hello Jenkins Builder, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43110?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by pespin, Verified-1 by Jenkins Builder
Change subject: libosmo-trx/client: make public API operate on parsed messages
......................................................................
libosmo-trx/client: make public API operate on parsed messages
The TRXC client engine and the TRX endpoint module did not compose:
osmo_trx_ep_rx_ctrl_msg() delivers a parsed struct osmo_trxc_msg,
while osmo_trxc_client_rx() accepts a raw datagram only; likewise,
the tx_msg call-back used to emit a serialized string, while
osmo_trx_ep_send_ctrl_msg() takes the parsed structure. An
osmo_trx_ep user would have to needlessly re-parse and re-serialize
TRXC messages when gluing both modules together.
Make struct osmo_trxc_msg the currency at both module boundaries:
* add osmo_trxc_client_rx_msg(), accepting a parsed message;
osmo_trxc_client_rx() becomes a parse-first convenience wrapper
for applications managing the TRXC socket themselves;
* change the tx_msg call-back to take a parsed message: it's now
up to the transport to serialize it (osmo_trx_ep users simply
call osmo_trx_ep_send_ctrl_msg(), others osmo_trxc_msg_build()).
This is a preparation for porting trxcon to libosmo-trx.
Change-Id: Idf53513d06be2337383601494b225b5722c93129
---
M libosmo-trx/include/osmocom/trx/trxc_client.h
M libosmo-trx/src/trxc_client.c
M tests/libosmo-trx/trxc_client_test.c
3 files changed, 57 insertions(+), 44 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/10/43110/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43110?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Idf53513d06be2337383601494b225b5722c93129
Gerrit-Change-Number: 43110
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43112?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: libosmo-trx/ep: flush pending TRXC messages on endpoint teardown
......................................................................
libosmo-trx/ep: flush pending TRXC messages on endpoint teardown
osmo_trx_ep_close() used to drop any still-queued ctrl socket Tx data
via osmo_iofd_free(), including a 'goodbye' TRXC message (i.e. "CMD
POWEROFF") that may have just been enqueued right before teardown.
Detach such a ctrl_iofd from the endpoint (which may be freed right
after osmo_trx_ep_close() returns) and let it live on its own, driven
by the same event loop, until the pending write(s) complete (or fail),
at which point it closes and frees itself. Data sockets and pending Tx
data batches are still dropped immediately, as before.
This follows the async-flush pattern used by osmo-pcap's
osmo_pcap_wr_file_flush(), adapted to the osmo_io API (there is no
osmo_iofd_flush()).
Change-Id: I69e6a3bcf49afc3cfca4a72afdf459625cb91e56
---
M libosmo-trx/src/trx_ep.c
1 file changed, 46 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/12/43112/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43112?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I69e6a3bcf49afc3cfca4a72afdf459625cb91e56
Gerrit-Change-Number: 43112
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: fixeria.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/43111?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: libosmo-trx/ep: add TRX endpoint module
......................................................................
libosmo-trx/ep: add TRX endpoint module
Add the osmo_trx_ep module, encapsulating the clock/ctrl/data UDP
socket management of the TRX protocol on top of osmo_io. One endpoint
serves an (optional) clock socket plus N channels, each channel being
a ctrl + data socket pair.
The module is role-neutral: struct osmo_trx_ep_cfg carries a mode
(OSMO_TRX_EP_MODE_{L1,TRX}) selecting which side of the protocol the
endpoint implements. The mode is needed to parse datagrams received
on the data sockets, as the wire format alone does not identify the
direction (BURST.ind vs BURST.req). All local and remote ports are
derived from a single base port (default: 5700).
To avoid indirect calls on the hot path, the decoded Rx handlers
(osmo_trx_ep_rx_*) are plain function prototypes bound at link-time,
not function pointers. The library provides weak default stubs to
stay link-complete (-no-undefined), so applications only implement
the handlers for the directions they consume, overriding the stubs.
The Tx path implements TRXDv2 PDU batching for burst requests:
osmo_trx_ep_send_burst_req() accumulates PDUs until it is called
with br == NULL (the batching breaker), like in osmo-bts-trx.
osmo-trx itself will not adopt this module: its per-channel/thread
socket ownership model (dedicated blocking-read threads per socket)
is incompatible with osmo_io's single-select-loop dispatch. It is
meant for osmo-bts, osmocom-bb/trxcon, and the upcoming C rewrite
of fake_trx.
Change-Id: I767fa43a9ca88be40c385f6dcb9de22891a6afc3
---
M .gitignore
M libosmo-trx/include/Makefile.am
A libosmo-trx/include/osmocom/trx/ep.h
M libosmo-trx/src/Makefile.am
A libosmo-trx/src/trx_ep.c
M tests/libosmo-trx/Makefile.am
A tests/libosmo-trx/trx_ep_test.c
A tests/libosmo-trx/trx_ep_test.err
A tests/libosmo-trx/trx_ep_test.ok
M tests/testsuite.at
10 files changed, 1,015 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/11/43111/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43111?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I767fa43a9ca88be40c385f6dcb9de22891a6afc3
Gerrit-Change-Number: 43111
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>