lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

April 2022

  • 2 participants
  • 1754 discussions
Change in osmo-ccid-firmware[master]: add simple gangupdater for multiple octsim boards
by roh 15 Mar '25

15 Mar '25
roh has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 ) Change subject: add simple gangupdater for multiple octsim boards ...................................................................... add simple gangupdater for multiple octsim boards Change-Id: Ic10572c121ac55586ec43126b63d69529757132b --- A contrib/flash_all_octsim.sh 1 file changed, 22 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/96/26896/1 diff --git a/contrib/flash_all_octsim.sh b/contrib/flash_all_octsim.sh new file mode 100644 index 0000000..4f4c89b --- /dev/null +++ b/contrib/flash_all_octsim.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# this script is to scan for octsim boards, sort them by usb path and call dfu-util on each to update the board +# basic flow +# - get usb path and serialno tupel from dfu-util -l +# - reformat and sort by usbpath, drop the usbpath (grep cut tr sort cut) +# - flash the boards + +# TODO: +# - error handling +# - filter dfu-util output and generate nice summary + +dfu-util -l \ + | grep "^Found" \ + | grep "\[1d50:6141\]" \ + | cut -d ' ' -f 8,13 \ + | tr -d ',' \ + | cut -d \" -f 2,4 \ + | tr \" ' ' \ + | sort \ + | cut -d ' ' -f 2 + | xargs -n 1 dfu-util -d 1d50:6141 -D sysmoOCTSIM.bin -R -p -- To view, visit https://gerrit.osmocom.org/c/osmo-ccid-firmware/+/26896 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-Change-Id: Ic10572c121ac55586ec43126b63d69529757132b Gerrit-Change-Number: 26896 Gerrit-PatchSet: 1 Gerrit-Owner: roh <jsteiger(a)sysmocom.de> Gerrit-MessageType: newchange
2 2
0 0
Change in simtrace2[master]: simtrace2-tool: hack: kick the comms by sending a fake message
by James Tavares 22 Nov '22

22 Nov '22
James Tavares has uploaded this change for review. ( https://gerrit.osmocom.org/c/simtrace2/+/26864 ) Change subject: simtrace2-tool: hack: kick the comms by sending a fake message ...................................................................... simtrace2-tool: hack: kick the comms by sending a fake message This is a workaround until the root cause of the communications failure between simtrace2-tool and simtrace2 firmware is identified. Additional details provided on simtrace mailing list. Change-Id: I40fa06bee5d8194516497e16597e069124ddf0fb --- M host/include/osmocom/simtrace2/simtrace2_api.h M host/lib/simtrace2_api.c M host/src/simtrace2-tool.c 3 files changed, 23 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/64/26864/1 diff --git a/host/include/osmocom/simtrace2/simtrace2_api.h b/host/include/osmocom/simtrace2/simtrace2_api.h index d658d16..3a7e5ae 100644 --- a/host/include/osmocom/simtrace2/simtrace2_api.h +++ b/host/include/osmocom/simtrace2/simtrace2_api.h @@ -44,6 +44,7 @@ int osmo_st2_slot_tx_msg(struct osmo_st2_slot *slot, struct msgb *msg, uint8_t msg_class, uint8_t msg_type); +int osmo_st2_generic_do_error_none(struct osmo_st2_cardem_inst *ci); int osmo_st2_cardem_request_card_insert(struct osmo_st2_cardem_inst *ci, bool inserted); int osmo_st2_cardem_request_pb_and_rx(struct osmo_st2_cardem_inst *ci, uint8_t pb, uint8_t le); diff --git a/host/lib/simtrace2_api.c b/host/lib/simtrace2_api.c index 4ad7eb7..beb6de4 100644 --- a/host/lib/simtrace2_api.c +++ b/host/lib/simtrace2_api.c @@ -155,6 +155,24 @@ } /*********************************************************************** + * Generic protocol + ***********************************************************************/ + +/*! \brief Send an empty DO_ERROR message to the simtrace2 board */ +int osmo_st2_generic_do_error_none(struct osmo_st2_cardem_inst *ci) +{ + struct msgb *msg = st_msgb_alloc(); + struct cardemu_usb_msg_error *err; + + LOGSLOT(ci->slot, LOGL_NOTICE, "<= %s\n", __func__); + + err = (struct cardemu_usb_msg_error *) msgb_put(msg, sizeof(*err)); + memset(err, 0, sizeof(*err)); + + return osmo_st2_slot_tx_msg(ci->slot, msg, SIMTRACE_MSGC_GENERIC, SIMTRACE_CMD_DO_ERROR); +} + +/*********************************************************************** * Card Emulation protocol ***********************************************************************/ diff --git a/host/src/simtrace2-tool.c b/host/src/simtrace2-tool.c index d92638f..407eac9 100644 --- a/host/src/simtrace2-tool.c +++ b/host/src/simtrace2-tool.c @@ -297,6 +297,10 @@ fprintf(stderr, "can't obtain EP addrs; rc=%d\n", rc); goto close_exit; } + + // HACK: kick the board with a fake message to get subsequent messages to be accepted + // TODO: figure out the real problem, and remove this + osmo_st2_generic_do_error_none(ci); } if (argc - optind <= 0) { -- To view, visit https://gerrit.osmocom.org/c/simtrace2/+/26864 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: simtrace2 Gerrit-Branch: master Gerrit-Change-Id: I40fa06bee5d8194516497e16597e069124ddf0fb Gerrit-Change-Number: 26864 Gerrit-PatchSet: 1 Gerrit-Owner: James Tavares <jtavares(a)kvh.com> Gerrit-MessageType: newchange
3 5
0 0
Change in osmo-msc[master]: CM Serv Rej: do not crash on use count mismatch
by neels 30 Apr '22

30 Apr '22
Attention is currently required from: pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/27916 ) Change subject: CM Serv Rej: do not crash on use count mismatch ...................................................................... Patch Set 1: (1 comment) Patchset: PS1: > That's my point, this shutdown is done because something is wrong in the code. […] I know, but still, *let's not crash osmo-msc*. the conn is being released, a use count confusion is not critical -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/27916 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I2009df42d1f27ec0d011e22bfc46dbc17afe7239 Gerrit-Change-Number: 27916 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 30 Apr 2022 20:34:39 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in dahdi-linux[master]: Revert "Remove support for wctdm800, wcaex800, wctdm410, wcaex410."
by roox 30 Apr '22

30 Apr '22
roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27992 ) Change subject: Revert "Remove support for wctdm800, wcaex800, wctdm410, wcaex410." ...................................................................... Revert "Remove support for wctdm800, wcaex800, wctdm410, wcaex410." This reverts commit: * a66e88e666229092a96d54e5873d4b3ae79b1ce3 Tested with * Digium Wildcard TDM800P Change-Id: Ie143df9873aa84ade066fdd04b3748a849a13fc2 --- M drivers/dahdi/wctdm24xxp/base.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/92/27992/1 diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c index 9baaea5..9725d3c 100644 --- a/drivers/dahdi/wctdm24xxp/base.c +++ b/drivers/dahdi/wctdm24xxp/base.c @@ -6027,7 +6027,11 @@ static DEFINE_PCI_DEVICE_TABLE(wctdm_pci_tbl) = { { 0xd161, 0x2400, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm2400 }, + { 0xd161, 0x0800, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm800 }, + { 0xd161, 0x8002, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex800 }, { 0xd161, 0x8003, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex2400 }, + { 0xd161, 0x8005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wctdm410 }, + { 0xd161, 0x8006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcaex410 }, { 0xd161, 0x8007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wcha80000 }, { 0xd161, 0x8008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long) &wchb80000 }, { 0 } -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27992 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: Ie143df9873aa84ade066fdd04b3748a849a13fc2 Gerrit-Change-Number: 27992 Gerrit-PatchSet: 1 Gerrit-Owner: roox <mardnh(a)gmx.de> Gerrit-MessageType: newchange
1 0
0 0
Change in dahdi-linux[master]: Revert "Remove support for all but wcb41xp wcb43xp and wcb23xp"
by roox 30 Apr '22

30 Apr '22
roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27990 ) Change subject: Revert "Remove support for all but wcb41xp wcb43xp and wcb23xp" ...................................................................... Revert "Remove support for all but wcb41xp wcb43xp and wcb23xp" This reverts commit: * 329cb229cd3f1d252872b7f1924b6e3be941f7ad * 75620dd9ef6ac746745a1ecab4ef925a5b9e2988 Tested with * Junghanns QuadBRI ISDN PCIe * OpenVox B400P PCI Change-Id: I5a2eddf597c6f5c47922ecafc72c43f3a312f005 --- M drivers/dahdi/wcb4xxp/base.c 1 file changed, 30 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/90/27990/1 diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index 784929f..802fbc2 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -135,6 +135,18 @@ .card_type = B430P}; static struct devtype wcb23xp = {"Wildcard B230P", .ports = 2, .card_type = B230P}; +static struct devtype hfc2s = {"HFC-2S Junghanns.NET duoBRI PCI", .ports = 2, .card_type = DUOBRI }; +static struct devtype hfc4s = {"HFC-4S Junghanns.NET quadBRI PCI", .ports = 4, .card_type = QUADBRI }; +static struct devtype hfc8s = {"HFC-8S Junghanns.NET octoBRI PCI", .ports = 8, .card_type = OCTOBRI }; +static struct devtype hfc2s_OV = {"OpenVox B200P", .ports = 2, .card_type = B200P_OV }; +static struct devtype hfc4s_OV = {"OpenVox B400P", .ports = 4, .card_type = B400P_OV }; +static struct devtype hfc8s_OV = {"OpenVox B800P", .ports = 8, .card_type = B800P_OV }; +static struct devtype hfc2s_BN = {"BeroNet BN2S0", .ports = 2, .card_type = BN2S0 }; +static struct devtype hfc4s_BN = {"BeroNet BN4S0", .ports = 4, .card_type = BN4S0 }; +static struct devtype hfc8s_BN = {"BeroNet BN8S0", .ports = 8, .card_type = BN8S0 }; +static struct devtype hfc4s_SW = {"Swyx 4xS0 SX2 QuadBri", .ports = 4, .card_type = BSWYX_SX2 }; +static struct devtype hfc4s_EV = {"CCD HFC-4S Eval. Board", .ports = 4, + .card_type = QUADBRI_EVAL }; #define IS_B430P(card) ((card)->card_type == B430P) #define IS_B230P(card) ((card)->card_type == B230P) @@ -3646,6 +3658,24 @@ {0xd161, 0x8015, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)&wcb43xp}, {0xd161, 0x8016, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)&wcb23xp}, {0xd161, 0x8017, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (unsigned long)&wcb23xp}, + {0x1397, 0x16b8, 0x1397, 0xb552, 0, 0, (unsigned long)&hfc8s}, + {0x1397, 0x16b8, 0x1397, 0xb55b, 0, 0, (unsigned long)&hfc8s}, + {0x1397, 0x08b4, 0x1397, 0xb520, 0, 0, (unsigned long)&hfc4s}, + {0x1397, 0x08b4, 0x1397, 0xb550, 0, 0, (unsigned long)&hfc4s}, + {0x1397, 0x08b4, 0x1397, 0xb752, 0, 0, (unsigned long)&hfc4s}, + {0x1397, 0x08b4, 0x1397, 0xb556, 0, 0, (unsigned long)&hfc2s}, + {0x1397, 0x08b4, 0x1397, 0xe884, 0, 0, (unsigned long)&hfc2s_OV}, + {0x1397, 0x08b4, 0x1397, 0xe888, 0, 0, (unsigned long)&hfc4s_OV}, + {0x1397, 0x16b8, 0x1397, 0xe998, 0, 0, (unsigned long)&hfc8s_OV}, + {0x1397, 0x08b4, 0x1397, 0xb566, 0, 0, (unsigned long)&hfc2s_BN}, + {0x1397, 0x08b4, 0x1397, 0xb761, 0, 0, (unsigned long)&hfc2s_BN}, + {0x1397, 0x08b4, 0x1397, 0xb560, 0, 0, (unsigned long)&hfc4s_BN}, + {0x1397, 0x08b4, 0x1397, 0xb550, 0, 0, (unsigned long)&hfc4s_BN}, + {0x1397, 0x08b4, 0x1397, 0xb762, 0, 0, (unsigned long)&hfc4s_BN}, + {0x1397, 0x16b8, 0x1397, 0xb562, 0, 0, (unsigned long)&hfc8s_BN}, + {0x1397, 0x16b8, 0x1397, 0xb56b, 0, 0, (unsigned long)&hfc8s_BN}, + {0x1397, 0x08b4, 0x1397, 0xb540, 0, 0, (unsigned long)&hfc4s_SW}, + {0x1397, 0x08b4, 0x1397, 0x08b4, 0, 0, (unsigned long)&hfc4s_EV}, {0, } }; -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27990 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: I5a2eddf597c6f5c47922ecafc72c43f3a312f005 Gerrit-Change-Number: 27990 Gerrit-PatchSet: 1 Gerrit-Owner: roox <mardnh(a)gmx.de> Gerrit-MessageType: newchange
1 0
0 0
Change in dahdi-linux[master]: wcb4xxp: Add support for Swyx 4xS0 SX2-Express QuadBRI
by roox 30 Apr '22

30 Apr '22
roox has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/27991 ) Change subject: wcb4xxp: Add support for Swyx 4xS0 SX2-Express QuadBRI ...................................................................... wcb4xxp: Add support for Swyx 4xS0 SX2-Express QuadBRI This adds support for the PCIe-variant (-Express) of the Swyx 4xS0 SX2 QuadBRI. Change-Id: Id8adeae8545c06694c4d3f4a4939d4842f2c4651 --- M drivers/dahdi/wcb4xxp/base.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/91/27991/1 diff --git a/drivers/dahdi/wcb4xxp/base.c b/drivers/dahdi/wcb4xxp/base.c index 802fbc2..1c69147 100644 --- a/drivers/dahdi/wcb4xxp/base.c +++ b/drivers/dahdi/wcb4xxp/base.c @@ -3675,6 +3675,7 @@ {0x1397, 0x16b8, 0x1397, 0xb562, 0, 0, (unsigned long)&hfc8s_BN}, {0x1397, 0x16b8, 0x1397, 0xb56b, 0, 0, (unsigned long)&hfc8s_BN}, {0x1397, 0x08b4, 0x1397, 0xb540, 0, 0, (unsigned long)&hfc4s_SW}, + {0x1397, 0x08b4, 0x1397, 0xb742, 0, 0, (unsigned long)&hfc4s_SW}, {0x1397, 0x08b4, 0x1397, 0x08b4, 0, 0, (unsigned long)&hfc4s_EV}, {0, } -- To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/27991 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: dahdi-linux Gerrit-Branch: master Gerrit-Change-Id: Id8adeae8545c06694c4d3f4a4939d4842f2c4651 Gerrit-Change-Number: 27991 Gerrit-PatchSet: 1 Gerrit-Owner: roox <mardnh(a)gmx.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1d[master]: octoi: only memcpy() if it is present in _octoi_tx_echo()
by laforge 30 Apr '22

30 Apr '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27988 ) Change subject: octoi: only memcpy() if it is present in _octoi_tx_echo() ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I5f5ed937643162d6ef6ce0cf2908432c007943c1 Gerrit-Change-Number: 27988 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sat, 30 Apr 2022 10:52:15 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-e1d[master]: octoi: only memcpy() if it is present in _octoi_tx_echo()
by laforge 30 Apr '22

30 Apr '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27988 ) Change subject: octoi: only memcpy() if it is present in _octoi_tx_echo() ...................................................................... octoi: only memcpy() if it is present in _octoi_tx_echo() If the caller specifies zero-length data or a NULL pointer, don't attempt to call memcpy() on that. Change-Id: I5f5ed937643162d6ef6ce0cf2908432c007943c1 --- M src/octoi/octoi_sock.c 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/88/27988/1 diff --git a/src/octoi/octoi_sock.c b/src/octoi/octoi_sock.c index 4245d80..eac07ee 100644 --- a/src/octoi/octoi_sock.c +++ b/src/octoi/octoi_sock.c @@ -130,7 +130,8 @@ } u; u.echo.seq_nr = htons(seq_nr); - memcpy(u.echo.data, data, data_len); + if (data && data_len) + memcpy(u.echo.data, data, data_len); if (is_req) msgt = E1OIP_MSGT_ECHO_REQ; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27988 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: I5f5ed937643162d6ef6ce0cf2908432c007943c1 Gerrit-Change-Number: 27988 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1d[master]: octoi: Send ECHO_REQ every 10s and update the related stat_item
by laforge 30 Apr '22

30 Apr '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27989 ) Change subject: octoi: Send ECHO_REQ every 10s and update the related stat_item ...................................................................... octoi: Send ECHO_REQ every 10s and update the related stat_item As soon as an OCTOI connection gets into ACTIVE state, send a ECHO_REQ every 10s and compute the RTT at the time of receiving the response. Contrary to the initial idea, the stat item contains the RTT (round trip time) measured in micro-seconds. Changing this is not a problem as so far the RTT was always reported as '0', and 0ms == 0us. Change-Id: Id331319bff1cf6896fee37acc45846a2491ca92d --- M src/octoi/e1oip.c M src/octoi/octoi_clnt_fsm.c M src/octoi/octoi_fsm.c M src/octoi/octoi_fsm.h M src/octoi/octoi_srv_fsm.c 5 files changed, 82 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/89/27989/1 diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c index a50626f..a369034 100644 --- a/src/octoi/e1oip.c +++ b/src/octoi/e1oip.c @@ -66,7 +66,7 @@ }; static const struct osmo_stat_item_desc iline_stat_description[] = { - [LINE_STAT_E1oIP_RTT] = { "e1oip:rtt", "Round Trip Time (in ms)" }, + [LINE_STAT_E1oIP_RTT] = { "e1oip:rtt", "Round Trip Time (in us)" }, [LINE_STAT_E1oIP_E1O_FIFO] = { "e1oip:e1o_fifo_level", "E1 originated FIFO level" }, [LINE_STAT_E1oIP_E1T_FIFO] = { "e1oip:e1t_fifo_level", "E1 terminated FIFO level" }, [LINE_STAT_E1oIP_E1O_TS] = { "e1oip:e1o_ts_active", "E1 timeslots active in E1->IP direction" }, diff --git a/src/octoi/octoi_clnt_fsm.c b/src/octoi/octoi_clnt_fsm.c index 441f904..c4117d2 100644 --- a/src/octoi/octoi_clnt_fsm.c +++ b/src/octoi/octoi_clnt_fsm.c @@ -46,6 +46,12 @@ struct osmo_timer_list rx_alive_timer; struct octoi_account *acc; + struct { + struct osmo_timer_list timer; + struct timespec last_tx_ts; + uint16_t last_tx_seq; + } echo_req; + /* fields below are all filled in once received from the remote server side */ struct { char *server_id; @@ -122,6 +128,7 @@ st->peer->tdm_permitted = true; osmo_timer_schedule(&st->rx_alive_timer, 3, 0); + osmo_timer_schedule(&st->echo_req.timer, 10, 0); } static void clnt_st_accepted(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -143,6 +150,7 @@ { struct clnt_state *st = fi->priv; + osmo_timer_del(&st->echo_req.timer); osmo_timer_del(&st->rx_alive_timer); st->peer->tdm_permitted = false; } @@ -210,16 +218,27 @@ { struct clnt_state *st = fi->priv; struct msgb *msg = data; - struct e1oip_echo *echo_req; + struct e1oip_echo *echo_req, *echo_resp; struct e1oip_error_ind *err_ind; + int32_t rtt_us; switch (event) { case OCTOI_EV_RX_ECHO_REQ: echo_req = msgb_l2(msg); + LOGPFSML(fi, LOGL_DEBUG, "Rx OCTOI ECHO_REQ (seq=%u)\n", ntohs(echo_req->seq_nr)); octoi_tx_echo_resp(st->peer, ntohs(echo_req->seq_nr), echo_req->data, msgb_l2len(msg)); break; case OCTOI_EV_RX_ECHO_RESP: - /* FIXME: update state, peer has responded! */ + echo_resp = msgb_l2(msg); + if (ntohs(echo_resp->seq_nr) != st->echo_req.last_tx_seq) { + LOGPFSML(fi, LOGL_NOTICE, "Rx OCTOI ECHO RESP (seq=%u) doesn't match our last " + "request (seq=%u)\n", ntohs(echo_resp->seq_nr), st->echo_req.last_tx_seq); + break; + } + rtt_us = ts_us_ago(&st->echo_req.last_tx_ts); + iline_stat_set(st->peer->iline, LINE_STAT_E1oIP_RTT, rtt_us); + LOGPFSML(fi, LOGL_INFO, "Rx OCTOI ECHO_RESP (seq=%u, rtt=%d)\n", + ntohs(echo_resp->seq_nr), rtt_us); break; case OCTOI_EV_RX_ERROR_IND: err_ind = msgb_l2(msg); @@ -301,6 +320,17 @@ osmo_fsm_inst_state_chg(fi, CLNT_ST_WAIT_RECONNECT, 10, 0); } +static void clnt_echo_req_timer_cb(void *data) +{ + struct osmo_fsm_inst *fi = data; + struct clnt_state *st = fi->priv; + + /* trigger sending of an OCTOI ECHO REQ */ + clock_gettime(CLOCK_MONOTONIC, &st->echo_req.last_tx_ts); + octoi_tx_echo_req(st->peer, ++st->echo_req.last_tx_seq, NULL, 0); + LOGPFSML(fi, LOGL_DEBUG, "Tx OCTOI ECHO_REQ (seq=%u)\n", st->echo_req.last_tx_seq); + osmo_timer_schedule(&st->echo_req.timer, 10, 0); +} /* call-back function for every received OCTOI socket message for given peer */ int octoi_clnt_fsm_rx_cb(struct octoi_peer *peer, struct msgb *msg) @@ -345,6 +375,7 @@ st->service = E1OIP_SERVICE_E1_FRAMED; st->capability_flags = 0; osmo_timer_setup(&st->rx_alive_timer, clnt_rx_alive_timer_cb, fi); + osmo_timer_setup(&st->echo_req.timer, clnt_echo_req_timer_cb, fi); fi->priv = st; peer->priv = fi; diff --git a/src/octoi/octoi_fsm.c b/src/octoi/octoi_fsm.c index 37d0259..39790fa 100644 --- a/src/octoi/octoi_fsm.c +++ b/src/octoi/octoi_fsm.c @@ -28,6 +28,19 @@ #include "octoi_fsm.h" #include "e1oip.h" +/* how many microseconds ago was 'old_ts'? */ +int32_t ts_us_ago(const struct timespec *old_ts) +{ + struct timespec ts_now, ts_diff; + + clock_gettime(CLOCK_MONOTONIC, &ts_now); + timespecsub(&ts_now, old_ts, &ts_diff); + + if (ts_diff.tv_sec > INT32_MAX / 1000000) + return INT32_MAX; + + return ts_diff.tv_sec * 1000000 + ts_diff.tv_nsec / 1000; +} const struct value_string octoi_fsm_event_names[] = { { OCTOI_EV_RX_TDM_DATA, "RX_TDM_DATA" }, diff --git a/src/octoi/octoi_fsm.h b/src/octoi/octoi_fsm.h index b605c3a..e54afe1 100644 --- a/src/octoi/octoi_fsm.h +++ b/src/octoi/octoi_fsm.h @@ -29,3 +29,5 @@ /* call-back function for every received OCTOI socket message for given peer */ int octoi_srv_fsm_rx_cb(struct octoi_peer *peer, struct msgb *msg); int octoi_clnt_fsm_rx_cb(struct octoi_peer *peer, struct msgb *msg); + +int32_t ts_us_ago(const struct timespec *old_ts); diff --git a/src/octoi/octoi_srv_fsm.c b/src/octoi/octoi_srv_fsm.c index 53b79e7..cc6c1ce 100644 --- a/src/octoi/octoi_srv_fsm.c +++ b/src/octoi/octoi_srv_fsm.c @@ -55,6 +55,11 @@ struct octoi_account *acc; void *app_priv; /* application private data */ const char *rej_str; + struct { + struct osmo_timer_list timer; + struct timespec last_tx_ts; + uint16_t last_tx_seq; + } echo_req; }; static void srv_st_init(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -175,6 +180,7 @@ st->peer->tdm_permitted = true; osmo_timer_schedule(&st->rx_alive_timer, 3, 0); + osmo_timer_schedule(&st->echo_req.timer, 10, 0); } static void srv_st_accepted(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -200,6 +206,7 @@ { struct srv_state *st = fi->priv; + osmo_timer_del(&st->echo_req.timer); osmo_timer_del(&st->rx_alive_timer); st->peer->tdm_permitted = false; } @@ -277,16 +284,27 @@ { struct srv_state *st = fi->priv; struct msgb *msg = data; - struct e1oip_echo *echo_req; + struct e1oip_echo *echo_req, *echo_resp; struct e1oip_error_ind *err_ind; + int32_t rtt_us; switch (event) { case OCTOI_EV_RX_ECHO_REQ: echo_req = msgb_l2(msg); + LOGPFSML(fi, LOGL_DEBUG, "Rx OCTOI ECHO_REQ (seq=%u)\n", ntohs(echo_req->seq_nr)); octoi_tx_echo_resp(st->peer, ntohs(echo_req->seq_nr), echo_req->data, msgb_l2len(msg)); break; case OCTOI_EV_RX_ECHO_RESP: - /* TODO: update state, peer has responded! */ + echo_resp = msgb_l2(msg); + if (ntohs(echo_resp->seq_nr) != st->echo_req.last_tx_seq) { + LOGPFSML(fi, LOGL_NOTICE, "Rx OCTOI ECHO RESP (seq=%u) doesn't match our last " + "request (seq=%u)\n", ntohs(echo_resp->seq_nr), st->echo_req.last_tx_seq); + break; + } + rtt_us = ts_us_ago(&st->echo_req.last_tx_ts); + iline_stat_set(st->peer->iline, LINE_STAT_E1oIP_RTT, rtt_us); + LOGPFSML(fi, LOGL_INFO, "Rx OCTOI ECHO_RESP (seq=%u, rtt=%d)\n", + ntohs(echo_resp->seq_nr), rtt_us); break; case OCTOI_EV_RX_ERROR_IND: err_ind = msgb_l2(msg); @@ -377,6 +395,18 @@ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); } +static void srv_echo_req_timer_cb(void *data) +{ + struct osmo_fsm_inst *fi = data; + struct srv_state *st = fi->priv; + + /* trigger sending of an OCTOI ECHO REQ */ + clock_gettime(CLOCK_MONOTONIC, &st->echo_req.last_tx_ts); + octoi_tx_echo_req(st->peer, ++st->echo_req.last_tx_seq, NULL, 0); + LOGPFSML(fi, LOGL_DEBUG, "Tx OCTOI ECHO_REQ (seq=%u)\n", st->echo_req.last_tx_seq); + osmo_timer_schedule(&st->echo_req.timer, 10, 0); +} + /* call-back function for every received OCTOI socket message for given peer */ int octoi_srv_fsm_rx_cb(struct octoi_peer *peer, struct msgb *msg) { @@ -393,6 +423,7 @@ OSMO_ASSERT(st); st->peer = peer; osmo_timer_setup(&st->rx_alive_timer, srv_rx_alive_timer_cb, fi); + osmo_timer_setup(&st->echo_req.timer, srv_echo_req_timer_cb, fi); fi->priv = st; peer->priv = fi; -- To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27989 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1d Gerrit-Branch: master Gerrit-Change-Id: Id331319bff1cf6896fee37acc45846a2491ca92d Gerrit-Change-Number: 27989 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bts/osmo-bts.cfg: reduce OML logging verbosity, degrade to notice
by fixeria 29 Apr '22

29 Apr '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27987 ) Change subject: bts/osmo-bts.cfg: reduce OML logging verbosity, degrade to notice ...................................................................... bts/osmo-bts.cfg: reduce OML logging verbosity, degrade to notice Average size of osmo-bts.log after running ttcn3-bts-test is ~178 MB, and more than 52% (!) of it is the OML logging messages. Other than making the logfile bigger, bursts of OML messages make it really hard to follow the output of osmo-bts when running tests natively. Change-Id: Ib5346a3ca42917169e195f905472ccea7579e5eb --- M bts/osmo-bts.cfg 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/87/27987/1 diff --git a/bts/osmo-bts.cfg b/bts/osmo-bts.cfg index 5609212..f581be0 100644 --- a/bts/osmo-bts.cfg +++ b/bts/osmo-bts.cfg @@ -18,7 +18,6 @@ ! logging level set-all notice logging level rsl info - logging level oml info logging level meas info logging level pag info logging level l1c info -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27987 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib5346a3ca42917169e195f905472ccea7579e5eb Gerrit-Change-Number: 27987 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • ...
  • 176
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.