- When sending response message to Adest which is not exist (crash/terminate),
current MDS try to wait for 1.5 seconds before conclude no route to send RSP.
- Here are scenarios may waste 1.5s waiting:
SVCs DOWN (dead adest or vdest role change) -> get SNDRSP -> send RSP (wait
1.5s)
get SNDRSP -> SVCs DOWN (dead adest or vdest role change) -> send RSP (wait
1.5s)
This long wait time cause trouble for higher layer services, e.g: ntf, imm,
etc...
where there are many agents send initialize request (use message SNDRSP type)
- Solution: create adest list, a timer start when last SVC of adest DOWN.
When sending RSP to this adest, the wait time will reduce to only 10ms.
Notice that following origin behavior is kept:
No any SVC UP before -> get SNDRSP -> send RSP (wait 1.5s)
---
src/mds/mds_c_api.c | 180 ++++++++++++++++++++++++++++++++--------
src/mds/mds_c_sndrcv.c | 38 +++++----
src/mds/mds_core.h | 30 ++++++-
src/mds/mds_dt2c.h | 2 +-
src/mds/mds_dt_common.c | 22 ++++-
src/mds/mds_main.c | 4 +
6 files changed, 221 insertions(+), 55 deletions(-)
diff --git a/src/mds/mds_c_api.c b/src/mds/mds_c_api.c
index 132555b8e..24b524d92 100644
--- a/src/mds/mds_c_api.c
+++ b/src/mds/mds_c_api.c
@@ -27,6 +27,62 @@
#include "mds_log.h"
#include "mds_core.h"
+/* Internal use functions */
+static void start_mds_down_tmr(MDS_DEST adest, MDS_SVC_ID svc_id)
+{
+ MDS_TMR_REQ_INFO *tmr_req_info = calloc(1, sizeof(MDS_TMR_REQ_INFO));
+ if (tmr_req_info == NULL) {
+ m_MDS_LOG_ERR("mds_mcm_svc_down out of memory\n");
+ abort();
+ }
+
+ tmr_req_info->type = MDS_DOWN_TMR;
+ tmr_req_info->info.down_event_tmr_info.adest = adest;
+ tmr_req_info->info.down_event_tmr_info.svc_id = svc_id;
+
+ tmr_t tmr_id = ncs_tmr_alloc(__FILE__, __LINE__);
+ if (tmr_id == NULL) {
+ m_MDS_LOG_ERR("mds_mcm_svc_down out of memory\n");
+ abort();
+ }
+
+ tmr_req_info->info.down_event_tmr_info.tmr_id = tmr_id;
+
+ uint32_t tmr_hdl =
+ ncshm_create_hdl(NCS_HM_POOL_ID_COMMON, NCS_SERVICE_ID_COMMON,
+ (NCSCONTEXT)(tmr_req_info));
+
+ if (svc_id == 0) {
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&adest);
+ if (adest_info) {
+ adest_info->tmr_req_info = tmr_req_info;
+ adest_info->tmr_hdl = tmr_hdl;
+ }
+ }
+ tmr_id = ncs_tmr_start(tmr_id, MDS_DOWN_TMR_VAL,
+ (TMR_CALLBACK)mds_tmr_callback,
+ (void *)(long)(tmr_hdl), __FILE__, __LINE__);
+ assert(tmr_id != NULL);
+}
+
+static void stop_mds_down_tmr(MDS_ADEST_INFO *adest_info)
+{
+ assert(adest_info != NULL);
+ if (adest_info->tmr_req_info) {
+ MDS_TMR_REQ_INFO *tmr_req_info = adest_info->tmr_req_info;
+ ncs_tmr_stop(tmr_req_info->info.down_event_tmr_info.tmr_id);
+ ncs_tmr_free(tmr_req_info->info.down_event_tmr_info.tmr_id);
+ m_MMGR_FREE_TMR_INFO(tmr_req_info);
+ adest_info->tmr_req_info = NULL;
+ ncshm_destroy_hdl(
+ NCS_SERVICE_ID_COMMON,
+ (uint32_t)adest_info->tmr_hdl);
+ }
+}
+
/*********************************************************
Function NAME: mds_validate_pwe_hdl
@@ -1449,6 +1505,25 @@ uint32_t mds_mcm_svc_unsubscribe(NCSMDS_INFO *info)
subscr_req_hdl);
}
+ /* Find and delete related adest from adest list */
+ MDS_SUBSCRIPTION_RESULTS_INFO *s_info = NULL;
+ mds_subtn_res_tbl_getnext_any(svc_hdl,
+ info->info.svc_cancel.i_svc_ids[i],
+ &s_info);
+ if (s_info) {
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)
+ ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&s_info->key.adest);
+ if (adest_info) {
+ stop_mds_down_tmr(adest_info);
+ ncs_patricia_tree_del(
+ &gl_mds_mcm_cb->adest_list,
+ (NCS_PATRICIA_NODE *)adest_info);
+ }
+ }
+
/* Delete all MDTM entries */
mds_subtn_res_tbl_del_all(svc_hdl,
info->info.svc_cancel.i_svc_ids[i]);
@@ -1900,6 +1975,29 @@ uint32_t mds_mcm_svc_up(PW_ENV_ID pwe_id, MDS_SVC_ID
svc_id, V_DEST_RL role,
/*************** Validation for SCOPE **********************/
+ if (adest != m_MDS_GET_ADEST) {
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&adest);
+ if (!adest_info) {
+ /* Add adest to adest list */
+ adest_info = m_MMGR_ALLOC_ADEST_INFO;
+ memset(adest_info, 0, sizeof(MDS_ADEST_INFO));
+ adest_info->adest = adest;
+ adest_info->node.key_info =
+ (uint8_t *)&adest_info->adest;
+ adest_info->svc_cnt = 1;
+ ncs_patricia_tree_add(
+ &gl_mds_mcm_cb->adest_list,
+ (NCS_PATRICIA_NODE *)adest_info);
+ } else {
+ if (adest_info->svc_cnt == 0)
+ stop_mds_down_tmr(adest_info);
+ adest_info->svc_cnt++;
+ }
+ }
+
status = mds_get_subtn_res_tbl_by_adest(local_svc_hdl, svc_id, vdest_id,
adest, &log_subtn_result_info);
@@ -3377,36 +3475,6 @@ uint32_t mds_mcm_svc_up(PW_ENV_ID pwe_id, MDS_SVC_ID
svc_id, V_DEST_RL role,
return NCSCC_RC_SUCCESS;
}
-static void start_mds_down_tmr(MDS_DEST adest, MDS_SVC_ID svc_id)
-{
- MDS_TMR_REQ_INFO *tmr_req_info = calloc(1, sizeof(MDS_TMR_REQ_INFO));
- if (tmr_req_info == NULL) {
- m_MDS_LOG_ERR("mds_mcm_svc_down out of memory\n");
- abort();
- }
-
- tmr_req_info->type = MDS_DOWN_TMR;
- tmr_req_info->info.down_event_tmr_info.adest = adest;
- tmr_req_info->info.down_event_tmr_info.svc_id = svc_id;
-
- tmr_t tmr_id = ncs_tmr_alloc(__FILE__, __LINE__);
- if (tmr_id == NULL) {
- m_MDS_LOG_ERR("mds_mcm_svc_down out of memory\n");
- abort();
- }
-
- tmr_req_info->info.down_event_tmr_info.tmr_id = tmr_id;
-
- uint32_t tmr_hdl =
- ncshm_create_hdl(NCS_HM_POOL_ID_COMMON, NCS_SERVICE_ID_COMMON,
- (NCSCONTEXT)(tmr_req_info));
-
- tmr_id = ncs_tmr_start(tmr_id, 1000, // 10ms unit
- (TMR_CALLBACK)mds_tmr_callback,
- (void *)(long)(tmr_hdl), __FILE__, __LINE__);
- assert(tmr_id != NULL);
-}
-
/*********************************************************
Function NAME: mds_mcm_svc_down
@@ -3571,6 +3639,22 @@ uint32_t mds_mcm_svc_down(PW_ENV_ID pwe_id, MDS_SVC_ID
svc_id, V_DEST_RL role,
/* Discard : Getting down before getting up */
} else { /* Entry exist in subscription result table */
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&adest);
+ if (adest_info) {
+ adest_info->svc_cnt--;
+ if (adest_info->svc_cnt == 0) {
+ m_MDS_LOG_INFO(
+ "MCM:API: Adest <0x%08x, %u>"
+ " down timer start",
+ m_MDS_GET_NODE_ID_FROM_ADEST(adest),
+ m_MDS_GET_PROCESS_ID_FROM_ADEST(adest));
+ start_mds_down_tmr(adest, 0);
+ }
+ }
+
if (vdest_id == m_VDEST_ID_FOR_ADEST_ENTRY) {
status = mds_subtn_res_tbl_del(
local_svc_hdl, svc_id, vdest_id, adest,
@@ -4952,7 +5036,18 @@ uint32_t mds_mcm_init(void)
ncs_patricia_tree_init(&gl_mds_mcm_cb->vdest_list,
&pat_tree_params)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_init: vdest :failure, L
mds_mcm_init");
+ "MCM:API: patricia_tree_init: vdest :failure");
+ return NCSCC_RC_FAILURE;
+ }
+
+ /* ADEST TREE */
+ memset(&pat_tree_params, 0, sizeof(NCS_PATRICIA_PARAMS));
+ pat_tree_params.key_size = sizeof(MDS_DEST);
+ if (NCSCC_RC_SUCCESS !=
+ ncs_patricia_tree_init(&gl_mds_mcm_cb->adest_list,
+ &pat_tree_params)) {
+ m_MDS_LOG_ERR(
+ "MCM:API: patricia_tree_init: adest :failure");
return NCSCC_RC_FAILURE;
}
@@ -4962,11 +5057,16 @@ uint32_t mds_mcm_init(void)
if (NCSCC_RC_SUCCESS != ncs_patricia_tree_init(&gl_mds_mcm_cb->svc_list,
&pat_tree_params)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_init:service :failure, L
mds_mcm_init");
+ "MCM:API: patricia_tree_init:service :failure");
if (NCSCC_RC_SUCCESS !=
ncs_patricia_tree_destroy(&gl_mds_mcm_cb->vdest_list)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_destroy: service :failure,
L mds_mcm_init");
+ "MCM:API: patricia_tree_destroy: vdest :failure");
+ }
+ if (NCSCC_RC_SUCCESS !=
+ ncs_patricia_tree_destroy(&gl_mds_mcm_cb->adest_list)) {
+ m_MDS_LOG_ERR(
+ "MCM:API: patricia_tree_destroy: adest :failure");
}
return NCSCC_RC_FAILURE;
}
@@ -4978,16 +5078,21 @@ uint32_t mds_mcm_init(void)
ncs_patricia_tree_init(&gl_mds_mcm_cb->subtn_results,
&pat_tree_params)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_init: subscription: failure, L
mds_mcm_init");
+ "MCM:API: patricia_tree_init: subscription: failure");
if (NCSCC_RC_SUCCESS !=
ncs_patricia_tree_destroy(&gl_mds_mcm_cb->svc_list)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_destroy: service :failure,
L mds_mcm_init");
+ "MCM:API: patricia_tree_destroy: service :failure");
}
if (NCSCC_RC_SUCCESS !=
ncs_patricia_tree_destroy(&gl_mds_mcm_cb->vdest_list)) {
m_MDS_LOG_ERR(
- "MCM:API: patricia_tree_destroy: vdest :failure, L
mds_mcm_init");
+ "MCM:API: patricia_tree_destroy: vdest :failure");
+ }
+ if (NCSCC_RC_SUCCESS !=
+ ncs_patricia_tree_destroy(&gl_mds_mcm_cb->adest_list)) {
+ m_MDS_LOG_ERR(
+ "MCM:API: patricia_tree_destroy: adest :failure");
}
return NCSCC_RC_FAILURE;
}
@@ -5036,6 +5141,9 @@ uint32_t mds_mcm_destroy(void)
/* VDEST TREE */
ncs_patricia_tree_destroy(&gl_mds_mcm_cb->vdest_list);
+ /* ADEST TREE */
+ ncs_patricia_tree_destroy(&gl_mds_mcm_cb->adest_list);
+
/* Free MCM control block */
m_MMGR_FREE_MCM_CB(gl_mds_mcm_cb);
diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c
index 7850ac714..d8ace1247 100644
--- a/src/mds/mds_c_sndrcv.c
+++ b/src/mds/mds_c_sndrcv.c
@@ -339,7 +339,7 @@ static uint32_t
mds_subtn_tbl_add_disc_queue(MDS_SUBSCRIPTION_INFO *sub_info,
MDS_VDEST_ID dest_vdest_id,
MDS_DEST dest, MDS_HDL env_hdl,
MDS_SVC_ID fr_svc_id,
- bool time_wait);
+ int64_t time_wait);
static uint32_t mcm_pvt_red_snd_process_common(
MDS_HDL env_hdl, MDS_SVC_ID fr_svc_id, SEND_MSG msg, MDS_DEST to_dest,
@@ -1908,7 +1908,7 @@ mds_mcm_process_disc_queue_checks(MDS_SVC_INFO *svc_cb,
MDS_SVC_ID dest_svc_id,
V_DEST_QA anchor;
uint32_t disc_rc;
MDS_HDL env_hdl;
- bool time_wait = false;
+ int64_t time_wait = 0;
MDS_SUBSCRIPTION_RESULTS_INFO *t_send_hdl =
NULL; /* Subscription Result */
@@ -1950,7 +1950,7 @@ mds_mcm_process_disc_queue_checks(MDS_SVC_INFO *svc_cb,
MDS_SVC_ID dest_svc_id,
} else if (sub_info->tmr_flag != true) {
if ((MDS_SENDTYPE_RSP == req->i_sendtype) ||
(MDS_SENDTYPE_RRSP == req->i_sendtype)) {
- time_wait = true;
+ time_wait = MDS_SVC_UP_WAIT_LONG_TIME;
m_MDS_LOG_INFO(
"MDS_SND_RCV:Disc queue: Subscr exists no timer
running: Waiting for some time\n");
} else {
@@ -2070,15 +2070,10 @@ static uint32_t
mds_subtn_tbl_add_disc_queue(MDS_SUBSCRIPTION_INFO *sub_info,
MDS_VDEST_ID dest_vdest_id,
MDS_DEST dest, MDS_HDL env_hdl,
MDS_SVC_ID fr_svc_id,
- bool time_wait)
+ int64_t time_wait)
{
MDS_AWAIT_DISC_QUEUE *add_ptr = NULL, *mov_ptr = NULL;
uint32_t rc = NCSCC_RC_SUCCESS, status = 0;
- int64_t timeout_val = 0;
-
- if (true == time_wait) {
- timeout_val = 150; /* This may need a tuning */
- }
mov_ptr = sub_info->await_disc_queue;
add_ptr = m_MMGR_ALLOC_DISC_QUEUE;
@@ -2123,7 +2118,7 @@ static uint32_t
mds_subtn_tbl_add_disc_queue(MDS_SUBSCRIPTION_INFO *sub_info,
case MDS_SENDTYPE_RBCAST: {
m_MDS_LOG_INFO("MDS_SND_RCV: Waiting for timeout\n");
if (NCSCC_RC_SUCCESS !=
- mds_mcm_time_wait(&add_ptr->sel_obj, timeout_val)) {
+ mds_mcm_time_wait(&add_ptr->sel_obj, time_wait)) {
m_MDS_LOG_ERR(
"MDS_SND_RCV: timeout or error occured\n");
rc = NCSCC_RC_REQ_TIMOUT;
@@ -2689,7 +2684,7 @@ static uint32_t
mds_mcm_process_disc_queue_checks_redundant(
MDS_SUBSCRIPTION_INFO *sub_info = NULL;
MDS_SUBSCRIPTION_RESULTS_INFO *log_subtn_result_info = NULL;
uint32_t disc_rc;
- bool time_wait = false;
+ int64_t time_wait = 0;
MDS_HDL env_hdl;
@@ -2716,9 +2711,23 @@ static uint32_t
mds_mcm_process_disc_queue_checks_redundant(
} else if (sub_info->tmr_flag != true) {
if ((MDS_SENDTYPE_RSP == req->i_sendtype) ||
(MDS_SENDTYPE_RRSP == req->i_sendtype)) {
- time_wait = true;
- m_MDS_LOG_INFO(
- "MDS_SND_RCV:Disc queue red: Subscr exists no timer
running: Waiting for some time\n");
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&anchor);
+ if (adest_info && adest_info->svc_cnt == 0) {
+ m_MDS_LOG_NOTIFY(
+ "MDS_SND_RCV: Adest <0x%08x, %u> may down,"
+ " wait for some time for sure",
+ m_MDS_GET_NODE_ID_FROM_ADEST(anchor),
+ m_MDS_GET_PROCESS_ID_FROM_ADEST(anchor));
+ time_wait = MDS_SVC_UP_WAIT_SHORT_TIME;
+ } else {
+ time_wait = MDS_SVC_UP_WAIT_LONG_TIME;
+ m_MDS_LOG_INFO(
+ "MDS_SND_RCV:Disc queue red: Subscr exists"
+ " no timer running: Waiting for some time");
+ }
} else {
m_MDS_LOG_INFO(
"MDS_SND_RCV: Subscription exists but Timer has
expired\n");
@@ -5024,6 +5033,7 @@ static uint32_t
mds_mcm_process_recv_snd_msg_common(MDS_SVC_INFO *svccb,
mds_mcm_free_msg_memory(recv->msg);
return NCSCC_RC_FAILURE;
}
+
cbinfo.info.receive.pid = recv->pid;
cbinfo.info.receive.uid = recv->uid;
cbinfo.info.receive.gid = recv->gid;
diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h
index c09b428ba..91d3675a1 100644
--- a/src/mds/mds_core.h
+++ b/src/mds/mds_core.h
@@ -204,12 +204,12 @@ typedef struct mds_subscription_info {
#define m_GET_HDL_FROM_MDS_SVC_INFO(info) \
((info->svc-id)<<32 || \
(info->parent_pwe->pwe_id)<<16 || \
- (info->parent_pwe->parent_vdest->vdest-id)))
+ (info->parent_pwe->parent_vdest->vdest-id))
#define m_GET_HDL_FROM_MDS_SVC_PWE_VDEST(s, p, v) \
((s)<<32 || \
(p)<<16 || \
- (v)))
+ (v))
/**************************************\
MDS PWE related declarations
@@ -251,6 +251,16 @@ typedef struct mds_vdest_info {
} MDS_VDEST_INFO;
+typedef struct mds_adest_info {
+ /* Indexing info */
+ NCS_PATRICIA_NODE node;
+ /* Adest info */
+ MDS_DEST adest; /* Key for Patricia node */
+ uint16_t svc_cnt; /* Adest SVC counter */
+ MDS_TMR_REQ_INFO *tmr_req_info;
+ uint32_t tmr_hdl;
+} MDS_ADEST_INFO;
+
typedef struct mds_svc_info {
/* Indexing info */
NCS_PATRICIA_NODE svc_list_node;
@@ -301,12 +311,18 @@ typedef struct mds_mcm_cb {
NCS_PATRICIA_TREE subtn_results;
NCS_PATRICIA_TREE svc_list; /* Tree of MDS_SVC_INFO information */
NCS_PATRICIA_TREE vdest_list; /* Tree of MDS_VDEST_INFO information */
+ NCS_PATRICIA_TREE adest_list; /* Tree of MDS_ADEST_INFO information */
} MDS_MCM_CB;
/* Global MDSCB */
extern MDS_MCM_CB *gl_mds_mcm_cb;
+/* Time wait for SVC UP */
+extern uint32_t MDS_SVC_UP_WAIT_LONG_TIME;
+extern uint32_t MDS_SVC_UP_WAIT_SHORT_TIME;
+
/* Global TMR Values */
+extern uint32_t MDS_DOWN_TMR_VAL;
extern uint32_t MDS_QUIESCED_TMR_VAL;
extern uint32_t MDS_AWAIT_ACTIVE_TMR_VAL;
extern uint32_t MDS_SUBSCRIPTION_TMR_VAL;
@@ -681,6 +697,15 @@ uint32_t (*mds_mdtm_node_unsubscribe)(MDS_SUBTN_REF_VAL
subtn_ref_val);
m_NCS_MEM_FREE(p, NCS_MEM_REGION_TRANSIENT, NCS_SERVICE_ID_MDS, \
MDS_MEM_VDEST_INFO)
+#define m_MMGR_ALLOC_ADEST_INFO \
+ (MDS_ADEST_INFO *)m_NCS_MEM_ALLOC(sizeof(MDS_ADEST_INFO), \
+ NCS_MEM_REGION_TRANSIENT, \
+ NCS_SERVICE_ID_MDS, MDS_MEM_ADEST_INFO)
+
+#define m_MMGR_FREE_ADEST_INFO(p) \
+ m_NCS_MEM_FREE(p, NCS_MEM_REGION_TRANSIENT, NCS_SERVICE_ID_MDS, \
+ MDS_MEM_ADEST_INFO)
+
#define m_MMGR_ALLOC_PWE_INFO \
(MDS_PWE_INFO *)m_NCS_MEM_ALLOC(sizeof(MDS_PWE_INFO), \
NCS_MEM_REGION_TRANSIENT, \
@@ -768,7 +793,6 @@ typedef struct mds_mcm_msg_elem {
NCSMDS_CALLBACK_INFO cbinfo;
} event;
} info;
-
} MDS_MCM_MSG_ELEM;
/* ******************************************** */
diff --git a/src/mds/mds_dt2c.h b/src/mds/mds_dt2c.h
index c92fecbba..49c9b09c4 100644
--- a/src/mds/mds_dt2c.h
+++ b/src/mds/mds_dt2c.h
@@ -223,7 +223,7 @@ typedef enum {
MDS_MEM_DIRECT_BUFF,
MDS_MEM_AWAIT_ACTIVE,
MDS_MEM_MSGELEM,
- MDS_MEM_ADEST_LIST,
+ MDS_MEM_ADEST_INFO,
MDS_MEM_REASSEM_QUEUE,
MDS_MEM_HDL_LIST,
MDS_MEM_CACHED_EVENTS_LIST,
diff --git a/src/mds/mds_dt_common.c b/src/mds/mds_dt_common.c
index de1388367..7bc77219e 100644
--- a/src/mds/mds_dt_common.c
+++ b/src/mds/mds_dt_common.c
@@ -998,6 +998,26 @@ uint32_t mds_tmr_mailbox_processing(void)
info->mds_dest, info->pid);
(void)mds_process_info_del(info);
free(info);
+ } else {
+ MDS_DEST adest =
+ tmr_req_info->info
+ .down_event_tmr_info.adest;
+ m_MDS_LOG_INFO(
+ "TIMEOUT Adest <0x%08x, %u> down",
+ m_MDS_GET_NODE_ID_FROM_ADEST(adest),
+ m_MDS_GET_PROCESS_ID_FROM_ADEST(
+ adest));
+ MDS_ADEST_INFO *adest_info =
+ (MDS_ADEST_INFO *)
+ ncs_patricia_tree_get(
+ &gl_mds_mcm_cb->adest_list,
+ (uint8_t *)&adest);
+ if (adest_info &&
+ adest_info->svc_cnt == 0)
+ ncs_patricia_tree_del(
+ &gl_mds_mcm_cb->adest_list,
+ (NCS_PATRICIA_NODE *)
+ adest_info);
}
if (tmr_req_info->info.down_event_tmr_info
@@ -1700,7 +1720,7 @@ uint16_t mds_checksum(uint32_t length, uint8_t buff[])
/* Take the one's complement of sum */
sum = ~sum;
- return ((uint16_t)sum);
+ return (uint16_t)sum;
}
/****************************************************************************
diff --git a/src/mds/mds_main.c b/src/mds/mds_main.c
index c7d2f7b76..0bcb2f996 100644
--- a/src/mds/mds_main.c
+++ b/src/mds/mds_main.c
@@ -110,6 +110,10 @@ static void mds_mutex_init_once(void)
/* global Log level variable */
uint32_t gl_mds_checksum = 0;
+/* Time value in centiseconds */
+uint32_t MDS_SVC_UP_WAIT_LONG_TIME = 150;
+uint32_t MDS_SVC_UP_WAIT_SHORT_TIME = 1;
+uint32_t MDS_DOWN_TMR_VAL = 1000;
uint32_t MDS_QUIESCED_TMR_VAL = 80;
uint32_t MDS_AWAIT_ACTIVE_TMR_VAL = 18000;
uint32_t MDS_SUBSCRIPTION_TMR_VAL = 500;
--
2.17.1
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel