osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/42204?usp=email )
Change subject: checkpatch.conf: lint more code
......................................................................
checkpatch.conf: lint more code
The current linter configuration misses to find lots of formatting
errors as we've seen here:
https://gerrit.osmocom.org/c/osmo-trx/+/42198/comments/f8f1b5a2_3c7e1389
This is caused by the following exclude rules in .checkpatch.conf, which
were added there to avoid that some of the checkpatch rules don't work
correctly with C++ code:
---exclude .*h
---exclude Transceiver52M/grgsm_vitac/.*
---exclude utils/va-test/.*
Fix this by splitting the .checkpatch.conf into two files,
.checkpatch.c.conf and .checkpatch.c++.conf. Let the C version use the
default rules. Let the C++ version ignore the rules that don't work with
C++ code:
* SPACING
Fails on:
std::vector<std::string>
With:
ERROR:SPACING: spaces required around that '<' (ctx:VxV)
ERROR:SPACING: spaces required around that '>' (ctx:VxW)
* FUNCTION_ARGUMENTS
Fails on:
ScopedLock lock(mLock);
With:
WARNING:FUNCTION_ARGUMENTS: function definition argument 'mLock' should also have an identifier name
* INDENTED_LABEL
Fails on:
private:
protected:
With:
WARNING:INDENTED_LABEL: labels should not be indented
* NEW_TYPEDEFS
Fails on:
typedef std::map<K,D*> Map;
With:
WARNING:NEW_TYPEDEFS: do not add new typedefs
With the new config, the linter only complains about the following
things across the existing C++ code, which seem to be legitimate linting
problems (and if not, can be ignored as well):
BRACES_NOT_NECESSARY, CODE_INDENT, LEADING_SPACE,
MULTISTATEMENT_MACRO_USE_DO_WHILE, OPEN_BRACE, POINTER_LOCATION,
PRINTF_I_OSMO, SINGLE_STATEMENT_DO_WHILE_MACRO, SPACE_BEFORE_TAB,
STATIC_CONST_CHAR_ARRAY, TABSTOP, TRAILING_WHITESPACE
Depends: osmo-ci Ia2e75d9783382cefc3900a4ab51a5a919a2cbbbc
Change-Id: I0df5b6f2f0bf1469a80a1f5859809c30f523f683
---
A .checkpatch.c++.conf
A .checkpatch.c.conf
D .checkpatch.conf
3 files changed, 10 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/.checkpatch.c++.conf b/.checkpatch.c++.conf
new file mode 100644
index 0000000..907c8b3
--- /dev/null
+++ b/.checkpatch.c++.conf
@@ -0,0 +1,7 @@
+--exclude osmocom-bb/.*
+--exclude ^.*\.c$
+--ignore FUNCTION_ARGUMENTS
+--ignore FUNCTION_WITHOUT_ARGS
+--ignore INDENTED_LABEL
+--ignore NEW_TYPEDEFS
+--ignore SPACING
diff --git a/.checkpatch.c.conf b/.checkpatch.c.conf
new file mode 100644
index 0000000..6974059
--- /dev/null
+++ b/.checkpatch.c.conf
@@ -0,0 +1,3 @@
+--exclude osmocom-bb/.*
+--exclude ^.*\.cpp$
+--exclude ^.*\.h$
diff --git a/.checkpatch.conf b/.checkpatch.conf
deleted file mode 100644
index 1699801..0000000
--- a/.checkpatch.conf
+++ /dev/null
@@ -1,5 +0,0 @@
---exclude osmocom-bb/.*
---exclude .*h
---exclude Transceiver52M/grgsm_vitac/.*
---exclude utils/va-test/.*
---ignore FUNCTION_WITHOUT_ARGS
\ No newline at end of file
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/42204?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0df5b6f2f0bf1469a80a1f5859809c30f523f683
Gerrit-Change-Number: 42204
Gerrit-PatchSet: 3
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: falconia, fixeria, pespin.
Hello Jenkins Builder, falconia, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
to look at the new patch set (#5).
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
tch: fix RTP clock not ticking for unhandled payload types
When the payload type from the DSP is not handled by the switch
in l1if_tch_rx(), rmsg stays NULL and we return 0 without calling
add_l1sap_header(), silently dropping a 20ms RTP tick.
Always allocate an empty RTP frame when rmsg is NULL so the RTP
clock keeps ticking.
Related: OS#5974
Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
---
M src/osmo-bts-sysmo/tch.c
1 file changed, 14 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/42244/5
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 5
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: falconia, fixeria, pespin.
Thorkell Thorkelsson has posted comments on this change by Thorkell Thorkelsson. ( https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email )
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
Patch Set 4:
(1 comment)
File src/osmo-bts-sysmo/tch.c:
https://gerrit.osmocom.org/c/osmo-bts/+/42244/comment/9a0fdfe3_bec50fba?usp… :
PS2, Line 601: FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented
> First of all, when a BTS receives a corrupted SID update (one that fails CRC) on TCH/AFS or TCH/AHS […]
Acknowledged
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 4
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 01 Mar 2026 21:19:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: falconia <falcon(a)freecalypso.org>
Comment-In-Reply-To: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: Thorkell Thorkelsson, falconia, fixeria, pespin.
Hello Jenkins Builder, falconia, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
to look at the new patch set (#4).
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
tch: fix RTP clock not ticking for unhandled payload types
When the payload type from the DSP is not handled by the switch
in l1if_tch_rx(), rmsg stays NULL and we return 0 without calling
add_l1sap_header(), silently dropping a 20ms RTP tick.
Always allocate an empty RTP frame when rmsg is NULL so the RTP
clock keeps ticking.
Related: OS#5974
Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Signed-off-by: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
---
M src/osmo-bts-sysmo/tch.c
1 file changed, 14 insertions(+), 8 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/42244/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 4
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Thorkell Thorkelsson, falconia, fixeria, pespin.
Jenkins Builder has posted comments on this change by Thorkell Thorkelsson. ( https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email )
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
Patch Set 3:
(1 comment)
File src/osmo-bts-sysmo/tch.c:
Robot Comment from checkpatch (run ID ):
https://gerrit.osmocom.org/c/osmo-bts/+/42244/comment/3a633eb7_a1349033?usp… :
PS3, Line 601: /* FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented. */
code indent should use tabs where possible
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 3
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 01 Mar 2026 21:16:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: Thorkell Thorkelsson, falconia, fixeria, pespin.
Hello Jenkins Builder, falconia, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
to look at the new patch set (#3).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review-1 by falconia, Verified+1 by Jenkins Builder
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
tch: fix RTP clock not ticking for unhandled payload types
When the payload type from the DSP is not handled by the switch
in l1if_tch_rx(), rmsg stays NULL and we return 0 without calling
add_l1sap_header(), silently dropping a 20ms RTP tick.
Always allocate an empty RTP frame when rmsg is NULL so the RTP
clock keeps ticking.
Related: OS#5974
Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Signed-off-by: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
---
M src/osmo-bts-sysmo/tch.c
1 file changed, 15 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/44/42244/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 3
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Attention is currently required from: Thorkell Thorkelsson, fixeria, pespin.
falconia has posted comments on this change by Thorkell Thorkelsson. ( https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email )
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
File src/osmo-bts-sysmo/tch.c:
https://gerrit.osmocom.org/c/osmo-bts/+/42244/comment/aec6ad15_7b86e380?usp… :
PS2, Line 601: FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented
> The patch catches Amr_SidBad in the generic fallback case. […]
First of all, when a BTS receives a corrupted SID update (one that fails CRC) on TCH/AFS or TCH/AHS in the middle of a DTX pause, an empty RTP tick is **not** the optimal handling. It is certainly better than getting RTP time scale out of sync, but it is not ideal. Instead the correct handling is to emit RFC 4867 representation of a SID_BAD frame: FT=8, Q=0, STI=1. But because we have the additional complication of sysmoBTS PHY being a black box (with insufficient documentation, according to the comment which you shouldn't be deleting), what we really need to do is experiment with different TCH UL conditions for AMR (including a special GSM MS that can transmit intentionally corrupted SID update blocks) and observe what sysmoBTS PHY puts out in each condition. It won't be easy - hence I currently avoid AMR and run my sysmoBTS with EFR instead...
But back to your proposed patch, there are two separate issues going on:
1. In cases when, for whatever reason, we are not able to handle the Rx frame from the sysmoBTS PHY in a truly proper manner, we should emit an empty RTP tick instead of just dropping that 20 ms quantum of time. In this regard your patch is fully proper and welcome.
2. Applying truly correct handling to AMR corner cases is a separate problem that will remain unsolved for now, until someone who cares about the combination of sysmoBTS hw with AMR invests the time and effort needed for a proper investigation.
However, I agree very strongly with Vadim that the FIXME comment should **not** be removed. Therefore, I have to CR-1 your patch for now. If you restore that FIXME comment in the next patch iteration, I will give CR+1 as the rest of your patch is fine.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 2
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 01 Mar 2026 21:08:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Attention is currently required from: falconia, fixeria, pespin.
Thorkell Thorkelsson has posted comments on this change by Thorkell Thorkelsson. ( https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email )
Change subject: tch: fix RTP clock not ticking for unhandled payload types
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bts-sysmo/tch.c:
https://gerrit.osmocom.org/c/osmo-bts/+/42244/comment/f9cfe304_73e1abba?usp… :
PS2, Line 601: FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented
> I believe this comment is still valid: `GsmL1_TchPlType_Amr_SidBad` is not handled in the switch sta […]
The patch catches Amr_SidBad in the generic fallback case. As SidBad indicates a corrupted SID with no valid AMR data, generating an empty RTP tick would be the appropriate response. Adding a specific case for it would result in the same response.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c
Gerrit-Change-Number: 42244
Gerrit-PatchSet: 2
Gerrit-Owner: Thorkell Thorkelsson <thorkellmanithorkelsson(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: falconia <falcon(a)freecalypso.org>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: falconia <falcon(a)freecalypso.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Sun, 01 Mar 2026 16:27:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>