diff options
author | Christian Hopps <chopps@gmail.com> | 2024-02-08 16:30:42 +0100 |
---|---|---|
committer | Christian Hopps <chopps@labn.net> | 2024-02-12 13:57:28 +0100 |
commit | 40e51d225797ecec3bb445b2cda1be5f7b32238d (patch) | |
tree | 7adf35990a4e5aa86ede8da2e5e571cc26e913ce | |
parent | Merge pull request #15355 from idryzhov/fix-mgmtd-notif (diff) | |
download | frr-40e51d225797ecec3bb445b2cda1be5f7b32238d.tar.xz frr-40e51d225797ecec3bb445b2cda1be5f7b32238d.zip |
mgmtd: remove unused commit phase SEND_CFG
Signed-off-by: Christian Hopps <chopps@labn.net>
-rw-r--r-- | mgmtd/mgmt_fe_adapter.c | 9 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_adapter.h | 1 | ||||
-rw-r--r-- | mgmtd/mgmt_txn.c | 28 |
3 files changed, 2 insertions, 36 deletions
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c index ec8e77335..62d1a0109 100644 --- a/mgmtd/mgmt_fe_adapter.c +++ b/mgmtd/mgmt_fe_adapter.c @@ -1586,15 +1586,6 @@ mgmt_fe_adapter_cmt_stats_write(struct vty *vty, mgmt_realtime_to_string( &adapter->cmt_stats.txn_create_start, buf, sizeof(buf))); - vty_out(vty, -#ifdef MGMTD_LOCAL_VALIDATIONS_ENABLED - " Send-Config Start: \t\t%s\n", -#else - " Send-Config-Validate Start: \t%s\n", -#endif - mgmt_realtime_to_string( - &adapter->cmt_stats.send_cfg_start, buf, - sizeof(buf))); vty_out(vty, " Apply-Config Start: \t\t%s\n", mgmt_realtime_to_string( &adapter->cmt_stats.apply_cfg_start, diff --git a/mgmtd/mgmt_fe_adapter.h b/mgmtd/mgmt_fe_adapter.h index 2150f864d..e768a3cca 100644 --- a/mgmtd/mgmt_fe_adapter.h +++ b/mgmtd/mgmt_fe_adapter.h @@ -24,7 +24,6 @@ struct mgmt_commit_stats { #endif struct timeval prep_cfg_start; struct timeval txn_create_start; - struct timeval send_cfg_start; struct timeval apply_cfg_start; struct timeval apply_cfg_end; struct timeval txn_del_start; diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index 664f42f4b..35d67e247 100644 --- a/mgmtd/mgmt_txn.c +++ b/mgmtd/mgmt_txn.c @@ -49,7 +49,6 @@ struct mgmt_set_cfg_req { enum mgmt_commit_phase { MGMTD_COMMIT_PHASE_PREPARE_CFG = 0, MGMTD_COMMIT_PHASE_TXN_CREATE, - MGMTD_COMMIT_PHASE_SEND_CFG, MGMTD_COMMIT_PHASE_APPLY_CFG, MGMTD_COMMIT_PHASE_TXN_DELETE, MGMTD_COMMIT_PHASE_MAX @@ -62,8 +61,6 @@ static inline const char *mgmt_commit_phase2str(enum mgmt_commit_phase cmt_phase return "PREP-CFG"; case MGMTD_COMMIT_PHASE_TXN_CREATE: return "CREATE-TXN"; - case MGMTD_COMMIT_PHASE_SEND_CFG: - return "SEND-CFG"; case MGMTD_COMMIT_PHASE_APPLY_CFG: return "APPLY-CFG"; case MGMTD_COMMIT_PHASE_TXN_DELETE: @@ -1187,13 +1184,10 @@ static int mgmt_txn_send_be_cfg_data(struct mgmt_txn_ctx *txn, cmtcfg_req->cmt_stats->last_num_cfgdata_reqs++; } - cmtcfg_req->be_phase[adapter->id] = MGMTD_COMMIT_PHASE_SEND_CFG; - /* - * This could be the last Backend Client to send CFGDATA_CREATE_REQ to. - * Try moving the commit to next phase. + * We don't advance the phase here, instead that is driven by the + * cfg_reply. */ - mgmt_try_move_commit_to_next_phase(txn, cmtcfg_req); return 0; } @@ -1394,24 +1388,6 @@ static void mgmt_txn_process_commit_cfg(struct event *thread) */ mgmt_txn_send_be_txn_create(txn); break; - case MGMTD_COMMIT_PHASE_SEND_CFG: - if (mm->perf_stats_en) - gettimeofday(&cmtcfg_req->cmt_stats->send_cfg_start, - NULL); - /* - * All CFGDATA_CREATE_REQ should have been sent to - * Backend by now. - */ -#ifndef MGMTD_LOCAL_VALIDATIONS_ENABLED - __dbg("txn-id: %" PRIu64 " session-id: %" PRIu64 - " trigger sending CFG_VALIDATE_REQ to all backend clients", - txn->txn_id, txn->session_id); -#else /* ifndef MGMTD_LOCAL_VALIDATIONS_ENABLED */ - __dbg("txn-id: %" PRIu64 " session-id: %" PRIu64 - " trigger sending CFG_APPLY_REQ to all backend clients", - txn->txn_id, txn->session_id); -#endif /* ifndef MGMTD_LOCAL_VALIDATIONS_ENABLED */ - break; case MGMTD_COMMIT_PHASE_APPLY_CFG: if (mm->perf_stats_en) gettimeofday(&cmtcfg_req->cmt_stats->apply_cfg_start, |