Attention is currently required from: pespin, msuraev.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30196 )
Change subject: osmux: Set M bit in osmuxhdr if seqnum hole found encoding RTP pkts
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
File src/osmux_input.c:
https://gerrit.osmocom.org/c/libosmo-netif/+/30196/comment/0e45a0f4_b039fd30
PS3, Line 156: ((state->circuit->last_transmitted_rtp_seq + 1) & 0xffff) != rtp_seqnum;
> sequence numbers are uint16_t in RTP. […]
I guess max was indirectly saying "use UINT16_MAX" (probably just because it ends in his name). More seriously, I don't think we need to worry about 0xffff being considered a magic number. To me it's more obvious than UINT16_MAX.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/30196
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I05b1eae400cb60d1f4e927f853619d5ff470163f
Gerrit-Change-Number: 30196
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: msuraev <msuraev(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 19 Nov 2022 09:05:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: comment
laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/30199 )
Change subject: firmware/sniffer: introduce #define for interrupt enable flags
......................................................................
firmware/sniffer: introduce #define for interrupt enable flags
Change-Id: Id4bc720a1db31b4433ff7b10d7a57d0ddb7d7180
---
M firmware/libcommon/source/sniffer.c
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
laforge: Looks good to me, approved
Hoernchen: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/firmware/libcommon/source/sniffer.c b/firmware/libcommon/source/sniffer.c
index 75c140c..35de58f 100644
--- a/firmware/libcommon/source/sniffer.c
+++ b/firmware/libcommon/source/sniffer.c
@@ -918,6 +918,8 @@
* Initialization routine
*-----------------------------------------------------------------------------*/
+#define SNIFFER_IER (US_IER_RXRDY | US_IER_TIMEOUT)
+
/* Called during USB enumeration after device is enumerated by host */
void Sniffer_configure(void)
{
@@ -929,7 +931,7 @@
{
TRACE_INFO("Sniffer exit\n\r");
/* Disable USART */
- USART_DisableIt(sniff_usart.base, US_IER_RXRDY | US_IER_TIMEOUT);
+ USART_DisableIt(sniff_usart.base, SNIFFER_IER);
/* NOTE: don't forget to set the IRQ according to the USART peripheral used */
NVIC_DisableIRQ(IRQ_USART_SIM);
USART_SetReceiverEnabled(sniff_usart.base, 0);
@@ -965,7 +967,7 @@
/* Enable Receiver time-out to detect waiting time (WT) time-out (e.g. unresponsive cards) */
sniff_usart.base->US_RTOR = g_wt;
/* Enable interrupt to indicate when data has been received or timeout occurred */
- USART_EnableIt(sniff_usart.base, US_IER_RXRDY | US_IER_TIMEOUT);
+ USART_EnableIt(sniff_usart.base, SNIFFER_IER);
/* Set USB priority lower than USART to not miss sniffing data (both at 0 per default) */
if (NVIC_GetPriority(IRQ_USART_SIM) >= NVIC_GetPriority(UDP_IRQn)) {
NVIC_SetPriority(UDP_IRQn, NVIC_GetPriority(IRQ_USART_SIM) + 2);
--
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/30199
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: Id4bc720a1db31b4433ff7b10d7a57d0ddb7d7180
Gerrit-Change-Number: 30199
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: tsaitgaist <kredon(a)sysmocom.de>
Gerrit-MessageType: merged