remove Internal/SuppressSPDPMulticast setting

The Internal/SuppressSPDPMulticast setting was one of several ways to
prevent the sending of participant discovery multicast messages while
still allowing multicast to be used for data communications.  That
functionality has long since been subsumed by the AllowMulticast setting
(AllowMulticast = spdp,amc & Internal/SuppressSPDPMulticast is
equivalent to AllowMulticast = amc).

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-05-04 13:50:02 +08:00 committed by eboasson
parent b5251d0390
commit 6bf13fbaa5
4 changed files with 5 additions and 20 deletions

View file

@ -331,7 +331,6 @@ struct config
enum besmode besmode;
int conservative_builtin_reader_startup;
int meas_hb_to_ack_latency;
int suppress_spdp_multicast;
int unicast_response_to_spdp_messages;
int synchronous_delivery_priority_threshold;
int64_t synchronous_delivery_latency_bound;

View file

@ -245,7 +245,7 @@ static const struct cfgelem general_cfgelems[] = {
<p>It is a comma-separated list of some of the following keywords: \"spdp\", \"asm\", \"ssm\", or either of \"false\" or \"true\".</p>\n\
<ul>\n\
<li><i>spdp</i>: enables the use of ASM (any-source multicast) for participant discovery, joining the multicast group on the discovery socket, transmitting SPDP messages to this group, but never advertising nor using any multicast address in any discovery message, thus forcing unicast communications for all endpoint discovery and user data.</li>\n\
<li><i>asm</i>: enables the use of ASM for all traffic (including SPDP)</li>\n\
<li><i>asm</i>: enables the use of ASM for all traffic, including receiving SPDP but not transmitting SPDP messages via multicast</li>\n\
<li><i>ssm</i>: enables the use of SSM (source-specific multicast) for all non-SPDP traffic (if supported)</li>\n\
</ul>\n\
<p>When set to \"false\" all multicasting is disabled. The default, \"true\" enables full use of multicasts. Listening for multicasts can be controlled by General/MulticastRecvNetworkInterfaceAddresses.</p>") },
@ -531,9 +531,6 @@ static const struct cfgelem unsupp_cfgelems[] = {
<p>Should it be necessary to hide DDSI2E's shared discovery behaviour, set this to <i>true</i> and Internal/BuiltinEndpointSet to <i>full</i>.</p>") },
{ LEAF("MeasureHbToAckLatency"), 1, "false", ABSOFF(meas_hb_to_ack_latency), 0, uf_boolean, 0, pf_boolean,
BLURB("<p>This element enables heartbeat-to-ack latency among DDSI2E services by prepending timestamps to Heartbeat and AckNack messages and calculating round trip times. This is non-standard behaviour. The measured latencies are quite noisy and are currently not used anywhere.</p>") },
{ LEAF("SuppressSPDPMulticast"), 1, "false", ABSOFF(suppress_spdp_multicast), 0, uf_boolean, 0, pf_boolean,
BLURB("<p>The element controls whether the mandatory multicasting of the participant discovery packets occurs. Completely disabling multicasting requires this element be set to <i>true</i>, and generally requires explicitly listing peers to ping for unicast discovery.</p>\n\
<p>See also General/AllowMulticast.</p>") },
{ LEAF("UnicastResponseToSPDPMessages"), 1, "true", ABSOFF(unicast_response_to_spdp_messages), 0, uf_boolean, 0, pf_boolean,
BLURB("<p>This element controls whether the response to a newly discovered participant is sent as a unicasted SPDP packet, instead of rescheduling the periodic multicasted one. There is no known benefit to setting this to <i>false</i>.</p>") },
{ LEAF("SynchronousDeliveryPriorityThreshold"), 1, "0", ABSOFF(synchronous_delivery_priority_threshold), 0, uf_int, 0, pf_int,

View file

@ -160,7 +160,7 @@ static int get_locator (nn_locator_t *loc, const nn_locators_t *locs, int uc_sam
static void maybe_add_pp_as_meta_to_as_disc (const struct addrset *as_meta)
{
if (addrset_empty_mc (as_meta))
if (addrset_empty_mc (as_meta) || !(config.allowMulticast & AMC_SPDP))
{
nn_locator_t loc;
if (addrset_any_uc (as_meta, &loc))

View file

@ -313,11 +313,6 @@ static int set_spdp_address (void)
return -1;
}
#endif
if (!(config.allowMulticast & AMC_SPDP) || config.suppress_spdp_multicast)
{
/* Explicitly disabling SPDP multicasting is always possible */
set_unspec_locator (&gv.loc_spdp_mc);
}
return 0;
}
@ -331,11 +326,6 @@ static int set_default_mc_address (void)
return rc;
else if (rc == 0)
gv.loc_default_mc = gv.loc_spdp_mc;
if (!(config.allowMulticast & ~AMC_SPDP))
{
/* no multicasting beyond SPDP */
set_unspec_locator (&gv.loc_default_mc);
}
gv.loc_meta_mc = gv.loc_default_mc;
return 0;
}
@ -791,7 +781,7 @@ static int setup_and_start_recv_threads (void)
gv.recv_threads[0].arg.mode = RTM_MANY;
if (gv.m_factory->m_connless && config.many_sockets_mode != MSM_NO_UNICAST && config.multiple_recv_threads)
{
if (ddsi_is_mcaddr (&gv.loc_default_mc) && !ddsi_is_ssm_mcaddr (&gv.loc_default_mc))
if (ddsi_is_mcaddr (&gv.loc_default_mc) && !ddsi_is_ssm_mcaddr (&gv.loc_default_mc) && (config.allowMulticast & AMC_ASM))
{
/* Multicast enabled, but it isn't an SSM address => handle data multicasts on a separate thread (the trouble with SSM addresses is that we only join matching writers, which our own sockets typically would not be) */
gv.recv_threads[gv.n_recv_threads].name = "recvMC";
@ -911,7 +901,6 @@ int rtps_init (void)
config.publish_uc_locators = (config.tcp_port != -1);
config.enable_uc_locators = 1;
/* TCP affects what features are supported/required */
config.suppress_spdp_multicast = 1;
config.many_sockets_mode = MSM_SINGLE_UNICAST;
config.allowMulticast = AMC_FALSE;
if (ddsi_tcp_init () < 0)
@ -940,7 +929,6 @@ int rtps_init (void)
if (!gv.interfaces[gv.selected_interface].mc_capable)
{
DDS_WARNING("selected interface is not multicast-capable: disabling multicast\n");
config.suppress_spdp_multicast = 1;
config.allowMulticast = AMC_FALSE;
/* ensure discovery can work: firstly, that the process will be reachable on a "well-known" port
number, and secondly, that the local interface's IP address gets added to the discovery
@ -1234,7 +1222,8 @@ int rtps_init (void)
);
gv.as_disc = new_addrset ();
add_to_addrset (gv.as_disc, &gv.loc_spdp_mc);
if (config.allowMulticast & AMC_SPDP)
add_to_addrset (gv.as_disc, &gv.loc_spdp_mc);
/* If multicast was enabled but not available, always add the local interface to the discovery address set.
Conversion via string and add_peer_addresses has the benefit that the port number expansion happens
automatically. */