|
@@ -89,8 +89,8 @@ bool route_init()
|
|
|
|
|
|
// Which will be at most this many from us
|
|
// Which will be at most this many from us
|
|
uint32_t max_msg_to_each_stg;
|
|
uint32_t max_msg_to_each_stg;
|
|
- max_msg_to_each_stg = CEILDIV(tot_msg_per_stg, g_teems_config.tot_weight) *
|
|
|
|
- g_teems_config.my_weight;
|
|
|
|
|
|
+ max_msg_to_each_stg = (tot_msg_per_stg/g_teems_config.tot_weight
|
|
|
|
+ + g_teems_config.tot_weight) * g_teems_config.my_weight;
|
|
|
|
|
|
// But we can't send more messages to each storage server than we
|
|
// But we can't send more messages to each storage server than we
|
|
// could receive in total
|
|
// could receive in total
|
|
@@ -111,7 +111,8 @@ bool route_init()
|
|
|
|
|
|
// The max number of messages that can arrive at a storage server
|
|
// The max number of messages that can arrive at a storage server
|
|
uint32_t max_stg_msgs;
|
|
uint32_t max_stg_msgs;
|
|
- max_stg_msgs = tot_msg_per_stg + g_teems_config.tot_weight;
|
|
|
|
|
|
+ max_stg_msgs = (tot_msg_per_stg/g_teems_config.tot_weight
|
|
|
|
+ + g_teems_config.tot_weight) * g_teems_config.tot_weight;
|
|
|
|
|
|
// Calculating public-routing buffer sizes
|
|
// Calculating public-routing buffer sizes
|
|
// Weights are not used in public routing
|
|
// Weights are not used in public routing
|