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

December 2022

  • 1 participants
  • 1979 discussions
Change in osmocom-bb[master]: trxcon: reset the L1 params on TRXCON_EV_RESET_FULL_REQ
by fixeria 15 Dec '22

15 Dec '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30626 ) Change subject: trxcon: reset the L1 params on TRXCON_EV_RESET_FULL_REQ ...................................................................... trxcon: reset the L1 params on TRXCON_EV_RESET_FULL_REQ Change-Id: Ie94b7977fec857aa5f13f53162816d5fd9f5594c Related: OS#5599 --- M src/host/trxcon/src/trxcon_fsm.c 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/30626/1 diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index 47da0bd..eaa4825 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -59,6 +59,11 @@ osmo_fsm_inst_state_chg(fi, TRXCON_ST_RESET, 0, 0); l1sched_reset(trxcon->sched, true); + /* Reset the L1 parameters */ + trxcon->l1p.band_arfcn = 0xffff; + trxcon->l1p.tx_power = 0; + trxcon->l1p.ta = 0; + phycmd.type = TRXCON_PHYIF_CMDT_RESET; trxcon_phyif_handle_cmd(trxcon->phyif, &phycmd); break; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30626 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie94b7977fec857aa5f13f53162816d5fd9f5594c Gerrit-Change-Number: 30626 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-abis[master]: ipa: Add ipa_client_conn_open2 with connect timeout argument
by daniel 15 Dec '22

15 Dec '22
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30616 ) Change subject: ipa: Add ipa_client_conn_open2 with connect timeout argument ...................................................................... ipa: Add ipa_client_conn_open2 with connect timeout argument Related: SYS#6237 Change-Id: Iaeb672a4c981e9769443fb0cd6c8e59cb76307bd --- M TODO-RELEASE M include/osmocom/abis/ipa.h M src/input/ipa.c 3 files changed, 38 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..5456ba8 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 ipa_client_conn_open2 New API added diff --git a/include/osmocom/abis/ipa.h b/include/osmocom/abis/ipa.h index 7e13a6d..0a36d78 100644 --- a/include/osmocom/abis/ipa.h +++ b/include/osmocom/abis/ipa.h @@ -105,6 +105,7 @@ void ipa_client_conn_destroy(struct ipa_client_conn *link); int ipa_client_conn_open(struct ipa_client_conn *link); +int ipa_client_conn_open2(struct ipa_client_conn *link, unsigned int connect_timeout); void ipa_client_conn_close(struct ipa_client_conn *link); void ipa_client_conn_send(struct ipa_client_conn *link, struct msgb *msg); diff --git a/src/input/ipa.c b/src/input/ipa.c index c121987..62b21e5 100644 --- a/src/input/ipa.c +++ b/src/input/ipa.c @@ -12,6 +12,7 @@ #include <arpa/inet.h> #include <osmocom/core/select.h> +#include <osmocom/core/timer.h> #include <osmocom/gsm/tlv.h> #include <osmocom/core/msgb.h> #include <osmocom/core/logging.h> @@ -37,6 +38,8 @@ void ipa_client_conn_close(struct ipa_client_conn *link) { + osmo_timer_del(&link->timer); + /* be safe against multiple calls */ if (link->ofd->fd != -1) { osmo_fd_unregister(link->ofd); @@ -109,6 +112,13 @@ return 0; } +static void ipa_connect_failure(struct ipa_client_conn *link) +{ + ipa_client_conn_close(link); + if (link->updown_cb) + link->updown_cb(link, 0); +} + static int ipa_client_fd_cb(struct osmo_fd *ofd, unsigned int what) { struct ipa_client_conn *link = ofd->data; @@ -119,11 +129,14 @@ case IPA_CLIENT_LINK_STATE_CONNECTING: ret = getsockopt(ofd->fd, SOL_SOCKET, SO_ERROR, &error, &len); if (ret >= 0 && error > 0) { - ipa_client_conn_close(link); - if (link->updown_cb) - link->updown_cb(link, 0); + ipa_connect_failure(link); return 0; } + + /* Stop the timer when connection succeeds, on failure it's deleted in + ipa_client_conn_close() called by ipa_connect_failure() above */ + osmo_timer_del(&link->timer); + osmo_fd_write_disable(ofd); LOGIPA(link, LOGL_NOTICE, "connection done\n"); link->state = IPA_CLIENT_LINK_STATE_CONNECTED; @@ -143,7 +156,16 @@ default: break; } - return 0; + return 0; +} + +/* Treat the connect timeout exactly like a connect failure */ +static void ipa_connect_timeout_cb(void *data) +{ + struct ipa_client_conn *link = (struct ipa_client_conn *)data; + + LOGIPA(link, LOGL_NOTICE, "Connect timeout reached\n"); + ipa_connect_failure(link); } struct ipa_client_conn * @@ -197,6 +219,8 @@ ipa_link->port = rem_port; ipa_link->updown_cb = updown_cb; ipa_link->read_cb = read_cb; + osmo_timer_setup(&ipa_link->timer, ipa_connect_timeout_cb, ipa_link); + /* default to generic write callback if not set. */ if (write_cb == NULL) ipa_link->write_cb = ipa_client_write_default_cb; @@ -218,6 +242,11 @@ int ipa_client_conn_open(struct ipa_client_conn *link) { + return ipa_client_conn_open2(link, 30); +} + +int ipa_client_conn_open2(struct ipa_client_conn *link, unsigned int connect_timeout) +{ int ret; link->state = IPA_CLIENT_LINK_STATE_CONNECTING; @@ -236,6 +265,9 @@ return -EIO; } + if (connect_timeout > 0) + osmo_timer_schedule(&link->timer, connect_timeout, 0); + return 0; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iaeb672a4c981e9769443fb0cd6c8e59cb76307bd Gerrit-Change-Number: 30616 Gerrit-PatchSet: 7 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: ipaccess: Add connect timeout in e1inp_line
by daniel 15 Dec '22

15 Dec '22
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30617 ) Change subject: ipaccess: Add connect timeout in e1inp_line ...................................................................... ipaccess: Add connect timeout in e1inp_line * VTY command e1_line N connect-timeout T to set the connect() timeout * use ipa_client_conn_open2 to connect with timeout Related: SYS#6237 Change-Id: I7379102d19c172bed2aa00377d92bc885f54b640 --- M TODO-RELEASE M include/osmocom/abis/e1_input.h M src/e1_input.c M src/e1_input_vty.c M src/input/ipaccess.c 5 files changed, 30 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve daniel: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/TODO-RELEASE b/TODO-RELEASE index 5456ba8..a848040 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -8,3 +8,4 @@ # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line libosmo-abis ipa_client_conn_open2 New API added +libosmo-abis struct e1inp_line Field added at the end diff --git a/include/osmocom/abis/e1_input.h b/include/osmocom/abis/e1_input.h index 91a71e1..2c8f4d8 100644 --- a/include/osmocom/abis/e1_input.h +++ b/include/osmocom/abis/e1_input.h @@ -227,6 +227,8 @@ /* file name and file descriptor of pcap for this line */ char *pcap_file; int pcap_fd; + + unsigned int connect_timeout; }; #define e1inp_line_ipa_oml_ts(line) (&line->ts[0]) #define e1inp_line_ipa_rsl_ts(line, trx_id) (((1 + (trx_id)) < NUM_E1_TS) ? (&line->ts[1 + (trx_id)]) : NULL) diff --git a/src/e1_input.c b/src/e1_input.c index ee529cc..02f3b30 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -509,6 +509,7 @@ line->keepalive_idle_timeout = E1INP_USE_DEFAULT; line->keepalive_num_probes = E1INP_USE_DEFAULT; line->keepalive_probe_interval = E1INP_USE_DEFAULT; + line->connect_timeout = 0; line->rate_ctr = rate_ctr_group_alloc(line, &e1inp_ctr_g_d, line->num); if (!line->rate_ctr) { diff --git a/src/e1_input_vty.c b/src/e1_input_vty.c index f6781d1..ca45f93 100644 --- a/src/e1_input_vty.c +++ b/src/e1_input_vty.c @@ -245,6 +245,26 @@ return CMD_SUCCESS; } +DEFUN_ATTR(cfg_e1line_connect_timeout, cfg_e1_line_connect_timeout_cmd, + "e1_line <0-255> connect-timeout <0-60>", + E1_LINE_HELP "Set connect timeout\n" "Connect timeout in seconds (0 to disable)\n", + CMD_ATTR_IMMEDIATE) +{ + struct e1inp_line *line; + int e1_nr = atoi(argv[0]); + unsigned int timeout = atoi(argv[1]); + + line = e1inp_line_find(e1_nr); + if (!line) { + vty_out(vty, "%% Line %d doesn't exist%s", e1_nr, VTY_NEWLINE); + return CMD_WARNING; + } + line->connect_timeout = timeout; + + return CMD_SUCCESS; +} + + DEFUN_ATTR(cfg_e1line_pcap, cfg_e1line_pcap_cmd, "e1_line <0-255> pcap .FILE", E1_LINE_HELP "Setup a pcap recording of E1 traffic for line\n" @@ -376,6 +396,9 @@ if (line->name) vty_out(vty, " e1_line %u name %s%s", line->num, line->name, VTY_NEWLINE); + if (line->connect_timeout != 0) + vty_out(vty, " e1_line %u connect-timeout %u%s", line->num, line->connect_timeout, + VTY_NEWLINE); if (!line->keepalive_num_probes) vty_out(vty, " no e1_line %u keepalive%s", line->num, VTY_NEWLINE); @@ -563,6 +586,7 @@ install_lib_element(L_E1INP_NODE, &cfg_e1_line_port_cmd); install_lib_element(L_E1INP_NODE, &cfg_e1_line_socket_cmd); install_lib_element(L_E1INP_NODE, &cfg_e1_line_name_cmd); + install_lib_element(L_E1INP_NODE, &cfg_e1_line_connect_timeout_cmd); install_lib_element(L_E1INP_NODE, &cfg_e1_line_keepalive_cmd); install_lib_element(L_E1INP_NODE, &cfg_e1_line_keepalive_params_cmd); install_lib_element(L_E1INP_NODE, &cfg_e1_line_no_keepalive_cmd); diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index 44c1b78..8a52591 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -1124,7 +1124,7 @@ } link->dscp = g_e1inp_ipaccess_pars.oml.dscp; link->priority = g_e1inp_ipaccess_pars.oml.priority; - if (ipa_client_conn_open(link) < 0) { + if (ipa_client_conn_open2(link, line->connect_timeout) < 0) { LOGP(DLINP, LOGL_ERROR, "cannot open OML BTS link: %s\n", strerror(errno)); ipa_client_conn_close(link); @@ -1191,7 +1191,7 @@ } rsl_link->dscp = g_e1inp_ipaccess_pars.rsl.dscp; rsl_link->priority = g_e1inp_ipaccess_pars.rsl.priority; - if (ipa_client_conn_open(rsl_link) < 0) { + if (ipa_client_conn_open2(rsl_link, line->connect_timeout) < 0) { LOGP(DLINP, LOGL_ERROR, "cannot open RSL BTS link: %s\n", strerror(errno)); ipa_client_conn_close(rsl_link); -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7379102d19c172bed2aa00377d92bc885f54b640 Gerrit-Change-Number: 30617 Gerrit-PatchSet: 7 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: ipaccess: Add connect timeout in e1inp_line
by daniel 15 Dec '22

15 Dec '22
Attention is currently required from: pespin, fixeria, dexter. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30617 ) Change subject: ipaccess: Add connect timeout in e1inp_line ...................................................................... Patch Set 7: Code-Review+2 (1 comment) Patchset: PS7: 1+1=2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30617 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7379102d19c172bed2aa00377d92bc885f54b640 Gerrit-Change-Number: 30617 Gerrit-PatchSet: 7 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 15 Dec 2022 19:08:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: ipa: Add ipa_client_conn_open2 with connect timeout argument
by daniel 15 Dec '22

15 Dec '22
Attention is currently required from: fixeria, dexter. daniel has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30616 ) Change subject: ipa: Add ipa_client_conn_open2 with connect timeout argument ...................................................................... Patch Set 7: Code-Review+2 (1 comment) Patchset: PS7: +1 from pesping before whitespace changes -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30616 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iaeb672a4c981e9769443fb0cd6c8e59cb76307bd Gerrit-Change-Number: 30616 Gerrit-PatchSet: 7 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Thu, 15 Dec 2022 19:08:41 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Pass gprs_rlcmac_pdch to create_dl_acked_block()
by pespin 15 Dec '22

15 Dec '22
pespin has removed a vote from this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30623 ) Change subject: Pass gprs_rlcmac_pdch to create_dl_acked_block() ...................................................................... Removed Verified-1 by Jenkins Builder (1000002) -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06 Gerrit-Change-Number: 30623 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: deleteVote
1 0
0 0
Change in osmo-pcu[master]: Pass gprs_rlcmac_pdch to create_dl_acked_block()
by pespin 15 Dec '22

15 Dec '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30623 ) Change subject: Pass gprs_rlcmac_pdch to create_dl_acked_block() ...................................................................... Patch Set 1: Verified+1 (1 comment) File src/tbf_dl.h: https://gerrit.osmocom.org/c/osmo-pcu/+/30623/comment/d12f5608_58b585ec PS1, Line 52: enum mcs_kind req_mcs_kind = EGPRS); This is linter not understanding C++ syntax. -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06 Gerrit-Change-Number: 30623 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Thu, 15 Dec 2022 18:20:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Pass gprs_rlcmac_pdch to create_dl_acked_block()
by Jenkins Builder 15 Dec '22

15 Dec '22
Jenkins Builder has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30623 ) Change subject: Pass gprs_rlcmac_pdch to create_dl_acked_block() ...................................................................... Patch Set 1: (1 comment) File src/tbf_dl.h: Robot Comment from checkpatch (run ID jenkins-gerrit-lint-1976): https://gerrit.osmocom.org/c/osmo-pcu/+/30623/comment/9f5d61dc_fac4d6fe PS1, Line 52: enum mcs_kind req_mcs_kind = EGPRS); Statements should start on a tabstop -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06 Gerrit-Change-Number: 30623 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Comment-Date: Thu, 15 Dec 2022 18:11:36 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-pcu[master]: Pass gprs_rlcmac_pdch to create_dl_acked_block()
by pespin 15 Dec '22

15 Dec '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30623 ) Change subject: Pass gprs_rlcmac_pdch to create_dl_acked_block() ...................................................................... Pass gprs_rlcmac_pdch to create_dl_acked_block() This allows having full TS information, not only ts_no, which will be needed later on followup patches. Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06 --- M src/gprs_rlcmac_sched.cpp M src/tbf_dl.cpp M src/tbf_dl.h M tests/tbf/TbfTest.cpp 4 files changed, 17 insertions(+), 15 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/23/30623/1 diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index 87a3733..0a72e3b 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -278,7 +278,6 @@ struct msgb *msg = NULL; struct gprs_rlcmac_dl_tbf *tbf, *prio_tbf = NULL; enum tbf_dl_prio prio, max_prio = DL_PRIO_NONE; - uint8_t ts = pdch->ts_no; uint8_t i, tfi, prio_tfi; int age; @@ -334,7 +333,7 @@ /* next TBF to handle resource is the next one */ pdch->next_dl_tfi = (prio_tfi + 1) & 31; /* generate DL data block */ - msg = prio_tbf->create_dl_acked_block(fn, ts, req_mcs_kind); + msg = prio_tbf->create_dl_acked_block(fn, pdch, req_mcs_kind); *is_egprs = prio_tbf->is_egprs_enabled(); } diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 16dc47b..9214aae 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -391,7 +391,7 @@ * Create DL data block * The messages are fragmented and forwarded as data blocks. */ -struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(uint32_t fn, uint8_t ts, enum mcs_kind req_mcs_kind) +struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(uint32_t fn, const struct gprs_rlcmac_pdch *pdch, enum mcs_kind req_mcs_kind) { int bsn, bsn2 = -1; bool may_combine; @@ -406,7 +406,7 @@ if (may_combine) bsn2 = take_next_bsn(fn, bsn, req_mcs_kind, &may_combine); - return create_dl_acked_block(fn, ts, bsn, bsn2); + return create_dl_acked_block(fn, pdch, bsn, bsn2); } /* old_tbf (UL TBF or DL TBF) will send a Pkt Dl Ass on PACCH to assign tbf. @@ -621,7 +621,7 @@ } struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block( - const uint32_t fn, const uint8_t ts, + const uint32_t fn, const struct gprs_rlcmac_pdch *pdch, int index, int index2) { uint8_t *msg_data; @@ -803,12 +803,12 @@ POLL_ACK_AFTER_FRAMES); } - rc = check_polling(fn, ts, &new_poll_fn, &rrbp); + rc = check_polling(fn, pdch->ts_no, &new_poll_fn, &rrbp); if (rc >= 0) { - set_polling(new_poll_fn, ts, PDCH_ULC_POLL_DL_ACK); + set_polling(new_poll_fn, pdch->ts_no, PDCH_ULC_POLL_DL_ACK); LOGPTBFDL(this, LOGL_DEBUG, "Scheduled DL Acknowledgement polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, ts); + new_poll_fn, pdch->ts_no); m_tx_counter = 0; /* start timer whenever we send the final block */ @@ -828,7 +828,7 @@ LOGPTBFDL(this, LOGL_INFO, "Scheduled Ack/Nack polling on FN=%d, TS=%d\n", - new_poll_fn, ts); + new_poll_fn, pdch->ts_no); } } diff --git a/src/tbf_dl.h b/src/tbf_dl.h index 2fc4f5f..4fdfbed 100644 --- a/src/tbf_dl.h +++ b/src/tbf_dl.h @@ -48,7 +48,8 @@ gprs_rlc_window *window(); int rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb); - struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts, enum mcs_kind req_mcs_kind = EGPRS); + struct msgb *create_dl_acked_block(uint32_t fn, const gprs_rlcmac_pdch *pdch, + enum mcs_kind req_mcs_kind = EGPRS); void request_dl_ack(); bool need_poll_for_dl_ack_nack() const; @@ -100,8 +101,8 @@ bool *may_combine); bool restart_bsn_cycle(); int create_new_bsn(const uint32_t fn, enum CodingScheme cs); - struct msgb *create_dl_acked_block(const uint32_t fn, const uint8_t ts, - int index, int index2 = -1); + struct msgb *create_dl_acked_block(const uint32_t fn, const struct gprs_rlcmac_pdch *pdch, + int index, int index2 = -1); int update_window(unsigned first_bsn, const struct bitvec *rbb); int rcvd_dl_final_ack(); bool dl_window_stalled() const; diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index ba357e3..6d57843 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -535,6 +535,7 @@ { the_pcu = prepare_pcu(); struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0); + struct gprs_rlcmac_pdch *pdch; uint8_t ts_no = 4; uint8_t ms_class = 45; int rc = 0; @@ -554,6 +555,7 @@ fprintf(stderr, "=== start %s ===\n", __func__); setup_bts(bts, ts_no); + pdch = &bts->trx[0].pdch[ts_no]; /* keep the MS object 10 seconds */ OSMO_ASSERT(osmo_tdef_set(the_pcu->T_defs, -2030, 10, OSMO_TDEF_S) == 0); @@ -612,7 +614,7 @@ }; while (ms_dl_tbf(ms)->have_data()) { - msg = ms_dl_tbf(ms)->create_dl_acked_block(fn += 4, ts_no); + msg = ms_dl_tbf(ms)->create_dl_acked_block(fn += 4, pdch); fprintf(stderr, "MSG = %s\n", msgb_hexdump(msg)); if (!msgb_eq_data_print(msg, exp[expected_data - 1], GSM_MACBLOCK_LEN)) fprintf(stderr, "%s failed at %u\n", __func__, expected_data); @@ -2865,7 +2867,7 @@ } while(0) #define MAKE_ACKED(m, tbf, fn, cs, check_unacked) do { \ - m = tbf->create_dl_acked_block(fn, tbf->control_ts->ts_no); \ + m = tbf->create_dl_acked_block(fn, tbf->control_ts); \ OSMO_ASSERT(m); \ if (check_unacked) \ CHECK_UNACKED(tbf, cs, 0); \ @@ -2940,7 +2942,7 @@ NACK(dl_tbf, 0); - msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts->ts_no); + msg = dl_tbf->create_dl_acked_block(fn, dl_tbf->control_ts); egprs2 = (struct gprs_rlc_dl_header_egprs_2 *) msg->data; /* Table 10.4.8a.3.1 of 44.060 */ -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30623 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1efccb32c5afa4fe62233bf114ea95b6fbbe1a06 Gerrit-Change-Number: 30623 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: Pass gprc_rlcmac_pdch to tbf_check_polling
by pespin 15 Dec '22

15 Dec '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30624 ) Change subject: Pass gprc_rlcmac_pdch to tbf_check_polling ...................................................................... Pass gprc_rlcmac_pdch to tbf_check_polling Change-Id: I1c7140b35b7c93d3df4156841e908d3b44d7336d --- M src/nacc_fsm.c M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_dl_ass_fsm.c M src/tbf_ul_ack_fsm.c M src/tbf_ul_ass_fsm.c 7 files changed, 28 insertions(+), 32 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/24/30624/1 diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index 21af485..cc75238 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -168,7 +168,7 @@ struct GprsMs *ms = tbf_ms(tbf); unsigned int rrbp; - rc = tbf_check_polling(tbf, data->fn, data->pdch->ts_no, new_poll_fn, &rrbp); + rc = tbf_check_polling(tbf, data->pdch, data->fn, new_poll_fn, &rrbp); if (rc < 0) { LOGP(DTBF, LOGL_ERROR, "Failed registering poll for Pkt Cell Chg Continue (%d)\n", rc); return NULL; diff --git a/src/tbf.cpp b/src/tbf.cpp index 0af738d..70e3e6c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -458,27 +458,6 @@ osmo_timer_schedule(&Tarr[t], sec, microsec); } -int gprs_rlcmac_tbf::check_polling(uint32_t fn, uint8_t ts, - uint32_t *poll_fn_, unsigned int *rrbp_) const -{ - int rc; - if (!tbf_is_control_ts(this, &this->trx->pdch[ts])) { - LOGPTBF(this, LOGL_DEBUG, "Polling cannot be " - "scheduled in this TS %d (control TS %s)\n", - ts, pdch_name(control_ts)); - return -EINVAL; - } - - if ((rc = pdch_ulc_get_next_free_rrbp_fn(trx->pdch[ts].ulc, fn, poll_fn_, rrbp_)) < 0) { - LOGPTBF(this, LOGL_NOTICE, - "(bts=%u,trx=%u,ts=%u) FN=%u No suitable free RRBP offset found!\n", - trx->bts->nr, trx->trx_no, ts, fn); - return rc; - } - - return 0; -} - void gprs_rlcmac_tbf::set_polling(uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason) { /* schedule polling */ @@ -839,9 +818,29 @@ return tbf->is_egprs_enabled(); } -int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp) +int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch, + uint32_t fn, uint32_t *poll_fn, unsigned int *rrbp) { - return tbf->check_polling(fn, ts, poll_fn, rrbp); + int rc; + OSMO_ASSERT(pdch); + + if (!tbf_is_control_ts(tbf, pdch)) { + char buf[128]; + LOGPTBF(tbf, LOGL_DEBUG, "Polling cannot be " + "scheduled in this TS %s (control TS %s)\n", + pdch_name(pdch), + tbf->control_ts ? pdch_name_buf(tbf->control_ts, buf, sizeof(buf)) : "none"); + return -EINVAL; + } + + if ((rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, fn, poll_fn, rrbp)) < 0) { + LOGPTBF(tbf, LOGL_NOTICE, + "FN=%u No suitable free RRBP offset found on %s!\n", + fn, pdch_name(pdch)); + return rc; + } + + return 0; } void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t) diff --git a/src/tbf.h b/src/tbf.h index a02b8e2..1d5d4f1 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -139,7 +139,7 @@ uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf); bool tbf_is_egprs_enabled(const struct gprs_rlcmac_tbf *tbf); void tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); -int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp); +int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch, uint32_t fn, uint32_t *poll_fn, unsigned int *rrbp); void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t); void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); void tbf_update_state_fsm_name(struct gprs_rlcmac_tbf *tbf); @@ -188,9 +188,6 @@ void t_stop(enum tbf_timers t, const char *reason); void t_start(enum tbf_timers t, int T, const char *reason, bool force, const char *file, unsigned line); - - int check_polling(uint32_t fn, uint8_t ts, - uint32_t *poll_fn, unsigned int *rrbp) const; void set_polling(uint32_t poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason); void poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 9214aae..25aea48 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -803,7 +803,7 @@ POLL_ACK_AFTER_FRAMES); } - rc = check_polling(fn, pdch->ts_no, &new_poll_fn, &rrbp); + rc = tbf_check_polling(this, pdch, fn, &new_poll_fn, &rrbp); if (rc >= 0) { set_polling(new_poll_fn, pdch->ts_no, PDCH_ULC_POLL_DL_ACK); LOGPTBFDL(this, LOGL_DEBUG, diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index 207e4d3..6a1bc92 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -61,7 +61,7 @@ /* We only use this function in control TS (PACCH) so that MS can always answer the poll */ OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, d->pdch)); - rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->pdch, d->fn, &new_poll_fn, &rrbp); if (rc < 0) return NULL; diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index 9501190..a188b08 100644 --- a/src/tbf_ul_ack_fsm.c +++ b/src/tbf_ul_ack_fsm.c @@ -59,7 +59,7 @@ struct GprsMs *ms = tbf_ms(ul_tbf_as_tbf(tbf)); if (final) { - rc = tbf_check_polling(ul_tbf_as_tbf(tbf), d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ul_tbf_as_tbf(tbf), d->pdch, d->fn, &new_poll_fn, &rrbp); if (rc < 0) return NULL; } diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c index d910095..8f2b70c 100644 --- a/src/tbf_ul_ass_fsm.c +++ b/src/tbf_ul_ass_fsm.c @@ -83,7 +83,7 @@ unsigned int rrbp; uint32_t new_poll_fn; - rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->pdch, d->fn, &new_poll_fn, &rrbp); if (rc < 0) return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30624 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I1c7140b35b7c93d3df4156841e908d3b44d7336d Gerrit-Change-Number: 30624 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.