The flushing code was introducing data corruption because of recursion errors

that occur as a result of the design of udpu.  Totem no longer requires
the flushing technique because we don't mark a packet as missing until it has
not been seen by a certain number of token rotations per a previous patch.  This
mechanism was introduced to work around a problem in switches where multicast
messages may be delayed by long periods compared to the unicast token.

This patch removes the flushing logic from udpu since it is no longer necessary.

Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Steven Dake 2010-11-28 01:45:08 -07:00
parent 2c46de5ac1
commit 00e340d095

View File

@ -162,12 +162,8 @@ struct totemudpu_instance {
char iov_buffer[FRAME_SIZE_MAX];
char iov_buffer_flush[FRAME_SIZE_MAX];
struct iovec totemudpu_iov_recv;
struct iovec totemudpu_iov_recv_flush;
struct list_head member_list;
int stats_sent;
@ -190,8 +186,6 @@ struct totemudpu_instance {
unsigned int my_memb_entries;
int flushing;
struct totem_config *totem_config;
struct totem_ip_address token_target;
@ -221,9 +215,6 @@ static void totemudpu_instance_initialize (struct totemudpu_instance *instance)
instance->totemudpu_iov_recv.iov_base = instance->iov_buffer;
instance->totemudpu_iov_recv.iov_len = FRAME_SIZE_MAX; //sizeof (instance->iov_buffer);
instance->totemudpu_iov_recv_flush.iov_base = instance->iov_buffer_flush;
instance->totemudpu_iov_recv_flush.iov_len = FRAME_SIZE_MAX; //sizeof (instance->iov_buffer);
/*
* There is always atleast 1 processor
@ -243,7 +234,6 @@ do { \
(const char *)format, ##args); \
} while (0);
static int authenticate_and_decrypt_sober (
struct totemudpu_instance *instance,
struct iovec *iov,
@ -1083,11 +1073,7 @@ static int net_deliver_fn (
unsigned char *msg_offset;
unsigned int size_delv;
if (instance->flushing == 1) {
iovec = &instance->totemudpu_iov_recv_flush;
} else {
iovec = &instance->totemudpu_iov_recv;
}
iovec = &instance->totemudpu_iov_recv;
/*
* Receive datagram
@ -1518,25 +1504,8 @@ int totemudpu_processor_count_set (
int totemudpu_recv_flush (void *udpu_context)
{
struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context;
struct pollfd ufd;
int nfds;
int res = 0;
instance->flushing = 1;
do {
ufd.fd = instance->token_socket;
ufd.events = POLLIN;
nfds = poll (&ufd, 1, 0);
if (nfds == 1 && ufd.revents & POLLIN) {
net_deliver_fn (0, instance->token_socket,
ufd.revents, instance);
}
} while (nfds == 1);
instance->flushing = 0;
return (res);
}
@ -1658,7 +1627,7 @@ extern int totemudpu_recv_mcast_empty (
*/
msg_recv.msg_name = &system_from;
msg_recv.msg_namelen = sizeof (struct sockaddr_storage);
msg_recv.msg_iov = &instance->totemudpu_iov_recv_flush;
msg_recv.msg_iov = &instance->totemudpu_iov_recv;
msg_recv.msg_iovlen = 1;
#if !defined(COROSYNC_SOLARIS)
msg_recv.msg_control = 0;