TSG-1198:自检项目,kni调整自检策略的分流规则,使得自检报文可以确定通过各计算板
This commit is contained in:
@@ -407,3 +407,21 @@ int tfe_mgr_alive_node_get(struct tfe_mgr *mgr, int thread_seq){
|
||||
return tfe_id;
|
||||
}
|
||||
|
||||
int tfe_mgr_alive_node_RR_get(struct tfe_mgr *mgr,int *last_tfe_id_index){
|
||||
int tfe_id = -1;
|
||||
if(mgr->watch_dog_switch == 0){
|
||||
if(mgr->tfe_enabled_node_count > 0){
|
||||
int i = (*last_tfe_id_index + 1) % mgr->tfe_enabled_node_count;
|
||||
*last_tfe_id_index = i;
|
||||
tfe_id = mgr->tfe_enabled_nodes[i].tfe_id;
|
||||
}
|
||||
return tfe_id;
|
||||
}
|
||||
pthread_rwlock_rdlock(&(mgr->rwlock));
|
||||
if(mgr->tfe_alive_node_count > 0){
|
||||
int i = (*last_tfe_id_index + 1) % mgr->tfe_alive_node_count;
|
||||
*last_tfe_id_index = i;
|
||||
tfe_id = mgr->tfe_alive_nodes[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user