tempest has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/42811?usp=email )
Change subject: trx-usrp1: make single daughterboard VTY configurable
......................................................................
trx-usrp1: make single daughterboard VTY configurable
Adds the usrp1-singledb enable/disable option to specify the
daughterboard configuration on USRP1 devices. This will allow users
to use single-daughterboard devices without compliling from source to
use the --with-singledb configure option.
Also removed some daughterboard configuration related code that
wasn't being used.
More info in the modified trx-backends.adoc
Change-Id: I618fdcc7fec1ca1e87249992798c265430c177a0
---
M CommonLibs/config_defs.h
M CommonLibs/trx_vty.c
M Transceiver52M/device/usrp1/USRPDevice.cpp
M configure.ac
M doc/manuals/chapters/trx-backends.adoc
5 files changed, 31 insertions(+), 39 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/11/42811/1
diff --git a/CommonLibs/config_defs.h b/CommonLibs/config_defs.h
index 07a3981..3b21fcb 100644
--- a/CommonLibs/config_defs.h
+++ b/CommonLibs/config_defs.h
@@ -68,4 +68,5 @@
double dl_gain;
} overrides;
bool use_va;
+ bool usrp1_singledb;
};
diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index b70b3fa..19a8f28 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -632,6 +632,23 @@
return CMD_SUCCESS;
}
+DEFUN(cfg_usrp1_singledb, cfg_usrp1_singledb_cmd,
+ "usrp1-singledb (disable|enable)",
+ "Use single daughterboard on USRP1 (default=disable)\n"
+ "Use dual daughterboard configuration (TX on DB A, RX on DB B)\n"
+ "Use single daughterboard configuration (TX/RX on DB A)\n")
+{
+ struct trx_ctx *trx = trx_from_vty(vty);
+
+ if (strcmp("disable", argv[0]) == 0)
+ trx->cfg.usrp1_singledb = false;
+
+ if (strcmp("enable", argv[0]) == 0)
+ trx->cfg.usrp1_singledb = true;
+
+ return CMD_SUCCESS;
+}
+
DEFUN(cfg_chan_rx_path, cfg_chan_rx_path_cmd,
"rx-path NAME",
"Set the Rx Path\n"
@@ -727,6 +744,8 @@
vty_out(vty, " ul-gain-override %f%s", trx->cfg.overrides.ul_gain, VTY_NEWLINE);
if (trx->cfg.use_va)
vty_out(vty, " viterbi-eq %s%s", trx->cfg.use_va ? "enable" : "disable", VTY_NEWLINE);
+ if (trx->cfg.usrp1_singledb)
+ vty_out(vty, " usrp1-singledb %s%s", trx->cfg.usrp1_singledb ? "enable" : "disable", VTY_NEWLINE);
trx_rate_ctr_threshold_write_config(vty, " ");
for (i = 0; i < trx->cfg.num_chans; i++) {
@@ -765,6 +784,7 @@
vty_out(vty, " Real Time Priority: %u (%s)%s", trx->cfg.sched_rr,
trx->cfg.sched_rr ? "Enabled" : "Disabled", VTY_NEWLINE);
vty_out(vty, " Stack size per Thread in BYTE (0 = OS default): %u%s", trx->cfg.stack_size, VTY_NEWLINE);
+ vty_out(vty, " Single daughterboard (for USRP1): %s%s", trx->cfg.usrp1_singledb ? "Enabled" : "Disabled", VTY_NEWLINE);
vty_out(vty, " Channels: %u%s", trx->cfg.num_chans, VTY_NEWLINE);
for (i = 0; i < trx->cfg.num_chans; i++) {
chan = &trx->cfg.chans[i];
@@ -877,6 +897,7 @@
install_element(TRX_NODE, &cfg_ctr_error_threshold_cmd);
install_element(TRX_NODE, &cfg_no_ctr_error_threshold_cmd);
install_element(TRX_NODE, &cfg_stack_size_cmd);
+ install_element(TRX_NODE, &cfg_usrp1_singledb_cmd);
install_element(TRX_NODE, &cfg_chan_cmd);
install_element(TRX_NODE, &cfg_ul_fn_offset_cmd);
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 21cbd7e..4b23892 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -45,19 +45,6 @@
using namespace std;
-enum dboardConfigType {
- TXA_RXB,
- TXB_RXA,
- TXA_RXA,
- TXB_RXB
-};
-
-#ifdef SINGLEDB
-const dboardConfigType dboardConfig = TXA_RXA;
-#else
-const dboardConfigType dboardConfig = TXA_RXB;
-#endif
-
const double USRPDevice::masterClockRate = 52.0e6;
USRPDevice::USRPDevice(InterfaceType iface, const struct trx_cfg *cfg) : RadioDevice(iface, cfg)
@@ -148,24 +135,10 @@
#endif
- switch (dboardConfig) {
- case TXA_RXB:
- txSubdevSpec = usrp_subdev_spec(0,0);
- rxSubdevSpec = usrp_subdev_spec(1,0);
- break;
- case TXB_RXA:
- txSubdevSpec = usrp_subdev_spec(1,0);
- rxSubdevSpec = usrp_subdev_spec(0,0);
- break;
- case TXA_RXA:
+ if (cfg->usrp1_singledb) {
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(0,0);
- break;
- case TXB_RXB:
- txSubdevSpec = usrp_subdev_spec(1,0);
- rxSubdevSpec = usrp_subdev_spec(1,0);
- break;
- default:
+ } else {
txSubdevSpec = usrp_subdev_spec(0,0);
rxSubdevSpec = usrp_subdev_spec(1,0);
}
diff --git a/configure.ac b/configure.ac
index 01b2f34..a384495 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,11 +149,6 @@
[enable MS TRX])
])
-AC_ARG_WITH(singledb, [
- AS_HELP_STRING([--with-singledb],
- [enable single daughterboard use on USRP1])
-])
-
AC_ARG_WITH(neon, [
AS_HELP_STRING([--with-neon],
[enable ARM NEON support])
@@ -229,10 +224,6 @@
AC_MSG_RESULT([no])
])
-AS_IF([test "x$with_singledb" = "xyes"], [
- AC_DEFINE(SINGLEDB, 1, Define to 1 for single daughterboard)
-])
-
# Find and define supported SIMD extensions
AS_IF([test "x$with_sse" != "xno"], [
AX_SSE
diff --git a/doc/manuals/chapters/trx-backends.adoc b/doc/manuals/chapters/trx-backends.adoc
index 021c6f4..e73f908 100644
--- a/doc/manuals/chapters/trx-backends.adoc
+++ b/doc/manuals/chapters/trx-backends.adoc
@@ -66,6 +66,12 @@
through a simple energy detector, a RACH or midamble correlator, and a DFE-based
demodulator.
+By default, osmo-trx-usrp1 will use daughterboard A for transmitting and
+daughterboard B for receiving. Some USRP1 configurations use only a single
+daughterboard for both TX and RX, and thus the receiver will not work as
+daughterboard B does not exist. Daughterboard A can be configured to be used
+for both TX and RX with `usrp1-singledb enable`.
+
NOTE: There's a `SWLOOPBACK` #define statement, where the USRP is replaced
with a memory buffer. In this mode, data written to the USRP is actually stored
in a buffer, and read commands to the USRP simply pull data from this buffer.
@@ -170,4 +176,4 @@
the code on their implemented _Driver_ program no matter it being proprietary or
under an open license. However, care must be taken with external dependencies,
as for instance shm.c uses the talloc memory allocator, which is GPL licensed
-and hence cannot be used in a proprietary driver.
\ No newline at end of file
+and hence cannot be used in a proprietary driver.
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42811?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: I618fdcc7fec1ca1e87249992798c265430c177a0
Gerrit-Change-Number: 42811
Gerrit-PatchSet: 1
Gerrit-Owner: tempest <jackleea1b(a)gmail.com>
jolly has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42775?usp=email )
Change subject: C5G: Release UE Context before sending Service request
......................................................................
C5G: Release UE Context before sending Service request
A recent fix in Open5GS rejects RAN_UE_NGAP_ID in InitialUEMessage. This
causes all tests to fail that send a subsequent InitialUEMessage with
the same RAN_UE_NGAP_ID.
Release the UE Context before re-using the RAN_UE_NGAP_ID, because the
connection handler can only handle one context at a time.
Note that the AMF_UE_NGAP_ID is incremented by Open5GS for every
context.
This fixes:
TC_ue_service_request_cm_idle_inact_sess
TC_ue_service_request_cm_idle_ul_data
TC_ue_service_request_cm_idle_unknown_sess_active
Related: Open5GS Issues #4481
Change-Id: If6fae56487aebd810c51cbab170d95d5dec7e138
---
M 5gc/C5G_Tests.ttcn
1 file changed, 14 insertions(+), 1 deletion(-)
Approvals:
jolly: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
diff --git a/5gc/C5G_Tests.ttcn b/5gc/C5G_Tests.ttcn
index f1c46c8..573bbf3 100644
--- a/5gc/C5G_Tests.ttcn
+++ b/5gc/C5G_Tests.ttcn
@@ -579,11 +579,14 @@
f_register();
f_pdu_sess_establish(configure_userplane := false);
+ f_sleep(1.0);
+ f_ue_context_release();
+ f_sleep(1.0);
pdu_session_status := f_PDU_SessionStatus();
f_service_request_cm_idle(ul_data_status := pdu_session_status,
pdu_sess_status := pdu_session_status);
- as_ngap_handle_PDUSessionResourceSetupReq();
+ as_ngap_handle_InitialCtxReq_withPDUSessionList();
NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000010'B, '00000000'B)));
@@ -602,10 +605,16 @@
/* 3GPP TS 23.502 4.2.3.2 UE Triggered Service Request.
* UE signals that the active session is now inactive. AMF sends a PFCP Session Delete to SMF. */
private function f_TC_ue_service_request_cm_idle_inact_sess() runs on ConnHdlr {
+ var NGAP_PDU rx_ngap;
+
f_register();
f_pdu_sess_establish(configure_userplane := false);
+ f_sleep(1.0);
+ f_ue_context_release();
+ f_sleep(1.0);
f_service_request_cm_idle(pdu_sess_status := cs_PDU_SessionStatus('00000000'B, '00000000'B));
NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000000'B, '00000000'B)));
+ g_pars.ue_pars.amf_id := f_ngap_obtain_amf_id();
f_deregister();
}
testcase TC_ue_service_request_cm_idle_inact_sess() runs on MTC_CT {
@@ -622,8 +631,12 @@
* UE signals that a session unknown to network is active: */
private function f_TC_ue_service_request_cm_idle_unknown_sess_active() runs on ConnHdlr {
f_register();
+ f_sleep(1.0);
+ f_ue_context_release();
+ f_sleep(1.0);
f_service_request_cm_idle(pdu_sess_status := cs_PDU_SessionStatus('00000010'B, '00000000'B));
NGAP.receive(cr_NG_SERVICE_ACCEPT(p_PDU_SessionStatus := cr_PDU_SessionStatus('00000000'B, '00000000'B)));
+ g_pars.ue_pars.amf_id := f_ngap_obtain_amf_id();
f_deregister();
}
testcase TC_ue_service_request_cm_idle_unknown_sess_active() runs on MTC_CT {
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42775?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: If6fae56487aebd810c51cbab170d95d5dec7e138
Gerrit-Change-Number: 42775
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42807?usp=email )
Change subject: Add DSCP configuration support for STP server
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
for the listening socket, you may want to add a "(no) init-ip-dscp" vty command in under the "listen" parameter, which calls
osmo_stream_srv_link_set_ip_dscp().
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42807?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I35eab3672157c318616f51ee3042243aed263d4e
Gerrit-Change-Number: 42807
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 01 Jun 2026 16:12:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-netif/+/42810?usp=email )
Change subject: Also apply DSCP settings on listening socket
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/42810?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic70422ec73c753b61843444582f8665ca42e7a6d
Gerrit-Change-Number: 42810
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 01 Jun 2026 16:10:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42809?usp=email )
Change subject: Add test case to verify proper DSCP settings
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
I bet you can test this more easily/simple by using existing vty test infrastructure. See how we test multihoming of a connection towards STP in
testMultiHome in tests/vty/vty_test_runner.py:112.
I also guess one can obtain the DSCP value from some /proc/net or some "ss" command instead of having to do all the netlink socket stuff?
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42809?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I6ac965998433b4d8213cce30fc3fcf8fe485a092
Gerrit-Change-Number: 42809
Gerrit-PatchSet: 4
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 01 Jun 2026 16:05:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42808?usp=email )
Change subject: Add DSCP configuration support for STP client
......................................................................
Patch Set 3:
(1 comment)
File src/ss7_asp_vty.c:
https://gerrit.osmocom.org/c/libosmo-sigtran/+/42808/comment/781a5bec_86f38… :
PS3, Line 413: DEFUN_ATTR(asp_ip_dscps, asp_ip_dscp_cmd,
You are missing a "no ip-dscp" command.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42808?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: Ia125a392eec5605553809774162675b5249b8494
Gerrit-Change-Number: 42808
Gerrit-PatchSet: 3
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 01 Jun 2026 16:00:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: jolly.
pespin has posted comments on this change by jolly. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42807?usp=email )
Change subject: Add DSCP configuration support for STP server
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
You need to:
1- add a osmo_stream_srv_set_ip_dscp() API in libosmo-netif, which calls internally
osmo_sock_set_dscp() on the stream socket
2- Use the new osmo_stream_srv_set_ip_dscp() from libosmo-netif in libosmo-sigtran's
xua_accept_cb(), best place before the TCP/SCTP socket params are applied (see
ss7_asp_apply_tcp_pars()).
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42807?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmo-sigtran
Gerrit-Branch: master
Gerrit-Change-Id: I35eab3672157c318616f51ee3042243aed263d4e
Gerrit-Change-Number: 42807
Gerrit-PatchSet: 2
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Comment-Date: Mon, 01 Jun 2026 15:57:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No