|
|
@@ -143,6 +143,9 @@ struct rrp_algo {
|
|
|
const void *msg,
|
|
|
unsigned int msg_len);
|
|
|
|
|
|
+ void (*recv_flush) (
|
|
|
+ struct totemrrp_instance *instance);
|
|
|
+
|
|
|
void (*send_flush) (
|
|
|
struct totemrrp_instance *instance);
|
|
|
|
|
|
@@ -280,6 +283,9 @@ static void none_token_send (
|
|
|
const void *msg,
|
|
|
unsigned int msg_len);
|
|
|
|
|
|
+static void none_recv_flush (
|
|
|
+ struct totemrrp_instance *instance);
|
|
|
+
|
|
|
static void none_send_flush (
|
|
|
struct totemrrp_instance *instance);
|
|
|
|
|
|
@@ -353,6 +359,9 @@ static void passive_token_send (
|
|
|
const void *msg,
|
|
|
unsigned int msg_len);
|
|
|
|
|
|
+static void passive_recv_flush (
|
|
|
+ struct totemrrp_instance *instance);
|
|
|
+
|
|
|
static void passive_send_flush (
|
|
|
struct totemrrp_instance *instance);
|
|
|
|
|
|
@@ -421,6 +430,9 @@ static void active_token_send (
|
|
|
const void *msg,
|
|
|
unsigned int msg_len);
|
|
|
|
|
|
+static void active_recv_flush (
|
|
|
+ struct totemrrp_instance *instance);
|
|
|
+
|
|
|
static void active_send_flush (
|
|
|
struct totemrrp_instance *instance);
|
|
|
|
|
|
@@ -519,6 +531,7 @@ struct rrp_algo none_algo = {
|
|
|
.mcast_flush_send = none_mcast_flush_send,
|
|
|
.token_recv = none_token_recv,
|
|
|
.token_send = none_token_send,
|
|
|
+ .recv_flush = none_recv_flush,
|
|
|
.send_flush = none_send_flush,
|
|
|
.iface_check = none_iface_check,
|
|
|
.processor_count_set = none_processor_count_set,
|
|
|
@@ -537,6 +550,7 @@ struct rrp_algo passive_algo = {
|
|
|
.mcast_flush_send = passive_mcast_flush_send,
|
|
|
.token_recv = passive_token_recv,
|
|
|
.token_send = passive_token_send,
|
|
|
+ .recv_flush = passive_recv_flush,
|
|
|
.send_flush = passive_send_flush,
|
|
|
.iface_check = passive_iface_check,
|
|
|
.processor_count_set = passive_processor_count_set,
|
|
|
@@ -555,6 +569,7 @@ struct rrp_algo active_algo = {
|
|
|
.mcast_flush_send = active_mcast_flush_send,
|
|
|
.token_recv = active_token_recv,
|
|
|
.token_send = active_token_send,
|
|
|
+ .recv_flush = active_recv_flush,
|
|
|
.send_flush = active_send_flush,
|
|
|
.iface_check = active_iface_check,
|
|
|
.processor_count_set = active_processor_count_set,
|
|
|
@@ -681,6 +696,11 @@ static void none_token_send (
|
|
|
msg, msg_len);
|
|
|
}
|
|
|
|
|
|
+static void none_recv_flush (struct totemrrp_instance *instance)
|
|
|
+{
|
|
|
+ totemnet_recv_flush (instance->net_handles[0]);
|
|
|
+}
|
|
|
+
|
|
|
static void none_send_flush (struct totemrrp_instance *instance)
|
|
|
{
|
|
|
totemnet_send_flush (instance->net_handles[0]);
|
|
|
@@ -1061,6 +1081,19 @@ static void passive_token_send (
|
|
|
|
|
|
}
|
|
|
|
|
|
+static void passive_recv_flush (struct totemrrp_instance *instance)
|
|
|
+{
|
|
|
+ struct passive_instance *rrp_algo_instance = (struct passive_instance *)instance->rrp_algo_instance;
|
|
|
+ unsigned int i;
|
|
|
+
|
|
|
+ for (i = 0; i < instance->interface_count; i++) {
|
|
|
+ if (rrp_algo_instance->faulty[i] == 0) {
|
|
|
+
|
|
|
+ totemnet_recv_flush (instance->net_handles[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static void passive_send_flush (struct totemrrp_instance *instance)
|
|
|
{
|
|
|
struct passive_instance *rrp_algo_instance = (struct passive_instance *)instance->rrp_algo_instance;
|
|
|
@@ -1461,6 +1494,19 @@ static void active_token_send (
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+static void active_recv_flush (struct totemrrp_instance *instance)
|
|
|
+{
|
|
|
+ struct active_instance *rrp_algo_instance = (struct active_instance *)instance->rrp_algo_instance;
|
|
|
+ unsigned int i;
|
|
|
+
|
|
|
+ for (i = 0; i < instance->interface_count; i++) {
|
|
|
+ if (rrp_algo_instance->faulty[i] == 0) {
|
|
|
+
|
|
|
+ totemnet_recv_flush (instance->net_handles[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
static void active_send_flush (struct totemrrp_instance *instance)
|
|
|
{
|
|
|
struct active_instance *rrp_algo_instance = (struct active_instance *)instance->rrp_algo_instance;
|
|
|
@@ -1880,6 +1926,14 @@ int totemrrp_token_target_set (
|
|
|
|
|
|
return (0);
|
|
|
}
|
|
|
+int totemrrp_recv_flush (void *rrp_context)
|
|
|
+{
|
|
|
+ struct totemrrp_instance *instance = (struct totemrrp_instance *)rrp_context;
|
|
|
+
|
|
|
+ instance->rrp_algo->recv_flush (instance);
|
|
|
+
|
|
|
+ return (0);
|
|
|
+}
|
|
|
|
|
|
int totemrrp_send_flush (void *rrp_context)
|
|
|
{
|