pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30220 )
Change subject: Split tbf_fsm as tbf_{ul,dl}_fsm
......................................................................
Split tbf_fsm as tbf_{ul,dl}_fsm
The 2 types of TBF share some parts of the implementation, but actually
half of the code is specific to one direction or another.
Since FSM are becoming (and will become even) more complex, split the
FSM implementation into 2 separate FSMs, one for each direction.
The FSM interface is kept compatible (events and states), hence code can
still operate on the tbfs on events and states which are shared.
Test output changes are mainly due to:
* FSM instance now created in subclass constructor, so order of log
lines during constructor of parent class and subclass slightly
changes.
* osmo_fsm doesn't allow having 2 FSM types with same name registered,
hence the "TBF" name has to be changed to "DL_TBF" and "UL_TBF" for
each FSM class.
* FSM classes now use DTBFUL and DTBFDL instead of DTBF for logging. Some
tests don't have those categories enabled, hence some log lines
dissappear (it's actually fine we don't care about those in the test
cases).
Change-Id: I879af3f4b3e330687d498cd59f5f4933d6ca56f0
---
M src/Makefile.am
M src/pcu_vty_functions.cpp
M src/tbf.cpp
M src/tbf.h
M src/tbf_dl.cpp
M src/tbf_dl.h
A src/tbf_dl_fsm.c
M src/tbf_fsm.c
M src/tbf_fsm.h
M src/tbf_ul.cpp
M src/tbf_ul.h
A src/tbf_ul_fsm.c
M tests/alloc/AllocTest.err
M tests/tbf/TbfTest.err
M tests/types/TypesTest.err
15 files changed, 1,472 insertions(+), 100,908 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30220
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I879af3f4b3e330687d498cd59f5f4933d6ca56f0
Gerrit-Change-Number: 30220
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: osmith, fixeria, msuraev.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30220 )
Change subject: Split tbf_fsm as tbf_{ul,dl}_fsm
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
File src/tbf_dl_fsm.c:
https://gerrit.osmocom.org/c/osmo-pcu/+/30220/comment/99a7e1f4_8f12869f
PS3, Line 182: osmo_fsm_inst_dispatch(tbf_ul_ass_fi(ctx->tbf), TBF_UL_ASS_EV_ABORT, NULL);
> just to be sure, dispatching to the UL FSM is done on purpose here?
Yes a DL TBF can be used to assign a new UL TBF through PACCH.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30220
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I879af3f4b3e330687d498cd59f5f4933d6ca56f0
Gerrit-Change-Number: 30220
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 21 Nov 2022 11:26:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: comment
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30213 )
Change subject: osmux: Use new osmux_xfrm_input API to set name on each link
......................................................................
osmux: Use new osmux_xfrm_input API to set name on each link
Change-Id: Iaea980a2e11282add12f9af585500d90f0462279
Depends: libosmo-netif.git Change-Id 8bb688e4827f345416c2a4526ced956a07fcc60b
---
M src/common/osmux.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/osmux.c b/src/common/osmux.c
index fa0f7cc..9d3c5ed 100644
--- a/src/common/osmux.c
+++ b/src/common/osmux.c
@@ -165,6 +165,7 @@
static struct osmux_handle *osmux_handle_alloc(struct gsm_bts *bts, const struct osmo_sockaddr *rem_addr)
{
struct osmux_handle *h;
+ char name[128] = "r=";
h = talloc_zero(bts, struct osmux_handle);
if (!h)
@@ -178,6 +179,9 @@
talloc_free(h);
return NULL;
}
+
+ osmo_sockaddr_to_str_buf(name + 2, sizeof(name) - 2, rem_addr);
+ osmux_xfrm_input_set_name(h->in, name);
/* sequence number to start OSMUX message from */
osmux_xfrm_input_set_initial_seqnum(h->in, 0);
osmux_xfrm_input_set_batch_factor(h->in, bts->osmux.batch_factor);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30213
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Iaea980a2e11282add12f9af585500d90f0462279
Gerrit-Change-Number: 30213
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/30212 )
Change subject: osmux: Use new osmux_xfrm_input API to set name on each link
......................................................................
osmux: Use new osmux_xfrm_input API to set name on each link
Depends: libosmo-netif.git Change-Id 8bb688e4827f345416c2a4526ced956a07fcc60b
Change-Id: Id5b7d497be4b3405403d30e40e1a52f13101cf5f
---
M src/libosmo-mgcp/mgcp_osmux.c
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/libosmo-mgcp/mgcp_osmux.c b/src/libosmo-mgcp/mgcp_osmux.c
index fcff841..185aecd 100644
--- a/src/libosmo-mgcp/mgcp_osmux.c
+++ b/src/libosmo-mgcp/mgcp_osmux.c
@@ -155,6 +155,7 @@
{
struct osmux_handle *h;
const struct mgcp_config *cfg = trunk->cfg;
+ char name[128] = "r=";
h = talloc_zero(trunk, struct osmux_handle);
if (!h)
@@ -167,6 +168,9 @@
talloc_free(h);
return NULL;
}
+
+ osmo_sockaddr_to_str_buf(name + 2, sizeof(name) - 2, rem_addr);
+ osmux_xfrm_input_set_name(h->in, name);
/* sequence number to start OSMUX message from */
osmux_xfrm_input_set_initial_seqnum(h->in, 0);
osmux_xfrm_input_set_batch_factor(h->in, cfg->osmux.batch_factor);
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/30212
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Id5b7d497be4b3405403d30e40e1a52f13101cf5f
Gerrit-Change-Number: 30212
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30224 )
Change subject: osmux: Check received osmuxh->amr_ft is correct before using it
......................................................................
osmux: Check received osmuxh->amr_ft is correct before using it
Fixes: Coverity CID#283432
Change-Id: Iab525c5b7eb1e455a8229fb39e96897aac53298c
---
M src/osmux_output.c
1 file changed, 5 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
fixeria: Looks good to me, but someone else must approve
osmith: Looks good to me, but someone else must approve
msuraev: Looks good to me, but someone else must approve
diff --git a/src/osmux_output.c b/src/osmux_output.c
index a6e6513..6b9f451 100644
--- a/src/osmux_output.c
+++ b/src/osmux_output.c
@@ -68,6 +68,11 @@
case OSMUX_FT_VOICE_AMR:
break;
case OSMUX_FT_DUMMY:
+ if (!osmo_amr_ft_valid(osmuxh->amr_ft)) {
+ LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: amr_ft=%u\n",
+ osmuxh->amr_ft);
+ return NULL;
+ }
len = osmux_ft_dummy_size(osmuxh->amr_ft, osmuxh->ctr + 1);
if (msgb_length(msg) < len) {
LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: %s\n",
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/30224
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Iab525c5b7eb1e455a8229fb39e96897aac53298c
Gerrit-Change-Number: 30224
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged