On Wed, Nov 24, 2010 at 11:23:05AM -0700, Steven Dake wrote: > 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.
ACK & reviewd. -Angus > > Signed-off-by: Steven Dake <sd...@redhat.com> > --- > exec/totemudpu.c | 35 ++--------------------------------- > 1 files changed, 2 insertions(+), 33 deletions(-) > > diff --git a/exec/totemudpu.c b/exec/totemudpu.c > index 1a26099..3a566b1 100644 > --- a/exec/totemudpu.c > +++ b/exec/totemudpu.c > @@ -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 > @@ -1530,25 +1516,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); > } > > @@ -1670,7 +1639,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; > -- > 1.7.2.3 > > _______________________________________________ > Openais mailing list > Openais@lists.linux-foundation.org > https://lists.linux-foundation.org/mailman/listinfo/openais _______________________________________________ Openais mailing list Openais@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/openais