This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/22859 ) Change subject: nacc_fsm: Support receiving Pkt Cell Chg Notif while in some advanced states ...................................................................... nacc_fsm: Support receiving Pkt Cell Chg Notif while in some advanced states Related: SYS#4909 Change-Id: Iee9cb67bf2c0c6f36b788498f4ef2672e33204b7 --- M src/nacc_fsm.c 1 file changed, 31 insertions(+), 3 deletions(-) Approvals: daniel: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/nacc_fsm.c b/src/nacc_fsm.c index 5bc9c12..3afa8b5 100644 --- a/src/nacc_fsm.c +++ b/src/nacc_fsm.c @@ -321,7 +321,8 @@ if (fill_neigh_key_from_bts_pkt_cell_chg_not(&neigh_key, bts, notif) < 0) { LOGPFSML(ctx->fi, LOGL_NOTICE, "TargetCell type=0x%x not supported\n", notif->Target_Cell.UnionType); - nacc_fsm_state_chg(ctx->fi, NACC_ST_TX_CELL_CHG_CONTINUE); + if (ctx->fi->state != NACC_ST_TX_CELL_CHG_CONTINUE) + nacc_fsm_state_chg(ctx->fi, NACC_ST_TX_CELL_CHG_CONTINUE); return; } /* If tgt cell changed, restart resolving it */ @@ -520,19 +521,29 @@ } } -/* st_tx_neighbour_data_on_enter: - * At this point, we already received all required SI information to send stored +/* At this point, we already received all required SI information to send stored * in struct nacc_fsm_ctx. We now wait for scheduler to ask us to construct * RLCMAC DL CTRL messages to move FSM states forward */ +static void st_tx_neighbour_data_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct nacc_fsm_ctx *ctx = (struct nacc_fsm_ctx *)fi->priv; + ctx->si_info_bytes_sent = 0; + ctx->container_idx = 0; +} static void st_tx_neighbour_data(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nacc_fsm_ctx *ctx = (struct nacc_fsm_ctx *)fi->priv; + const Packet_Cell_Change_Notification_t *notif; struct nacc_ev_create_rlcmac_msg_ctx *data_ctx; bool all_si_info_sent; switch (event) { + case NACC_EV_RX_CELL_CHG_NOTIFICATION: + notif = (const Packet_Cell_Change_Notification_t *)data; + handle_retrans_pkt_cell_chg_notif(ctx, notif); + break; case NACC_EV_CREATE_RLCMAC_MSG: data_ctx = (struct nacc_ev_create_rlcmac_msg_ctx *)data; data_ctx->msg = create_packet_neighbour_cell_data(ctx, data_ctx->tbf, &all_si_info_sent); @@ -557,9 +568,14 @@ static void st_cell_chg_continue(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct nacc_fsm_ctx *ctx = (struct nacc_fsm_ctx *)fi->priv; + const Packet_Cell_Change_Notification_t *notif; struct nacc_ev_create_rlcmac_msg_ctx *data_ctx; switch (event) { + case NACC_EV_RX_CELL_CHG_NOTIFICATION: + notif = (const Packet_Cell_Change_Notification_t *)data; + handle_retrans_pkt_cell_chg_notif(ctx, notif); + break; case NACC_EV_CREATE_RLCMAC_MSG: 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); @@ -575,7 +591,14 @@ static void st_wait_cell_chg_continue_ack(struct osmo_fsm_inst *fi, uint32_t event, void *data) { + struct nacc_fsm_ctx *ctx = (struct nacc_fsm_ctx *)fi->priv; + const Packet_Cell_Change_Notification_t *notif; + switch (event) { + case NACC_EV_RX_CELL_CHG_NOTIFICATION: + notif = (const Packet_Cell_Change_Notification_t *)data; + handle_retrans_pkt_cell_chg_notif(ctx, notif); + break; case NACC_EV_TIMEOUT_CELL_CHG_CONTINUE: nacc_fsm_state_chg(fi, NACC_ST_TX_CELL_CHG_CONTINUE); break; @@ -656,8 +679,10 @@ X(NACC_EV_RX_CELL_CHG_NOTIFICATION) | X(NACC_EV_CREATE_RLCMAC_MSG), .out_state_mask = + X(NACC_ST_WAIT_RESOLVE_RAC_CI) | X(NACC_ST_TX_CELL_CHG_CONTINUE), .name = "TX_NEIGHBOUR_DATA", + .onenter = st_tx_neighbour_data_on_enter, .action = st_tx_neighbour_data, }, [NACC_ST_TX_CELL_CHG_CONTINUE] = { @@ -665,15 +690,18 @@ X(NACC_EV_RX_CELL_CHG_NOTIFICATION) | X(NACC_EV_CREATE_RLCMAC_MSG), .out_state_mask = + X(NACC_ST_WAIT_RESOLVE_RAC_CI) | X(NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK), .name = "TX_CELL_CHG_CONTINUE", .action = st_cell_chg_continue, }, [NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK] = { .in_event_mask = + X(NACC_EV_RX_CELL_CHG_NOTIFICATION) | X(NACC_EV_RX_CELL_CHG_CONTINUE_ACK) | X(NACC_EV_TIMEOUT_CELL_CHG_CONTINUE), .out_state_mask = + X(NACC_ST_WAIT_RESOLVE_RAC_CI) | X(NACC_ST_TX_CELL_CHG_CONTINUE) | X(NACC_ST_DONE), .name = "WAIT_CELL_CHG_CONTINUE_ACK", -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/22859 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Iee9cb67bf2c0c6f36b788498f4ef2672e33204b7 Gerrit-Change-Number: 22859 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210213/84b843c2/attachment.htm>