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

[18002] Internal refactor on port handling #3440

Merged
merged 15 commits into from
Apr 17, 2024

Conversation

MiguelCompany
Copy link
Member

@MiguelCompany MiguelCompany commented Apr 6, 2023

Description

This PR refactors the constructor of RTPSParticipantImpl, and changes the calculation of the ports used when set to 0 on the input locators.

@Mergifyio backport 2.13.x 2.10.x 2.6.x

Contributor Checklist

  • Commit messages follow the project guidelines.
  • The code follows the style guidelines of this project.
  • N/A 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.
  • Check contributor checklist is correct.
  • Check CI results: changes do not issue any warning.
  • Check CI results: failing tests are unrelated with the changes.

@EduPonz EduPonz added this to the v2.14.0 milestone Feb 21, 2024
@EduPonz EduPonz modified the milestones: v2.14.0 - Frozen, v3.0.0 Mar 5, 2024
@MiguelCompany MiguelCompany force-pushed the bugfix/use-lowest-possible-port branch from 41213c0 to 6e69211 Compare March 12, 2024 16:11
@MiguelCompany MiguelCompany added needs-review PR that is ready to be reviewed and removed needs rebase labels Mar 12, 2024
@MiguelCompany MiguelCompany marked this pull request as ready for review March 12, 2024 21:37
@MiguelCompany
Copy link
Member Author

@richiprosima Please test this

@MiguelCompany MiguelCompany modified the milestones: v3.0.0, v2.14.1 Mar 13, 2024
@MiguelCompany MiguelCompany changed the title Internal refactor on port handling [18002] Internal refactor on port handling Mar 13, 2024
@MiguelCompany MiguelCompany force-pushed the bugfix/use-lowest-possible-port branch from 6e69211 to f8f77bc Compare March 13, 2024 07:22
@EduPonz EduPonz added the conflicts Backport PR wich git cherry pick failed label Apr 3, 2024
@MiguelCompany MiguelCompany force-pushed the bugfix/use-lowest-possible-port branch from f8f77bc to f4a3b32 Compare April 3, 2024 13:04
@EduPonz EduPonz removed the conflicts Backport PR wich git cherry pick failed label Apr 3, 2024
@EduPonz EduPonz self-requested a review April 4, 2024 10:35
@github-actions github-actions bot added the ci-pending PR which CI is running label Apr 4, 2024
EduPonz
EduPonz previously approved these changes Apr 4, 2024
@EduPonz
Copy link

EduPonz commented Apr 4, 2024

@richiprosima please test this

@EduPonz
Copy link

EduPonz commented Apr 10, 2024

BlackboxTests_DDS_PIM.SHM.SamePortUnicastMulticast is failing in all platforms, @MiguelCompany can you take a look?

@EduPonz EduPonz added to-do and removed needs-review PR that is ready to be reviewed ci-pending PR which CI is running labels Apr 10, 2024
@MiguelCompany MiguelCompany added needs-review PR that is ready to be reviewed and removed to-do labels Apr 10, 2024
@MiguelCompany
Copy link
Member Author

BlackboxTests_DDS_PIM.SHM.SamePortUnicastMulticast is failing in all platforms, @MiguelCompany can you take a look?

I rebased this, and fixed that test in 25db48b

@github-actions github-actions bot added the ci-pending PR which CI is running label Apr 10, 2024
@MiguelCompany MiguelCompany force-pushed the bugfix/use-lowest-possible-port branch from 9dc7030 to a6547c5 Compare April 11, 2024 09:18
@MiguelCompany MiguelCompany force-pushed the bugfix/use-lowest-possible-port branch from a6547c5 to 2222c34 Compare April 11, 2024 09:21
@MiguelCompany MiguelCompany requested review from EduPonz and removed request for EduPonz April 11, 2024 09:26
@EduPonz EduPonz added ready-to-merge Ready to be merged. CI and changes have been reviewed and approved. and removed needs-review PR that is ready to be reviewed ci-pending PR which CI is running labels Apr 17, 2024
@EduPonz
Copy link

EduPonz commented Apr 17, 2024

@Mergifyio backport 2.13.x 2.10.x 2.6.x

@EduPonz EduPonz merged commit ea5af48 into master Apr 17, 2024
11 of 12 checks passed
@EduPonz EduPonz deleted the bugfix/use-lowest-possible-port branch April 17, 2024 14:33
Copy link
Contributor

mergify bot commented Apr 17, 2024

backport 2.13.x 2.10.x 2.6.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Apr 17, 2024
* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)

# Conflicts:
#	src/cpp/rtps/network/NetworkFactory.h
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
mergify bot pushed a commit that referenced this pull request Apr 17, 2024
* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)

# Conflicts:
#	src/cpp/rtps/network/NetworkFactory.h
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
mergify bot pushed a commit that referenced this pull request Apr 17, 2024
* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)

# Conflicts:
#	include/fastdds/rtps/network/NetworkFactory.h
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp
#	src/cpp/rtps/participant/RTPSParticipantImpl.h
#	test/blackbox/common/BlackboxTestsTransportSHM.cpp
MiguelCompany added a commit that referenced this pull request May 14, 2024
* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)
MiguelCompany added a commit that referenced this pull request May 15, 2024
* Internal refactor on port handling (#3440)

* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)

# Conflicts:
#	src/cpp/rtps/network/NetworkFactory.h
#	src/cpp/rtps/participant/RTPSParticipantImpl.cpp

* Fix conflicts.

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Co-authored-by: Miguel Company <[email protected]>
MiguelCompany added a commit that referenced this pull request May 20, 2024
* Refs #18002. Avoid mutation of multicast ports.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Move security initalization up.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Prepare for refactor of locators setup.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor metatraffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor initial peers related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor user traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor output traffic related code.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Safe metatraffic unicast port on a new attribute.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. User unicast port calculated on participant instead of NetworkFactory.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Update metatraffic_unicast_port_ inside applyLocatorAdaptRule.

Signed-off-by: Miguel Company <[email protected]>

* Apply suggestion

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Always create unicast receiver resources first.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve warning message.

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Refactor createReceiverResources

Signed-off-by: Miguel Company <[email protected]>

* Refs #18002. Improve SHM.SamePortUnicastMulticast blackbox test

Signed-off-by: Miguel Company <[email protected]>

---------

Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Miguel Company <[email protected]>
(cherry picked from commit ea5af48)

Co-authored-by: Miguel Company <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Ready to be merged. CI and changes have been reviewed and approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants