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 osmo-pcu[master]: Move first_common_ts from gprs_rlcmac_tbf to GprsMs
by pespin 14 Dec '22

14 Dec '22
Attention is currently required from: laforge, fixeria. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/30566 to look at the new patch set (#3). Change subject: Move first_common_ts from gprs_rlcmac_tbf to GprsMs ...................................................................... Move first_common_ts from gprs_rlcmac_tbf to GprsMs The field contains a common value between the 2 active TBFs of the MS, so it makes no sense to have them duplicated on each TBF. It can be sanely stored in the MS object. Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf.h M src/tbf_ul.cpp M tests/alloc/AllocTest.cpp 8 files changed, 33 insertions(+), 40 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/66/30566/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30566 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I8df01a99ccbfaf7a442ade5000ee282bd638fbba Gerrit-Change-Number: 30566 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-pcu[master]: Convert ms_first_common_ts to struct gprs_rlcmac_pdch
by pespin 14 Dec '22

14 Dec '22
Attention is currently required from: pespin. Hello Jenkins Builder, laforge, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-pcu/+/30575 to look at the new patch set (#2). Change subject: Convert ms_first_common_ts to struct gprs_rlcmac_pdch ...................................................................... Convert ms_first_common_ts to struct gprs_rlcmac_pdch This way it contains full information about the TS, not only the TN. Change-Id: I19373939ec104d371e3e91422f018a8175cb0f89 --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_rlcmac_ts_alloc.cpp M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf_ul.cpp M tests/alloc/AllocTest.cpp M tests/ulc/PdchUlcTest.cpp 8 files changed, 40 insertions(+), 34 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/75/30575/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30575 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I19373939ec104d371e3e91422f018a8175cb0f89 Gerrit-Change-Number: 30575 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newpatchset
1 0
0 0
Change in osmo-pcu[master]: Move control_ts explicit checks out of the scheduler implementation
by pespin 14 Dec '22

14 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30564 ) Change subject: Move control_ts explicit checks out of the scheduler implementation ...................................................................... Move control_ts explicit checks out of the scheduler implementation Let each subsystem handle that internally. Change-Id: Ifaf7dde651d56942779d84aa9135fc8c974b6f26 --- M src/gprs_rlcmac_sched.cpp M src/nacc_fsm.c M src/nacc_fsm.h M src/tbf_dl_ass_fsm.c M src/tbf_dl_ass_fsm.h M src/tbf_ul_ack_fsm.c M src/tbf_ul_ack_fsm.h M src/tbf_ul_ass_fsm.c M src/tbf_ul_ass_fsm.h 9 files changed, 46 insertions(+), 24 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index f641013..a201b92 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -28,6 +28,7 @@ extern "C" { #include <osmocom/core/gsmtap.h> + #include "nacc_fsm.h" } struct tbf_sched_candidates { @@ -47,17 +48,13 @@ llist_for_each_entry(pos, &pdch->trx->ul_tbfs, list) { ul_tbf = tbf_as_ul_tbf((struct gprs_rlcmac_tbf *)pos->entry); OSMO_ASSERT(ul_tbf); - /* this trx, this ts */ - if (!tbf_is_control_ts(ul_tbf, pdch)) - continue; - if (tbf_ul_ack_rts(ul_tbf)) + if (tbf_ul_ack_rts(ul_tbf, pdch)) tbf_cand->ul_ack = ul_tbf; - if (tbf_dl_ass_rts(ul_tbf)) + if (tbf_dl_ass_rts(ul_tbf, pdch)) tbf_cand->dl_ass = ul_tbf; - if (tbf_ul_ass_rts(ul_tbf)) + if (tbf_ul_ass_rts(ul_tbf, pdch)) tbf_cand->ul_ass = ul_tbf; - /* NACC ready to send. TFI assigned is needed to send messages */ - if (tbf_is_tfi_assigned(ul_tbf) && ms_nacc_rts(ul_tbf->ms())) + if (tbf_nacc_rts(ul_tbf, pdch)) tbf_cand->nacc = ul_tbf; /* FIXME: Is this supposed to be fair? The last TBF for each wins? Maybe use llist_add_tail and skip once we have all states? */ @@ -65,15 +62,11 @@ llist_for_each_entry(pos, &pdch->trx->dl_tbfs, list) { dl_tbf = tbf_as_dl_tbf((struct gprs_rlcmac_tbf *)pos->entry); OSMO_ASSERT(dl_tbf); - /* this trx, this ts */ - if (!tbf_is_control_ts(dl_tbf, pdch)) - continue; - if (tbf_dl_ass_rts(dl_tbf)) + if (tbf_dl_ass_rts(dl_tbf, pdch)) tbf_cand->dl_ass = dl_tbf; - if (tbf_ul_ass_rts(dl_tbf)) + if (tbf_ul_ass_rts(dl_tbf, pdch)) tbf_cand->ul_ass = dl_tbf; - /* NACC ready to send. TFI assigned is needed to send messages */ - if (tbf_is_tfi_assigned(dl_tbf) && ms_nacc_rts(dl_tbf->ms())) + if (tbf_nacc_rts(dl_tbf, pdch)) tbf_cand->nacc = dl_tbf; } } diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index 25e7cd8..b4d8583 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -900,3 +900,11 @@ ctx->continue_poll_fn == fn && ctx->continue_poll_ts == ts; } + +bool tbf_nacc_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) +{ + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + return tbf_is_tfi_assigned(tbf) && ms_nacc_rts(tbf_ms(tbf)); +} diff --git a/src/nacc_fsm.h b/src/nacc_fsm.h index b33dafa..b67ba11 100644 --- a/src/nacc_fsm.h +++ b/src/nacc_fsm.h @@ -22,6 +22,7 @@ struct GprsMs; struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum nacc_fsm_event { NACC_EV_RX_CELL_CHG_NOTIFICATION, /* data: Packet_Cell_Change_Notification_t* */ @@ -73,3 +74,5 @@ const struct osmo_cell_global_id_ps *cgi_ps); bool nacc_fsm_exp_ctrl_ack(const struct nacc_fsm_ctx *ctx, uint32_t fn, uint8_t ts); + +bool tbf_nacc_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index fe959cc..d4dafe2 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -248,9 +248,14 @@ return data_ctx.msg; } -bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf) +bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_dl_ass_fi(tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + fi = tbf_dl_ass_fi(tbf); if (fi->state != TBF_DL_ASS_SEND_ASS) return false; diff --git a/src/tbf_dl_ass_fsm.h b/src/tbf_dl_ass_fsm.h index a259c03..70d768e 100644 --- a/src/tbf_dl_ass_fsm.h +++ b/src/tbf_dl_ass_fsm.h @@ -21,6 +21,7 @@ #include <gprs_pcu.h> struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum tbf_dl_ass_fsm_event { TBF_DL_ASS_EV_SCHED_ASS, /* Tx Uplink Assignment is pending */ @@ -62,4 +63,4 @@ struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); -bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf* tbf); +bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index f6e7a0d..1421c68 100644 --- a/src/tbf_ul_ack_fsm.c +++ b/src/tbf_ul_ack_fsm.c @@ -236,9 +236,14 @@ return data_ctx.msg; } -bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf) +bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_ul_ack_fi(ul_tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(ul_tbf_as_tbf_const(ul_tbf), pdch)) + return false; + + fi = tbf_ul_ack_fi(ul_tbf); return fi->state == TBF_UL_ACK_ST_SCHED_UL_ACK; } diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h index f25972e..e06728e 100644 --- a/src/tbf_ul_ack_fsm.h +++ b/src/tbf_ul_ack_fsm.h @@ -22,6 +22,7 @@ struct gprs_rlcmac_tbf; struct gprs_rlcmac_ul_tbf; +struct gprs_rlcmac_pdch; enum tbf_ul_ack_fsm_event { TBF_UL_ACK_EV_SCHED_ACK, /* Tx UL ACK/NACK is pending */ @@ -63,6 +64,6 @@ struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); -bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf); +bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf); bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c index 932a91f..cff17bc 100644 --- a/src/tbf_ul_ass_fsm.c +++ b/src/tbf_ul_ass_fsm.c @@ -341,8 +341,13 @@ return data_ctx.msg; } -bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf) +bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch) { - struct osmo_fsm_inst *fi = tbf_ul_ass_fi(tbf); + struct osmo_fsm_inst *fi; + + if (!tbf_is_control_ts(tbf, pdch)) + return false; + + fi = tbf_ul_ass_fi(tbf); return fi->state == TBF_UL_ASS_SEND_ASS || fi->state == TBF_UL_ASS_SEND_ASS_REJ; } diff --git a/src/tbf_ul_ass_fsm.h b/src/tbf_ul_ass_fsm.h index 8a612f2..aa68adc 100644 --- a/src/tbf_ul_ass_fsm.h +++ b/src/tbf_ul_ass_fsm.h @@ -21,6 +21,7 @@ #include <gprs_pcu.h> struct gprs_rlcmac_tbf; +struct gprs_rlcmac_pdch; enum tbf_ul_ass_fsm_event { TBF_UL_ASS_EV_SCHED_ASS, /* Tx Uplink Assignment is pending */ @@ -65,4 +66,4 @@ struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); -bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf* tbf); +bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30564 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifaf7dde651d56942779d84aa9135fc8c974b6f26 Gerrit-Change-Number: 30564 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-pcu[master]: sched: Pass pdch to *_create_rlcmac_msg() functions
by pespin 14 Dec '22

14 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30565 ) Change subject: sched: Pass pdch to *_create_rlcmac_msg() functions ...................................................................... sched: Pass pdch to *_create_rlcmac_msg() functions The pdch pointer contains more info than just timeslot number. For instance, it contains information about the TRX owning the TS. Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e --- M src/gprs_ms.c M src/gprs_ms.h M src/gprs_rlcmac_sched.cpp M src/nacc_fsm.c M src/nacc_fsm.h M src/tbf_dl_ass_fsm.c M src/tbf_dl_ass_fsm.h M src/tbf_ul_ack_fsm.c M src/tbf_ul_ack_fsm.h M src/tbf_ul_ass_fsm.c M src/tbf_ul_ass_fsm.h M tests/tbf/TbfTest.cpp 12 files changed, 60 insertions(+), 50 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/gprs_ms.c b/src/gprs_ms.c index edb6fba..933953e 100644 --- a/src/gprs_ms.c +++ b/src/gprs_ms.c @@ -1059,15 +1059,16 @@ return false; } -struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts) +struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, uint32_t fn) { int rc; struct nacc_ev_create_rlcmac_msg_ctx data_ctx; data_ctx = (struct nacc_ev_create_rlcmac_msg_ctx) { .tbf = tbf, + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/gprs_ms.h b/src/gprs_ms.h index 41ef2ad..4ff261c 100644 --- a/src/gprs_ms.h +++ b/src/gprs_ms.h @@ -143,7 +143,8 @@ int ms_nacc_start(struct GprsMs *ms, Packet_Cell_Change_Notification_t *notif); bool ms_nacc_rts(const struct GprsMs *ms); -struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts); +struct msgb *ms_nacc_create_rlcmac_msg(struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, uint32_t fn); struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_pacch(struct GprsMs *ms, int8_t use_trx); struct gprs_rlcmac_ul_tbf *ms_new_ul_tbf_assigned_agch(struct GprsMs *ms); diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp index a201b92..87a3733 100644 --- a/src/gprs_rlcmac_sched.cpp +++ b/src/gprs_rlcmac_sched.cpp @@ -139,7 +139,6 @@ tbfs->dl_ass, tbfs->ul_ack, tbfs->nacc }; - uint8_t ts = pdch->ts_no; /* Send Packet Application Information first (ETWS primary notifications) */ msg = sched_app_info(tbfs->dl_ass); @@ -156,15 +155,15 @@ * received, thus preventing the others from being processed. */ if (tbf == tbfs->ul_ass && tbf->ul_ass_state_is(TBF_UL_ASS_SEND_ASS_REJ)) - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); else if (tbf == tbfs->ul_ass && tbf->direction == GPRS_RLCMAC_DL_TBF) - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); else if (tbf == tbfs->dl_ass && tbf->direction == GPRS_RLCMAC_UL_TBF) - msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, fn, ts); + msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, pdch, fn); else if (tbf == tbfs->ul_ack) - msg = tbf_ul_ack_create_rlcmac_msg(tbfs->ul_ack, fn, ts); + msg = tbf_ul_ack_create_rlcmac_msg(tbfs->ul_ack, pdch, fn); else if (tbf == tbfs->nacc) { - msg = ms_nacc_create_rlcmac_msg(tbf->ms(), tbf, fn, ts); + msg = ms_nacc_create_rlcmac_msg(tbf->ms(), tbf, pdch, fn); } if (!msg) { @@ -185,10 +184,10 @@ */ if (tbfs->dl_ass) { tbf = tbfs->dl_ass; - msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, fn, ts); + msg = tbf_dl_ass_create_rlcmac_msg(tbfs->dl_ass, pdch, fn); } else if (tbfs->ul_ass) { tbf = tbfs->ul_ass; - msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, fn, ts); + msg = tbf_ul_ass_create_rlcmac_msg(tbfs->ul_ass, pdch, fn); } } diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index b4d8583..21af485 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->ts, new_poll_fn, &rrbp); + rc = tbf_check_polling(tbf, data->fn, data->pdch->ts_no, new_poll_fn, &rrbp); if (rc < 0) { LOGP(DTBF, LOGL_ERROR, "Failed registering poll for Pkt Cell Chg Continue (%d)\n", rc); return NULL; @@ -202,10 +202,10 @@ LOGP(DNACC, LOGL_DEBUG, "------------------------- TX : Packet Cell Change Continue -------------------------\n"); rate_ctr_inc(rate_ctr_group_get_ctr(bts_rate_counters(ms->bts), CTR_PKT_CELL_CHG_CONTINUE)); talloc_free(mac_control_block); - tbf_set_polling(tbf, *new_poll_fn, data->ts, PDCH_ULC_POLL_CELL_CHG_CONTINUE); + tbf_set_polling(tbf, *new_poll_fn, data->pdch->ts_no, PDCH_ULC_POLL_CELL_CHG_CONTINUE); LOGPTBF(tbf, LOGL_DEBUG, "Scheduled 'Packet Cell Change Continue' polling on PACCH (FN=%d, TS=%d)\n", - *new_poll_fn, data->ts); + *new_poll_fn, data->pdch->ts_no); return msg; free_ret: @@ -608,7 +608,7 @@ data_ctx = (struct nacc_ev_create_rlcmac_msg_ctx *)data; data_ctx->msg = create_packet_cell_chg_continue(ctx, data_ctx, &ctx->continue_poll_fn); if (data_ctx->msg) { - ctx->continue_poll_ts = data_ctx->ts; + ctx->continue_poll_ts = data_ctx->pdch->ts_no; nacc_fsm_state_chg(fi, NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK); } break; diff --git a/src/nacc_fsm.h b/src/nacc_fsm.h index b67ba11..c051637 100644 --- a/src/nacc_fsm.h +++ b/src/nacc_fsm.h @@ -60,8 +60,8 @@ /* passed as data in NACC_EV_CREATE_RLCMAC_MSG */ struct nacc_ev_create_rlcmac_msg_ctx { struct gprs_rlcmac_tbf *tbf; /* target tbf to create messages for */ + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index d4dafe2..207e4d3 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -59,9 +59,9 @@ bool old_tfi_is_valid = tbf_is_tfi_assigned(ctx->tbf); /* 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, &tbf_get_trx(ctx->tbf)->pdch[d->ts])); + OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, d->pdch)); - rc = tbf_check_polling(ctx->tbf, d->fn, d->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; @@ -113,9 +113,9 @@ LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); bts_do_rate_ctr_inc(ms->bts, CTR_PKT_DL_ASSIGNMENT); - tbf_set_polling(ctx->tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_DL_ASS); + tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_DL_ASS); LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled DL Assignment polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); talloc_free(mac_control_block); return msg; @@ -233,12 +233,14 @@ } -struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_dl_ass_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_dl_ass_fsm.h b/src/tbf_dl_ass_fsm.h index 70d768e..b0000ca 100644 --- a/src/tbf_dl_ass_fsm.h +++ b/src/tbf_dl_ass_fsm.h @@ -56,11 +56,13 @@ /* passed as data in TBF_DL_ASS_EV_CREATE_RLCMAC_MSG */ struct tbf_dl_ass_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_dl_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/src/tbf_ul_ack_fsm.c b/src/tbf_ul_ack_fsm.c index 1421c68..9501190 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->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ul_tbf_as_tbf(tbf), d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; } @@ -93,10 +93,10 @@ osmo_fsm_inst_dispatch(tbf_state_fi(ul_tbf_as_tbf(ctx->tbf)), TBF_EV_CONTENTION_RESOLUTION_MS_SUCCESS, NULL); if (final) { - tbf_set_polling(ul_tbf_as_tbf(tbf), new_poll_fn, d->ts, PDCH_ULC_POLL_UL_ACK); + tbf_set_polling(ul_tbf_as_tbf(tbf), new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ACK); LOGPTBFUL(tbf, LOGL_DEBUG, "Scheduled UL Acknowledgement polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); } return msg; @@ -221,12 +221,14 @@ } -struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_ul_ack_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_ul_ack_fsm.h b/src/tbf_ul_ack_fsm.h index e06728e..d0005eb 100644 --- a/src/tbf_ul_ack_fsm.h +++ b/src/tbf_ul_ack_fsm.h @@ -57,13 +57,15 @@ /* passed as data in TBF_UL_ACK_EV_CREATE_RLCMAC_MSG */ struct tbf_ul_ack_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_ul_ack_create_rlcmac_msg(const struct gprs_rlcmac_ul_tbf *ul_tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_ul_ack_rts(const struct gprs_rlcmac_ul_tbf *ul_tbf, const struct gprs_rlcmac_pdch *pdch); bool tbf_ul_ack_waiting_cnf_final_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf); bool tbf_ul_ack_exp_ctrl_ack(const struct gprs_rlcmac_ul_tbf *ul_tbf, uint32_t fn, uint8_t ts); diff --git a/src/tbf_ul_ass_fsm.c b/src/tbf_ul_ass_fsm.c index cff17bc..d910095 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->ts, &new_poll_fn, &rrbp); + rc = tbf_check_polling(ctx->tbf, d->fn, d->pdch->ts_no, &new_poll_fn, &rrbp); if (rc < 0) return NULL; @@ -128,9 +128,9 @@ LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Uplink Assignment -------------------------\n"); bts_do_rate_ctr_inc(ms->bts, CTR_PKT_UL_ASSIGNMENT); - tbf_set_polling(ctx->tbf, new_poll_fn, d->ts, PDCH_ULC_POLL_UL_ASS); + tbf_set_polling(ctx->tbf, new_poll_fn, d->pdch->ts_no, PDCH_ULC_POLL_UL_ASS); LOGPTBF(ctx->tbf, LOGL_INFO, "Scheduled UL Assignment polling on PACCH (FN=%d, TS=%d)\n", - new_poll_fn, d->ts); + new_poll_fn, d->pdch->ts_no); talloc_free(mac_control_block); return msg; @@ -326,12 +326,14 @@ } -struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts) +struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn) { int rc; struct tbf_ul_ass_ev_create_rlcmac_msg_ctx data_ctx = { + .pdch = pdch, .fn = fn, - .ts = ts, .msg = NULL, }; diff --git a/src/tbf_ul_ass_fsm.h b/src/tbf_ul_ass_fsm.h index aa68adc..a978e91 100644 --- a/src/tbf_ul_ass_fsm.h +++ b/src/tbf_ul_ass_fsm.h @@ -59,11 +59,13 @@ /* passed as data in TBF_UL_ASS_EV_CREATE_RLCMAC_MSG */ struct tbf_ul_ass_ev_create_rlcmac_msg_ctx { + const struct gprs_rlcmac_pdch *pdch; /* TS where the created DL ctrl block is to be sent */ uint32_t fn; /* FN where the created DL ctrl block is to be sent */ - uint8_t ts; /* TS where the created DL ctrl block is to be sent */ struct msgb *msg; /* to be filled by FSM during event processing */ }; -struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf* tbf, uint32_t fn, uint8_t ts); +struct msgb *tbf_ul_ass_create_rlcmac_msg(const struct gprs_rlcmac_tbf *tbf, + const struct gprs_rlcmac_pdch *pdch, + uint32_t fn); bool tbf_ul_ass_rts(const struct gprs_rlcmac_tbf *tbf, const struct gprs_rlcmac_pdch *pdch); diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index f94c8de..79d0f63 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -831,7 +831,7 @@ pdch->rcv_block(data_msg, 42, *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - struct msgb *msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + struct msgb *msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); static uint8_t exp1[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x87, 0xb0, 0x06, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b @@ -859,7 +859,7 @@ pdch->rcv_block(data_msg, 42, *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + msg1 = tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); static uint8_t exp2[] = { 0x40, 0x24, 0x01, 0x0b, 0x3e, 0x24, 0x46, 0x68, 0x9c, 0x70, 0x88, 0xb0, 0x06, 0x8b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b @@ -1380,7 +1380,7 @@ GprsMs *ms; uint8_t trx_no = 0; int tfi = 0; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; /* send fake data with cv=0*/ struct gprs_rlc_ul_header_egprs_3 *hdr3 = NULL; @@ -1410,11 +1410,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; @@ -1461,7 +1460,7 @@ GprsMs *ms; uint8_t trx_no = 0; int tfi = 0; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; check_tbf(ul_tbf); /* send fake data with cv=0*/ @@ -1493,11 +1492,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; @@ -1522,7 +1520,7 @@ pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); request_dl_rlc_block(ul_tbf, fn); @@ -1545,7 +1543,7 @@ uint8_t trx_no = 0; int tfi = 0; gprs_rlcmac_ul_tbf *ul_tbf; - struct gprs_rlcmac_pdch *pdch; + struct gprs_rlcmac_pdch *pdch = &bts->trx[trx_no].pdch[ts_no]; /* check the TBF */ ul_tbf = bts_ul_tbf_by_tfi(bts, tfi, trx_no, ts_no); @@ -1581,11 +1579,10 @@ data[5] = 0x0; data[6] = 0x2b; data[7] = 0x2b; - pdch = &bts->trx[trx_no].pdch[ts_no]; pdch->rcv_block(&data[0], sizeof(data), *fn, &meas); } osmo_fsm_inst_dispatch(ul_tbf->ul_ack_fsm.fi, TBF_UL_ACK_EV_SCHED_ACK, NULL); - tbf_ul_ack_create_rlcmac_msg(ul_tbf, *fn, ts_no); + tbf_ul_ack_create_rlcmac_msg(ul_tbf, pdch, *fn); memset(data, 0x2b, sizeof(data)); hdr3 = (struct gprs_rlc_ul_header_egprs_3 *)data; hdr3->r = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30565 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ic31a7360a29e61f70bb1338ddab6f5f31aa8b26e Gerrit-Change-Number: 30565 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-pcu[master]: Move control_ts explicit checks out of the scheduler implementation
by pespin 14 Dec '22

14 Dec '22
Attention is currently required from: fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30564 ) Change subject: Move control_ts explicit checks out of the scheduler implementation ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30564 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ifaf7dde651d56942779d84aa9135fc8c974b6f26 Gerrit-Change-Number: 30564 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Dec 2022 13:49:54 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: abis: Add a timeout while waiting for connect()
by pespin 14 Dec '22

14 Dec '22
Attention is currently required from: fixeria, daniel. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/30588 ) Change subject: abis: Add a timeout while waiting for connect() ...................................................................... Patch Set 1: Code-Review-1 (1 comment) Patchset: PS1: I'm a bit surprised with this approach? Why aren't we setting some sort of connect timeout at socket level? That would trigger select() error and should trigger picking next BTS in upper layers. -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30588 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I2b985d9ee472d5a39bc3da1dce1137ebabe93e85 Gerrit-Change-Number: 30588 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Dec 2022 13:42:31 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: ipaccess: Clean up keepalive FSM properly
by daniel 14 Dec '22

14 Dec '22
daniel has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30584 ) Change subject: ipaccess: Clean up keepalive FSM properly ...................................................................... ipaccess: Clean up keepalive FSM properly Fixes: OS#5828 Change-Id: I0a54c1056e43161edc86c570e80be51d7517f411 --- M src/input/ipaccess.c 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index bde2c12..44c1b78 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -51,6 +51,7 @@ #include <osmocom/core/backtrace.h> #include <osmocom/gsm/ipa.h> #include <osmocom/core/stats_tcp.h> +#include <osmocom/core/fsm.h> /* global parameters of IPA input driver */ struct ipa_pars g_e1inp_ipaccess_pars; @@ -77,7 +78,7 @@ ka_fsm = e1i_ts->driver.ipaccess.ka_fsm; if (ka_fsm) { - ipa_keepalive_fsm_stop(ka_fsm); + osmo_fsm_inst_term(ka_fsm, OSMO_FSM_TERM_REQUEST, NULL); e1i_ts->driver.ipaccess.ka_fsm = NULL; } } @@ -863,9 +864,10 @@ static void ipaccess_bts_updown_cb(struct ipa_client_conn *link, int up) { struct e1inp_line *line = link->line; + struct e1inp_ts *e1i_ts = ipaccess_line_ts(link->ofd, line); if (up) { - struct osmo_fsm_inst *ka_fsm = ipaccess_line_ts(link->ofd, line)->driver.ipaccess.ka_fsm; + struct osmo_fsm_inst *ka_fsm = e1i_ts->driver.ipaccess.ka_fsm; update_fd_settings(line, link->ofd->fd); if (ka_fsm && line->ipa_kap) @@ -873,6 +875,7 @@ return; } + ipaccess_keepalive_fsm_cleanup(e1i_ts); if (line->ops->sign_link_down) line->ops->sign_link_down(line); } @@ -1090,7 +1093,7 @@ } case E1INP_LINE_R_BTS: { struct ipa_client_conn *link; - struct e1inp_ts *e1i_ts; + struct e1inp_ts *e1i_ts = e1inp_line_ipa_oml_ts(line); LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode, " "OML connecting to %s:%u\n", line->ops->cfg.ipa.addr, @@ -1099,6 +1102,7 @@ /* Drop previous line */ if (il->ipa_cli[0]) { ipa_client_conn_close(il->ipa_cli[0]); + ipaccess_keepalive_fsm_cleanup(e1i_ts); ipa_client_conn_destroy(il->ipa_cli[0]); il->ipa_cli[0] = NULL; } @@ -1128,7 +1132,6 @@ return -EIO; } - e1i_ts = e1inp_line_ipa_oml_ts(line); ipaccess_bts_keepalive_fsm_alloc(e1i_ts, link, "oml_bts_to_bsc"); il->ipa_cli[0] = link; ret = 0; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30584 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I0a54c1056e43161edc86c570e80be51d7517f411 Gerrit-Change-Number: 30584 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: ipaccess: Clean up keepalive FSM properly
by fixeria 14 Dec '22

14 Dec '22
Attention is currently required from: daniel. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30584 ) Change subject: ipaccess: Clean up keepalive FSM properly ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30584 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I0a54c1056e43161edc86c570e80be51d7517f411 Gerrit-Change-Number: 30584 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Dec 2022 13:31:09 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: abis: Add a timeout while waiting for connect()
by daniel 14 Dec '22

14 Dec '22
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/30588 ) Change subject: abis: Add a timeout while waiting for connect() ...................................................................... abis: Add a timeout while waiting for connect() Change-Id: I2b985d9ee472d5a39bc3da1dce1137ebabe93e85 Related: SYS#6237 --- M src/common/abis.c 1 file changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/88/30588/1 diff --git a/src/common/abis.c b/src/common/abis.c index 10eeaff..df0c655 100644 --- a/src/common/abis.c +++ b/src/common/abis.c @@ -284,8 +284,16 @@ { switch (fi->state) { case ABIS_LINK_ST_WAIT_RECONNECT: - osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_CONNECTING, 0, 0); + osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_CONNECTING, OML_RETRY_TIMER, 0); break; + case ABIS_LINK_ST_CONNECTING: + { + struct abis_link_fsm_priv *priv = fi->priv; + struct gsm_bts *bts = priv->bts; + reset_oml_link(bts); + osmo_fsm_inst_state_chg(fi, ABIS_LINK_ST_CONNECTING, OML_RETRY_TIMER, 0); + break; + } default: OSMO_ASSERT(0); } @@ -307,7 +315,8 @@ .out_state_mask = S(ABIS_LINK_ST_WAIT_RECONNECT) | S(ABIS_LINK_ST_CONNECTED) | - S(ABIS_LINK_ST_FAILED), + S(ABIS_LINK_ST_FAILED) | + S(ABIS_LINK_ST_CONNECTING), .onenter = abis_link_connecting_onenter, .action = abis_link_connecting, }, @@ -532,7 +541,7 @@ abis_link_fsm_priv->model_name = model_name; bts->abis_link_fi->priv = abis_link_fsm_priv; - osmo_fsm_inst_state_chg(bts->abis_link_fi, ABIS_LINK_ST_CONNECTING, 0, 0); + osmo_fsm_inst_state_chg(bts->abis_link_fi, ABIS_LINK_ST_CONNECTING, OML_RETRY_TIMER, 0); return 0; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30588 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I2b985d9ee472d5a39bc3da1dce1137ebabe93e85 Gerrit-Change-Number: 30588 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: tbf_ul_fsm_ctx: Properly define tbf backptr as ul_tbf
by pespin 14 Dec '22

14 Dec '22
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30541 ) Change subject: tbf_ul_fsm_ctx: Properly define tbf backptr as ul_tbf ...................................................................... tbf_ul_fsm_ctx: Properly define tbf backptr as ul_tbf Since the tbf_fsm was split recently into tbf_dl_fsm and tbf_ul_fsm, each has now its own ctx strucvture, which can hold the proper tbf subclass. Change-Id: I7741d524a14437caf4c92b9c09e19762eb272e30 --- M src/tbf_fsm.h M src/tbf_ul.cpp M src/tbf_ul_fsm.c 3 files changed, 24 insertions(+), 21 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h index feb9e04..a62e72d 100644 --- a/src/tbf_fsm.h +++ b/src/tbf_fsm.h @@ -63,7 +63,10 @@ }; struct tbf_ul_fsm_ctx { - struct gprs_rlcmac_tbf *tbf; /* back pointer */ + union { /* back pointer. union used to easily access superclass from ctx */ + struct gprs_rlcmac_tbf *tbf; + struct gprs_rlcmac_ul_tbf *ul_tbf; + }; uint32_t state_flags; unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */ }; diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index 246c0e1..43cd4f6 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -202,7 +202,7 @@ memset(&m_usf, USF_INVALID, sizeof(m_usf)); memset(&state_fsm, 0, sizeof(state_fsm)); - state_fsm.tbf = (struct gprs_rlcmac_tbf *)this; + state_fsm.ul_tbf = this; state_fi = osmo_fsm_inst_alloc(&tbf_ul_fsm, this, &state_fsm, LOGL_INFO, NULL); OSMO_ASSERT(state_fi); diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c index 9ac7ee8..fb4a256 100644 --- a/src/tbf_ul_fsm.c +++ b/src/tbf_ul_fsm.c @@ -59,22 +59,22 @@ ch = "PACCH"; break; default: - LOGPTBF(ctx->tbf, LOGL_ERROR, - "attempted to %sset unexpected ass. type %d - FIXME!\n", - set ? "" : "un", t); + LOGPTBFUL(ctx->ul_tbf, LOGL_ERROR, + "attempted to %sset unexpected ass. type %d - FIXME!\n", + set ? "" : "un", t); return; } if (set && prev_set) - LOGPTBF(ctx->tbf, LOGL_ERROR, - "attempted to set ass. type %s which is already set.\n", ch); + LOGPTBFUL(ctx->ul_tbf, LOGL_ERROR, + "attempted to set ass. type %s which is already set.\n", ch); else if (!set && !prev_set) return; - LOGPTBF(ctx->tbf, LOGL_INFO, "%sset ass. type %s [prev CCCH:%u, PACCH:%u]\n", - set ? "" : "un", ch, - !!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)), - !!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))); + LOGPTBFUL(ctx->ul_tbf, LOGL_INFO, "%sset ass. type %s [prev CCCH:%u, PACCH:%u]\n", + set ? "" : "un", ch, + !!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)), + !!(ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))); if (set) { ctx->state_flags |= (1 << t); @@ -92,7 +92,7 @@ case TBF_EV_ASSIGN_ADD_CCCH: mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, true); tbf_ul_fsm_state_chg(fi, TBF_ST_FLOW); - ul_tbf_contention_resolution_start(tbf_as_ul_tbf(ctx->tbf)); + ul_tbf_contention_resolution_start(ctx->ul_tbf); break; case TBF_EV_ASSIGN_ADD_PACCH: mod_ass_type(ctx, GPRS_RLCMAC_FLAG_PACCH, true); @@ -122,9 +122,9 @@ val = osmo_tdef_get(the_pcu->T_defs, fi->T, OSMO_TDEF_MS, -1); sec = val / 1000; micro = (val % 1000) * 1000; - LOGPTBF(ctx->tbf, LOGL_DEBUG, - "Starting timer X2001 [assignment (PACCH)] with %u sec. %u microsec\n", - sec, micro); + LOGPTBFUL(ctx->ul_tbf, LOGL_DEBUG, + "Starting timer X2001 [assignment (PACCH)] with %u sec. %u microsec\n", + sec, micro); osmo_timer_schedule(&fi->timer, sec, micro); } } @@ -144,9 +144,9 @@ tbf_assign_control_ts(ctx->tbf); if (ctx->state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)) { /* We now know that the PACCH really existed */ - LOGPTBF(ctx->tbf, LOGL_INFO, - "The TBF has been confirmed on the PACCH, " - "changed type from CCCH to PACCH\n"); + LOGPTBFUL(ctx->ul_tbf, LOGL_INFO, + "The TBF has been confirmed on the PACCH, " + "changed type from CCCH to PACCH\n"); mod_ass_type(ctx, GPRS_RLCMAC_FLAG_CCCH, false); mod_ass_type(ctx, GPRS_RLCMAC_FLAG_PACCH, true); } @@ -272,8 +272,8 @@ */ val = osmo_tdef_get(tbf_ms(ctx->tbf)->bts->T_defs_bts, ctx->T_release, OSMO_TDEF_S, -1); fi->T = ctx->T_release; - LOGPTBF(ctx->tbf, LOGL_DEBUG, "starting timer T%u with %lu sec. %u microsec\n", - ctx->T_release, val, 0); + LOGPTBFUL(ctx->ul_tbf, LOGL_DEBUG, "starting timer T%u with %lu sec. %u microsec\n", + ctx->T_release, val, 0); osmo_timer_schedule(&fi->timer, val, 0); } @@ -287,7 +287,7 @@ struct tbf_ul_fsm_ctx *ctx = (struct tbf_ul_fsm_ctx *)fi->priv; switch (fi->T) { case -2001: - LOGPTBF(ctx->tbf, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); + LOGPTBFUL(ctx->ul_tbf, LOGL_NOTICE, "releasing due to PACCH assignment timeout.\n"); /* fall-through */ case 3169: case 3195: -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30541 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I7741d524a14437caf4c92b9c09e19762eb272e30 Gerrit-Change-Number: 30541 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.