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

[20438] LARGE_DATA Participants logic with same listening ports #4396

Merged
merged 8 commits into from
Feb 22, 2024

Conversation

cferreiragonz
Copy link
Contributor

@cferreiragonz cferreiragonz commented Feb 19, 2024

Description

This feature adds support for the unlikely case in which two participants configured with the LARGE_DATA builtin transports obtain randomly the same listening port. This case can only occur if the participants are located in different hosts and, thus, each of them has a different IP address.
Due to the logic implemented in the channel negotiation of the LARGE_DATA topology, unnecessary channels might be created if this case occurs, which will be addressed in the future.

@Mergifyio backport 2.12.x 2.10.x 2.6.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • Tests that thoroughly check the new feature have been added/Regression tests checking the bug and its fix have been added; the added tests pass locally
  • [N/A] Any new/modified methods have been properly documented using Doxygen.
  • Changes are ABI compatible.
  • Changes are API compatible.
  • [N/A] New feature has been added to the versions.md file (if applicable).
  • [N/A] New feature has been documented/Current behavior is correctly described in the documentation.
  • Applicable backports have been included in the description.

Reviewer Checklist

  • The PR has a milestone assigned.
  • The title and description correctly express the PR's purpose.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@cferreiragonz cferreiragonz added the needs-review PR that is ready to be reviewed label Feb 19, 2024
@cferreiragonz cferreiragonz added this to the v2.13.3 milestone Feb 19, 2024
@cferreiragonz cferreiragonz changed the title Feature/large data interfaces LARGE_DATA Participants logic with same listening ports Feb 19, 2024
@cferreiragonz cferreiragonz changed the title LARGE_DATA Participants logic with same listening ports [20438] LARGE_DATA Participants logic with same listening ports Feb 19, 2024
@EduPonz EduPonz added the to-do label Feb 20, 2024
src/cpp/rtps/transport/TCPTransportInterface.cpp Outdated Show resolved Hide resolved
src/cpp/rtps/transport/TCPTransportInterface.cpp Outdated Show resolved Hide resolved
test/unittest/transport/TCPv4Tests.cpp Show resolved Hide resolved
MiguelCompany
MiguelCompany previously approved these changes Feb 21, 2024
@MiguelCompany MiguelCompany added ci-pending PR which CI is running and removed needs-review PR that is ready to be reviewed labels Feb 21, 2024
@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@JesusPoderoso
Copy link
Contributor

JesusPoderoso commented Feb 21, 2024

It seems there are build issues only on Windows @cferreiragonz. Can you address them, please?

D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(775,40): error C2059: syntax error: '<class-head>' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(776,13): error C2143: syntax error: missing ';' before '{' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,48): error C2332: 'struct': missing tag name [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,48): error C2143: syntax error: missing ')' before '.' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,48): error C3484: syntax error: expected '->' before the return type [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,49): error C3613: missing return type after '->' ('int' assumed) [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,49): error C3646: 'locator': unknown override specifier [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,56): error C2059: syntax error: ')' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(777,57): error C3551: if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'eprosima::fastdds::rtps::Locator') [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(779,20): error C2664: 'bool eprosima::fastdds::rtps::TCPTransportInterface::is_interface_allowed(const eprosima::fastdds::rtps::Locator &) const': cannot convert argument 1 from 'eprosima::fastdds::rtps::Locator (__cdecl *)(,)' to 'const eprosima::fastdds::rtps::Locator &' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(779,20): message : Reason: cannot convert from 'overloaded-function' to 'const eprosima::fastdds::rtps::Locator' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(779,20): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.h(288,18): message : see declaration of 'eprosima::fastdds::rtps::TCPTransportInterface::is_interface_allowed' (compiling source file D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp) [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(781,49): error C2664: 'void std::vector<eprosima::fastrtps::rtps::Locator_t,std::allocator<eprosima::fastrtps::rtps::Locator_t>>::push_back(const _Ty &)': cannot convert argument 1 from 'eprosima::fastdds::rtps::Locator (__cdecl *)(,)' to 'const _Ty &' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
            with
            [
                _Ty=eprosima::fastrtps::rtps::Locator_t
            ]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(781,49): message : Reason: cannot convert from 'overloaded-function' to 'const _Ty' [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
            with
            [
                _Ty=eprosima::fastrtps::rtps::Locator_t
            ]
  D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp(781,49): message : No constructor could take the source type, or constructor overload resolution was ambiguous [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include\vector(742,33): message : see declaration of 'std::vector<eprosima::fastrtps::rtps::Locator_t,std::allocator<eprosima::fastrtps::rtps::Locator_t>>::push_back' (compiling source file D:\a\Fast-DDS\Fast-DDS\src\fastrtps\src\cpp\rtps\transport\TCPTransportInterface.cpp) [D:\a\Fast-DDS\Fast-DDS\build\fastrtps\test\unittest\rtps\network\NetworkFactoryTests.vcxproj]

@JesusPoderoso
Copy link
Contributor

@richiprosima please test this

@JesusPoderoso
Copy link
Contributor

@Mergifyio rebase

Copy link
Contributor

mergify bot commented Feb 22, 2024

rebase

☑️ Nothing to do

  • -conflict [📌 rebase requirement]
  • -closed [📌 rebase requirement]

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
…ult)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
@cferreiragonz
Copy link
Contributor Author

@richiprosima please test this

@EduPonz
Copy link

EduPonz commented Feb 22, 2024

@Mergifyio backport 2.12.x 2.10.x 2.6.x

Copy link
Contributor

mergify bot commented Feb 22, 2024

backport 2.12.x 2.10.x 2.6.x

✅ Backports have been created

@EduPonz EduPonz merged commit 3ff9180 into master Feb 22, 2024
12 of 17 checks passed
@EduPonz EduPonz deleted the feature/large_data_interfaces branch February 22, 2024 14:08
cferreiragonz added a commit that referenced this pull request Feb 28, 2024
* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)
cferreiragonz added a commit that referenced this pull request Mar 4, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 4, 2024
* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)
cferreiragonz added a commit that referenced this pull request Mar 11, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 12, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
MiguelCompany pushed a commit that referenced this pull request Mar 12, 2024
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: cferreiragonz <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Mar 18, 2024
* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)
EduPonz pushed a commit that referenced this pull request Mar 19, 2024
* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)

Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
cferreiragonz added a commit that referenced this pull request Apr 16, 2024
* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)
EduPonz pushed a commit that referenced this pull request Apr 18, 2024
* LARGE_DATA Participants logic with same listening ports (#4396)

* Refs #20438: Add unittest to validate interfaces check

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add support to same listening_port and different IP address

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix Windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Add Ipv6 addresses support

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Remove repeated addition of listener port (added by default)

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Apply suggestions: ipv6

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

* Refs #20438: Fix windows build

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
(cherry picked from commit 3ff9180)

* Delete unused tests

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>

---------

Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
Co-authored-by: Carlos Ferreira González <carlosferreira@eprosima.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-pending PR which CI is running
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants