Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 930998 Details for
Bug 1069254
corosync RFE: limit udpu messages to ring members only
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
totemudpu: Implement member_set_active
tmp.8cx7NjR9At (text/plain), 4.65 KB, created by
Jan Friesse
on 2014-08-26 13:47:19 UTC
(
hide
)
Description:
totemudpu: Implement member_set_active
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2014-08-26 13:47:19 UTC
Size:
4.65 KB
patch
obsolete
>From 71f1b99649329ab06309791d0a621d3cfbb74bdb Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Thu, 14 Aug 2014 16:04:57 +0200 >Subject: [PATCH] totemudpu: Implement member_set_active > >Member active is used for sending "multicast" messages only to members >of ring. This reduces network load if some nodes are intentionally down. >Only regular multicast message load is reduced (messages sent by >totemudpu_mcast_noflush_send), because special messages (like hold >cancel, join message, ...) still have to be send to all members to >ensure correct behavior. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> >--- > exec/totemnet.c | 3 +- > exec/totemudpu.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++-- > exec/totemudpu.h | 5 ++++ > 3 files changed, 59 insertions(+), 4 deletions(-) > >diff --git a/exec/totemnet.c b/exec/totemnet.c >index 85e35ea..059ae77 100644 >--- a/exec/totemnet.c >+++ b/exec/totemnet.c >@@ -178,7 +178,8 @@ struct transport transport_entries[] = { > .crypto_set = totemudpu_crypto_set, > .recv_mcast_empty = totemudpu_recv_mcast_empty, > .member_add = totemudpu_member_add, >- .member_remove = totemudpu_member_remove >+ .member_remove = totemudpu_member_remove, >+ .member_set_active = totemudpu_member_set_active > }, > #ifdef HAVE_RDMA > { >diff --git a/exec/totemudpu.c b/exec/totemudpu.c >index f984920..ef4449f 100644 >--- a/exec/totemudpu.c >+++ b/exec/totemudpu.c >@@ -92,6 +92,7 @@ struct totemudpu_member { > struct list_head list; > struct totem_ip_address member; > int fd; >+ int active; > }; > > struct totemudpu_instance { >@@ -315,7 +316,8 @@ static inline void ucast_sendmsg ( > static inline void mcast_sendmsg ( > struct totemudpu_instance *instance, > const void *msg, >- unsigned int msg_len) >+ unsigned int msg_len, >+ int only_active) > { > struct msghdr msg_mcast; > int res = 0; >@@ -355,6 +357,9 @@ static inline void mcast_sendmsg ( > struct totemudpu_member, > list); > >+ if (only_active && !member->active) >+ continue ; >+ > totemip_totemip_to_sockaddr_convert(&member->member, > instance->totem_interface->ip_port, &sockaddr, &addrlen); > msg_mcast.msg_name = &sockaddr; >@@ -889,7 +894,7 @@ int totemudpu_mcast_flush_send ( > struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context; > int res = 0; > >- mcast_sendmsg (instance, msg, msg_len); >+ mcast_sendmsg (instance, msg, msg_len, 0); > > return (res); > } >@@ -902,7 +907,7 @@ int totemudpu_mcast_noflush_send ( > struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context; > int res = 0; > >- mcast_sendmsg (instance, msg, msg_len); >+ mcast_sendmsg (instance, msg, msg_len, 1); > > return (res); > } >@@ -1083,12 +1088,16 @@ int totemudpu_member_add ( > if (new_member == NULL) { > return (-1); > } >+ >+ memset(new_member, 0, sizeof(*new_member)); >+ > log_printf (LOGSYS_LEVEL_NOTICE, "adding new UDPU member {%s}", > totemip_print(member)); > list_init (&new_member->list); > list_add_tail (&new_member->list, &instance->member_list); > memcpy (&new_member->member, member, sizeof (struct totem_ip_address)); > new_member->fd = totemudpu_create_sending_socket(udpu_context, member); >+ new_member->active = 0; > > return (0); > } >@@ -1168,3 +1177,43 @@ int totemudpu_member_list_rebind_ip ( > > return (0); > } >+ >+int totemudpu_member_set_active ( >+ void *udpu_context, >+ const struct totem_ip_address *member_ip, >+ int active) >+{ >+ struct list_head *list; >+ struct totemudpu_member *member; >+ int addr_found = 0; >+ >+ struct totemudpu_instance *instance = (struct totemudpu_instance *)udpu_context; >+ >+ /* >+ * Find the member to set active flag >+ */ >+ for (list = instance->member_list.next; list != &instance->member_list; list = list->next) { >+ member = list_entry (list, struct totemudpu_member, list); >+ >+ if (totemip_compare (member_ip, &member->member) == 0) { >+ log_printf(LOGSYS_LEVEL_DEBUG, >+ "Marking UDPU member %s %s", >+ totemip_print(&member->member), >+ (active ? "active" : "inactive")); >+ >+ member->active = active; >+ addr_found = 1; >+ >+ break; >+ } >+ } >+ >+ if (!addr_found) { >+ log_printf(LOGSYS_LEVEL_DEBUG, >+ "Can't find UDPU member %s (should be marked as %s)", >+ totemip_print(member_ip), >+ (active ? "active" : "inactive")); >+ } >+ >+ return (0); >+} >diff --git a/exec/totemudpu.h b/exec/totemudpu.h >index 7e80ed7..51cd323 100644 >--- a/exec/totemudpu.h >+++ b/exec/totemudpu.h >@@ -123,4 +123,9 @@ extern int totemudpu_member_remove ( > void *udpu_context, > const struct totem_ip_address *member); > >+extern int totemudpu_member_set_active ( >+ void *udpu_context, >+ const struct totem_ip_address *member_ip, >+ int active); >+ > #endif /* TOTEMUDPU_H_DEFINED */ >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1069254
:
930986
|
930987
|
930989
| 930998 |
931001