History

tipc: make replicast a user selectable option

If the bearer carrying multicast messages supports broadcast, those messages will be sent to all cluster nodes, irrespective of whether these nodes host any actual destinations socket or not. This is clearly wasteful if the cluster is large and there are only a few real destinations for the message being sent. In this commit we extend the eligibility of the newly introduced "replicast" transmit option. We now make it possible for a user to select which method he wants to be used, either as a mandatory setting via setsockopt(), or as a relative setting where we let the broadcast layer decide which method to use based on the ratio between cluster size and the message's actual number of destination nodes. In the latter case, a sending socket must stick to a previously selected method until it enters an idle period of at least 5 seconds. This eliminates the risk of message reordering caused by method change, i.e., when changes to cluster size or number of destinations would otherwise mandate a new method to be used.

Jon Paul Maloy committed 9 years ago

Commit 01fd12b1 parent a853e4c6 files · +112 −17Browse files

Showing the changes to include/uapi/linux (1 of 6 files). Show all

Unified · Split

include/uapi/linux/tipc.h+4−2
@@ -1,7 +1,7 @@
1/*1/*
2 * include/uapi/linux/tipc.h: Header for TIPC socket interface2 * include/uapi/linux/tipc.h: Header for TIPC socket interface
3 *3 *
4 * Copyright (c) 2003-2006, Ericsson AB4 * Copyright (c) 2003-2006, 2015-2016 Ericsson AB
5 * Copyright (c) 2005, 2010-2011, Wind River Systems5 * Copyright (c) 2005, 2010-2011, Wind River Systems
6 * All rights reserved.6 * All rights reserved.
7 *7 *
@@ -220,7 +220,7 @@ struct sockaddr_tipc { · 212 unmodified lines
220#define TIPC_DESTNAME 3 /* destination name */220#define TIPC_DESTNAME 3 /* destination name */
221 221
222/*222/*
223 * TIPC-specific socket option values223 * TIPC-specific socket option names
224 */224 */
225 225
226#define TIPC_IMPORTANCE 127 /* Default: TIPC_LOW_IMPORTANCE */226#define TIPC_IMPORTANCE 127 /* Default: TIPC_LOW_IMPORTANCE */
@@ -229,6 +229,8 @@ struct sockaddr_tipc { · 2 unmodified lines
229#define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */229#define TIPC_CONN_TIMEOUT 130 /* Default: 8000 (ms) */
230#define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */230#define TIPC_NODE_RECVQ_DEPTH 131 /* Default: none (read only) */
231#define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */231#define TIPC_SOCK_RECVQ_DEPTH 132 /* Default: none (read only) */
232#define TIPC_MCAST_BROADCAST 133 /* Default: TIPC selects. No arg */
233#define TIPC_MCAST_REPLICAST 134 /* Default: TIPC selects. No arg */
232 234
233/*235/*
234 * Maximum sizes of TIPC bearer-related names (including terminating NULL)236 * Maximum sizes of TIPC bearer-related names (including terminating NULL)