Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[19263] User configuration for SHM metatraffic #535

Merged
merged 6 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,17 @@ void dds_domain_examples()
"true");
//!--
}

{
// DDS-SHM-ENFORCE-META-TRAFFIC
EduPonz marked this conversation as resolved.
Show resolved Hide resolved
DomainParticipantQos participant_qos;

// SHM transport will listen for unicast meta-traffic
participant_qos.properties().properties().emplace_back(
"fastdds.shm.enforce_metatraffic",
"unicast");
//!--
}
}

//DOMAINPARTICIPANTLISTENER-DISCOVERY-CALLBACKS
Expand Down
15 changes: 15 additions & 0 deletions code/XMLTester.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,21 @@
</participant>
<!--><-->

<!-->XML-SHM-ENFORCE-META-TRAFFIC<-->
<participant profile_name="participant_xml_conf_shm_enforce_metatraffic_profile">
<rtps>
<propertiesPolicy>
<properties>
<property>
<name>fastdds.shm.enforce_metatraffic</name>
<value>unicast</value>
</property>
</properties>
</propertiesPolicy>
</rtps>
</participant>
<!--><-->

<!-->XML_TYPELOOKUP_SERVICE_ENABLING<-->
<participant profile_name="participant_typelookup_service_enabled">
<rtps>
Expand Down
54 changes: 54 additions & 0 deletions docs/fastdds/property_policies/non_consolidated_qos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,57 @@ Currently there are two different exchange formats which can be selected using t
:language: xml
:start-after: <!-->XML-STATIC-DISCOVERY-FORMAT
:end-before: <!--><-->

.. _property_policies_shm_enforce_metatraffic:

SHM transport meta-traffic enforcement
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A DomainParticipant will by default configure both a :ref:`transport_udp_udp` and a
:ref:`transport_sharedMemory_sharedMemory`.
When a participant on another process in the same host is discovered, the endpoint discovery
might be done using either transport.

Avoiding Shared Memory communication for discovery traffic can save valuable resources.
The behavior regarding this can be configured using the property ``fastdds.shm.enforce_metatraffic``.

.. list-table::
:header-rows: 1
:align: left

* - PropertyPolicyQos value
- Description
- Default
* - ``"none"``
- Use other transports for meta-traffic.
- ✅
* - ``"unicast"``
- Enable SHM transport unicast communications.
-
* - ``"all"``
- Enable SHM transport unicast and multicast communications. |br|
This will enable discovery between SHM only participants |br|
and participants having several transports.
-

.. note::

When SHM is the only transport configured for a participant, the setting of this property is ignored,
and considered to be ``"all"``.

.. tabs::

.. tab:: C++

.. literalinclude:: /../code/DDSCodeTester.cpp
:language: c++
:start-after: //DDS-SHM-ENFORCE-META-TRAFFIC
:end-before: //!--
:dedent: 8

.. tab:: XML

.. literalinclude:: /../code/XMLTester.xml
:language: xml
:start-after: <!-->XML-SHM-ENFORCE-META-TRAFFIC
:end-before: <!--><-->
1 change: 1 addition & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ seqNum
SequenceNumber
sequencenumbers
shm
SHM
simpleEDP
sqlite
statechart
Expand Down