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 -----
  • November
  • 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

February 2023

  • 1 participants
  • 2601 discussions
Change in osmo-pcu[master]: osmo-pcu: Transition to use of 'telnet_init_default'
by arehbein 18 Feb '23

18 Feb '23
arehbein has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/31092 ) Change subject: osmo-pcu: Transition to use of 'telnet_init_default' ...................................................................... Patch Set 2: (1 comment) Patchset: PS1: > I wonder why this comment was ignored and the patch was merged :/ I don't know (I didn't merge it). Is there some related follow-up that needs to be done here and in the other projects? -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/31092 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I9559486ce64a9ccf348b4ee0e1d09141dbc1ae8f Gerrit-Change-Number: 31092 Gerrit-PatchSet: 2 Gerrit-Owner: arehbein <arehbein(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 18 Feb 2023 17:55:04 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Update multiaddr helper
by msuraev 18 Feb '23

18 Feb '23
Attention is currently required from: neels, laforge, fixeria, pespin. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28993 ) Change subject: Update multiaddr helper ...................................................................... Patch Set 15: (2 comments) This change is ready for review. File src/socket.c: https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/d50974e3_a6308368 PS9, Line 220: > (assert()s also clarify to the reader the intended usage, and to coverity what to expect. […] Done https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/b23b0bfe_d9439222 PS9, Line 236: if (hosts[i]) > That seems like odd side-effect to me for which I couldn't find any tests. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icef53fe4b6e51563d97a1bc48001d67679b3b6e9 Gerrit-Change-Number: 28993 Gerrit-PatchSet: 15 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Sat, 18 Feb 2023 17:22:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de> Comment-In-Reply-To: msuraev <msuraev(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Add osmo_sockaddr_to_str_buf3()
by msuraev 18 Feb '23

18 Feb '23
Attention is currently required from: neels, laforge, pespin, fixeria. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28995 ) Change subject: Add osmo_sockaddr_to_str_buf3() ...................................................................... Patch Set 10: (1 comment) This change is ready for review. File include/osmocom/core/sockaddr_str.h: https://gerrit.osmocom.org/c/libosmocore/+/28995/comment/15241651_8c310e6c PS9, Line 64: ((R) && (R)->af == AF_INET6) ? "[" : "", \ > IIUC the only need for using [] in IPv6 addresses is to differentiate the address from the port part […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36f20701663c3c7eae7fedc6551da44800b325bf Gerrit-Change-Number: 28995 Gerrit-PatchSet: 10 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sat, 18 Feb 2023 17:14:18 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Update multiaddr helper
by msuraev 18 Feb '23

18 Feb '23
Attention is currently required from: neels, laforge, fixeria, pespin, msuraev. msuraev has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28993 ) Change subject: Update multiaddr helper ...................................................................... Patch Set 14: (5 comments) This change is ready for review. Commit Message: https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/10b1579c_df3fe954 PS13, Line 10: * properly handle OOM > OOM is not the responsibility of functions like snprintf(), the caller shall check rc < len Done File src/core/socket.c: https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/ccb888a8_bf79f780 PS13, Line 229: const struct sockaddr *addr = &(*addrs)[i]; > to conform with typical osmo style, suggest using struct osmo_sockaddr instead, and below use addr. […] Simply changing addr type to "const struct osmo_sockaddr *" leads to memory corruption. Perhaps that's because we're casting from double pointer (we receive array of sockaddr structs)? Did I misunderstood your suggestion? https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/2e9664a6_cb459aa7 PS13, Line 244: OSMO_STRBUF_PRINTF(*sb, "%s%s", oss->ip, after); > no need to use osmo_sockaddr_str here, instead do […] We can't use osmo_sockaddr_to_str_buf2 because it always prints port in addition to host. I've added similar function in preceeding patch. https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/e2bf3560_19ed923a PS13, Line 252: return -ENOSPC; > do not size check!! this breaks the osmo_strbuf usage. […] Done https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/31718281_3658a78a PS13, Line 260: > just put the function block of multiaddr_strbuf() in here. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28993 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Icef53fe4b6e51563d97a1bc48001d67679b3b6e9 Gerrit-Change-Number: 28993 Gerrit-PatchSet: 14 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: msuraev <msuraev(a)sysmocom.de> Gerrit-Comment-Date: Sat, 18 Feb 2023 17:07:38 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: comment
1 0
0 0
Change in libosmocore[master]: Add osmo_sockaddr_str helpers to print without port
by msuraev 18 Feb '23

18 Feb '23
msuraev has restored this change. ( https://gerrit.osmocom.org/c/libosmocore/+/28995 ) Change subject: Add osmo_sockaddr_str helpers to print without port ...................................................................... Restored -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/28995 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I36f20701663c3c7eae7fedc6551da44800b325bf Gerrit-Change-Number: 28995 Gerrit-PatchSet: 9 Gerrit-Owner: msuraev <msuraev(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: restore
1 0
0 0
Change in libosmo-abis[master]: Add function to set Sa bits to common part
by laforge 18 Feb '23

18 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31032 ) Change subject: Add function to set Sa bits to common part ...................................................................... Add function to set Sa bits to common part Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad --- M TODO-RELEASE M include/osmocom/abis/e1_input.h M src/e1_input.c 3 files changed, 20 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..c021505 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-abis struct e1inp_driver Field added at the end (ABI break) diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 7b97a46..a66f8eb 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -187,6 +187,9 @@ int default_delay; int has_keepalive; const char *bind_addr; + + /* Set Sa bits to transmit in TS0 (MSB to LSB): Sa8 Sa7 Sa5 Sa4 Sa64 Sa63 Sa62 Sa61/Sa6 */ + int (*set_sa_bits)(struct e1inp_line *line, uint8_t sa_bits); }; struct e1inp_line_ops { @@ -328,6 +331,12 @@ /* configure and initialize one timeslot dedicated to nothing */ int e1inp_ts_config_none(struct e1inp_ts *ts, struct e1inp_line *line); +/* + * configure Sa bits on TS0, if supported by driver (TABLE 5A and 5B of ITU-T G.704) + * sa_bits (MSB to LSB): Sa8 Sa7 Sa5 Sa4 Sa64 Sa63 Sa62 Sa61/Sa6 + */ +int e1inp_ts_set_sa_bits(struct e1inp_line *line, uint8_t sa_bits); + /* obtain a string identifier/name for the given timeslot */ void e1inp_ts_name(char *out, size_t out_len, const struct e1inp_ts *ts); diff --git a/src/e1_input.c b/src/e1_input.c index a7313dd..2d10513 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -455,6 +455,16 @@ return 0; } +int e1inp_ts_set_sa_bits(struct e1inp_line *line, uint8_t sa_bits) +{ + struct e1inp_driver *driver; + + driver = line->driver; + if (!driver->set_sa_bits) + return -ENOTSUP; + return driver->set_sa_bits(line, sa_bits); +} + static int e1inp_line_use_cb(struct osmo_use_count_entry *use_count_entry, int32_t old_use_count, const char *file, int file_line) { -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I4f5f975f0e5f708ae573a1e1ce41c6a08c207fad Gerrit-Change-Number: 31032 Gerrit-PatchSet: 5 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: Add setting of Sa bits to misdn driver
by laforge 18 Feb '23

18 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31034 ) Change subject: Add setting of Sa bits to misdn driver ...................................................................... Add setting of Sa bits to misdn driver Change-Id: I54205a2534a7638cc071888d853f9d6d312dc9f0 --- M src/input/misdn.c 1 file changed, 23 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/input/misdn.c b/src/input/misdn.c index e7e9570..fc06857 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -301,6 +301,28 @@ return 0; } +static int set_sa_bits(struct e1inp_line *line, uint8_t sa_bits) +{ + struct e1inp_ts *e1i_ts = &line->ts[16-1]; + struct osmo_fd *bfd = &e1i_ts->driver.misdn.fd; + uint8_t buffer[sizeof(struct mISDNhead) + sizeof(uint32_t)]; + struct mISDNhead *hh = (struct mISDNhead *)buffer; + uint32_t *info = (uint32_t *)(buffer + sizeof(struct mISDNhead)); + int ret; + + LOGP(DLMI, LOGL_DEBUG, "MPH_INFORMATION_REQ: Sa4=%d, Sa5=%d, Sa6=%d, Sa7=%d, Sa8=%d\n", + (sa_bits >> 4) & 1, (sa_bits >> 5) & 1, sa_bits & 1, (sa_bits >> 6) & 1, sa_bits >> 7); + + hh->prim = MPH_INFORMATION_REQ; + hh->id = TEI_SAPI | (GROUP_TEI << 8); /* manager address */ + *info = L1_SIGNAL_SA_BITS | sa_bits; + + ret = write(bfd->fd, &buffer, sizeof(buffer)); + if (ret < 0) + LOGP(DLINP, LOGL_ERROR, "MPH_INFORMATION_REQ returns %d\n", ret); + return ret; +} + static void timeout_ts1_write(void *data) { struct e1inp_ts *e1i_ts = (struct e1inp_ts *)data; @@ -723,6 +745,7 @@ struct e1inp_driver misdn_driver = { .name = "misdn", .want_write = ts_want_write, + .set_sa_bits = set_sa_bits, .default_delay = 50000, .line_update = &mi_e1_line_update, }; 8 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-abis/+/31034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I54205a2534a7638cc071888d853f9d6d312dc9f0 Gerrit-Change-Number: 31034 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: Add L1 signals to misdn driver
by laforge 18 Feb '23

18 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31033 ) Change subject: Add L1 signals to misdn driver ...................................................................... Add L1 signals to misdn driver Change-Id: Id8b6fad9b073cf92eee92a6906bf5b57af37e2f0 --- M include/mISDNif.h M src/input/misdn.c 2 files changed, 86 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/include/mISDNif.h b/include/mISDNif.h index 8e065d2..4a12eea 100644 --- a/include/mISDNif.h +++ b/include/mISDNif.h @@ -193,6 +193,8 @@ #define L1_SIGNAL_RDI_ON 0x0015 #define L1_SIGNAL_SLIP_RX 0x0020 #define L1_SIGNAL_SLIP_TX 0x0021 +#define L1_SIGNAL_SA_BITS 0x0100 +#define L1_SIGNAL_SA_MASK 0x00FF /* * protocol ids diff --git a/src/input/misdn.c b/src/input/misdn.c index 454c8e8..e7e9570 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -63,6 +63,7 @@ #include <osmocom/abis/e1_input.h> #include <osmocom/abis/lapd.h> #include <osmocom/core/talloc.h> +#include <osmocom/core/signal.h> #define TS1_ALLOC_SIZE 300 @@ -71,6 +72,7 @@ int use_userspace_lapd; int unconfirmed_ts[NUM_E1_TS]; int dummy_dchannel; + int los, ais, rai; }; const struct value_string prim_names[] = { @@ -90,6 +92,75 @@ { 0, NULL } }; +static int mph_information_ind(struct e1inp_line *line, uint32_t info) +{ + struct misdn_line *mline = line->driver_data; + struct input_signal_data isd; + unsigned int signal; + int was_alarm, is_alarm; + + memset(&isd, 0, sizeof(isd)); + isd.line = line; + + was_alarm = mline->los || mline->ais || mline->rai; + + if ((info & ~L1_SIGNAL_SA_MASK) == L1_SIGNAL_SA_BITS) { + isd.sa_bits = info & L1_SIGNAL_SA_MASK; + LOGP(DLMI, LOGL_DEBUG, "%s: Sa61/6=%d, Sa62=%d, Sa63=%d, Sa64=%d, Sa4=%d, Sa5=%d, Sa7=%d, Sa8=%d\n", + get_value_string(e1inp_signal_names, S_L_INP_LINE_SA_BITS), + isd.sa_bits & 1, (isd.sa_bits >> 1) & 1, (isd.sa_bits >> 2) & 1, (isd.sa_bits >> 3) & 1, + (isd.sa_bits >> 4) & 1, (isd.sa_bits >> 5) & 1, (isd.sa_bits >> 6) & 1, isd.sa_bits >> 7); + osmo_signal_dispatch(SS_L_INPUT, S_L_INP_LINE_SA_BITS, &isd); + return 0; + } + + switch (info) { + case L1_SIGNAL_LOS_OFF: + signal = S_L_INP_LINE_NOLOS; + mline->los = 0; + break; + case L1_SIGNAL_LOS_ON: + signal = S_L_INP_LINE_LOS; + mline->los = 1; + break; + case L1_SIGNAL_AIS_OFF: + signal = S_L_INP_LINE_NOAIS; + mline->ais = 0; + break; + case L1_SIGNAL_AIS_ON: + signal = S_L_INP_LINE_AIS; + mline->ais = 1; + break; + case L1_SIGNAL_RDI_OFF: + signal = S_L_INP_LINE_NORAI; + mline->rai = 0; + break; + case L1_SIGNAL_RDI_ON: + signal = S_L_INP_LINE_RAI; + mline->rai = 1; + break; + default: + LOGP(DLMI, LOGL_DEBUG, "Unknown MPH_INFORMATION_IND: 0x%04x\n", info); + return -EINVAL; + } + + LOGP(DLMI, LOGL_DEBUG, "%s\n", get_value_string(e1inp_signal_names, signal)); + osmo_signal_dispatch(SS_L_INPUT, signal, &isd); + + is_alarm = mline->los || mline->ais || mline->rai; + + if (!was_alarm && is_alarm) { + osmo_signal_dispatch(SS_L_INPUT, S_L_INP_LINE_ALARM, &isd); + LOGP(DLMI, LOGL_DEBUG, "%s\n", get_value_string(e1inp_signal_names, S_L_INP_LINE_ALARM)); + } + if (was_alarm && !is_alarm) { + osmo_signal_dispatch(SS_L_INPUT, S_L_INP_LINE_NOALARM, &isd); + LOGP(DLMI, LOGL_DEBUG, "%s\n", get_value_string(e1inp_signal_names, S_L_INP_LINE_NOALARM)); + } + + return 0; +} + static int handle_ts1_read(struct osmo_fd *bfd) { struct e1inp_line *line = bfd->data; @@ -202,6 +273,13 @@ LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "RX: %s\n", osmo_hexdump(msg->data, msg->len)); ret = e1inp_rx_ts_lapd(e1i_ts, msg); break; + case MPH_INFORMATION_IND: + LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "MPH_INFORMATION_IND\n"); + /* remove the Misdn Header */ + msgb_pull(msg, MISDN_HEADER_LEN); + mph_information_ind(line, *((uint32_t *)msg->data)); + msgb_free(msg); + break; default: msgb_free(msg); break; @@ -557,6 +635,12 @@ mline->unconfirmed_ts[ts_nr-1] = 0; osmo_fd_write_enable(bfd); break; + case MPH_INFORMATION_IND: + LOGPITS(e1i_ts, DLMI, LOGL_DEBUG, "MPH_INFORMATION_IND\n"); + /* remove the Misdn Header */ + msgb_pull(msg, MISDN_HEADER_LEN); + mph_information_ind(line, *((uint32_t *)msg->data)); + break; default: break; } 7 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-abis/+/31033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Id8b6fad9b073cf92eee92a6906bf5b57af37e2f0 Gerrit-Change-Number: 31033 Gerrit-PatchSet: 8 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: Use correct bit order of RAW channels at misdn driver
by laforge 18 Feb '23

18 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31035 ) Change subject: Use correct bit order of RAW channels at misdn driver ...................................................................... Use correct bit order of RAW channels at misdn driver mISDN Kernel driver uses reversed bit order for RAW (transparent) channels. With this patch, the order is reversed. Now it uses the same bit order as RTP payload does. Also it uses same bit order as other drivers do, like dahdi and e1d. Change-Id: I77b899bceacdf5484ea9a841cad55775864b4c82 --- M src/input/misdn.c 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/input/misdn.c b/src/input/misdn.c index fc06857..9c3da98 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -514,6 +514,7 @@ LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN TX: %s\n", osmo_hexdump(msg->data, msg->len)); + osmo_revbytebits_buf(msg->data, msg->len); hh = (struct mISDNhead *) msgb_push(msg, sizeof(*hh)); hh->prim = PH_DATA_REQ; hh->id = 0; @@ -560,6 +561,7 @@ case PH_DATA_IND: /* remove the Misdn Header */ msg->l2h = msgb_pull(msg, MISDN_HEADER_LEN); + osmo_revbytebits_buf(msg->data, msg->len); LOGPITS(e1i_ts, DLMIB, LOGL_DEBUG, "RAW CHAN RX: %s\n", osmo_hexdump(msgb_l2(msg), msgb_l2len(msg))); return e1inp_rx_ts(e1i_ts, msg, 0, 0); 5 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-abis/+/31035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I77b899bceacdf5484ea9a841cad55775864b4c82 Gerrit-Change-Number: 31035 Gerrit-PatchSet: 9 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: Rework mi_e1_line_update() and some of its sub routines
by laforge 18 Feb '23

18 Feb '23
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31296 ) Change subject: Rework mi_e1_line_update() and some of its sub routines ...................................................................... Rework mi_e1_line_update() and some of its sub routines Close file descriptor and free lapd resources, if time slot type changes or if it is released. Also, reset local states. Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c --- M src/input/misdn.c 1 file changed, 60 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/input/misdn.c b/src/input/misdn.c index c682392..8f04567 100644 --- a/src/input/misdn.c +++ b/src/input/misdn.c @@ -71,6 +71,7 @@ struct misdn_line { int use_userspace_lapd; int unconfirmed_ts[NUM_E1_TS]; + enum e1inp_ts_type type_ts[NUM_E1_TS]; int dummy_dchannel; int los, ais, rai; }; @@ -761,12 +762,18 @@ struct misdn_line *mline = line->driver_data; int ts, ret; - mline->dummy_dchannel = -1; - if (mline->use_userspace_lapd) { + /* check if sign type is used */ + for (ts = 1; ts < line->num_ts; ts++) { + unsigned int idx = ts - 1; + struct e1inp_ts *e1i_ts = &line->ts[idx]; + if (e1i_ts->type == E1INP_TS_TYPE_SIGN) + break; + } + if (ts < line->num_ts && mline->use_userspace_lapd) { /* Open dummy d-channel in order to use b-channels. * Also it is required to define the mode. */ - if (mline->dummy_dchannel < 0) { + if (mline->dummy_dchannel <= 0) { struct sockaddr_mISDN addr; mline->dummy_dchannel = socket(PF_ISDN, SOCK_DGRAM, @@ -788,50 +795,86 @@ return -EIO; } } + } else { + /* close dummy d-channel */ + if (mline->dummy_dchannel > 0) { + close(mline->dummy_dchannel); + mline->dummy_dchannel = -1; + } } + LOGPIL(line, DLINP, LOGL_NOTICE, "Line update %d %d %d\n", line->num, line->port_nr, line->num_ts); + /* TS0 is CRC4, don't need any fd for it */ - for (ts = 1; ts < NUM_E1_TS; ts++) { - unsigned int idx = ts-1; + for (ts = 1; ts < line->num_ts; ts++) { + unsigned int idx = ts - 1; struct e1inp_ts *e1i_ts = &line->ts[idx]; struct osmo_fd *bfd = &e1i_ts->driver.misdn.fd; struct sockaddr_mISDN addr; + /* no change in type */ + if (mline->type_ts[idx] == e1i_ts->type) + continue; + + LOGPIL(line, DLINP, LOGL_INFO, "Time slot %d changes from type %s to type %s\n", ts, + e1inp_tstype_name(mline->type_ts[idx]), e1inp_tstype_name(e1i_ts->type)); + + /* unregister FD if it was already registered */ + if (bfd->list.next && bfd->list.next != LLIST_POISON1) + osmo_fd_unregister(bfd); + + /* close/release LAPD instance, if any */ + if (e1i_ts->lapd) { + lapd_instance_free(e1i_ts->lapd); + e1i_ts->lapd = NULL; + } + + /* close old file descriptor */ + if (bfd->fd) { + close(bfd->fd); + bfd->fd = 0; + } + + /* clear 'unconfirmed' state */ + mline->unconfirmed_ts[idx] = 0; + + /* set new type */ + mline->type_ts[idx] = e1i_ts->type; + switch (e1i_ts->type) { case E1INP_TS_TYPE_NONE: + /* keep closed */ continue; - break; case E1INP_TS_TYPE_HDLC: + /* open hdlc socket */ /* TS 16 is the D-channel, so we use D-channel proto */ bfd->fd = socket(PF_ISDN, SOCK_DGRAM, (ts == 16) ? ISDN_P_NT_E1 : ISDN_P_B_HDLC); - bfd->when = OSMO_FD_READ; break; case E1INP_TS_TYPE_SIGN: + /* open and allocate user space lapd, if required */ if (mline->use_userspace_lapd) bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_B_HDLC); else bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_LAPD_NT); - bfd->when = OSMO_FD_READ; break; case E1INP_TS_TYPE_TRAU: case E1INP_TS_TYPE_I460: case E1INP_TS_TYPE_RAW: + /* open raw socket */ bfd->fd = socket(PF_ISDN, SOCK_DGRAM, ISDN_P_B_RAW); - /* We never include the mISDN B-Channel FD into the - * writeset, since it doesn't support poll() based - * write flow control */ - bfd->when = OSMO_FD_READ; break; } + /* failed to open? */ if (bfd->fd < 0) { LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "could not open socket: %s\n", strerror(errno)); return bfd->fd; } + /* configure mISDN socket, also add user space lapd, if enabled */ memset(&addr, 0, sizeof(addr)); addr.family = AF_ISDN; addr.dev = line->port_nr; @@ -863,6 +906,7 @@ break; } + /* bind mISDN socket */ ret = bind(bfd->fd, (struct sockaddr *) &addr, sizeof(addr)); if (ret < 0) { LOGPITS(e1i_ts, DLMI, LOGL_ERROR, "could not bind l2 socket %s\n", @@ -870,6 +914,7 @@ return -EIO; } + /* release L2 in case of kernel space lapd, activate b-channel in other cases */ if (e1i_ts->type == E1INP_TS_TYPE_SIGN) { if (!mline->use_userspace_lapd) { ret = ioctl(bfd->fd, IMCLEAR_L2, &release_l2); @@ -880,17 +925,11 @@ } } else activate_bchan(line, ts, 1); - } - - /* FIXME: only activate B-Channels once we start to - * use them to conserve CPU power */ - if (e1i_ts->type == E1INP_TS_TYPE_HDLC - || e1i_ts->type == E1INP_TS_TYPE_RAW - || e1i_ts->type == E1INP_TS_TYPE_TRAU) + } else activate_bchan(line, ts, 1); - osmo_fd_setup(bfd, bfd->fd, bfd->when, misdn_fd_cb, line, ts); - + /* register file descriptor with read set enabled */ + osmo_fd_setup(bfd, bfd->fd, OSMO_FD_READ, misdn_fd_cb, line, ts); ret = osmo_fd_register(bfd); if (ret < 0) { LOGPITS(e1i_ts, DLINP, LOGL_ERROR, "could not register FD: %s\n", strerror(ret)); -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c Gerrit-Change-Number: 31296 Gerrit-PatchSet: 4 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.