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

[21036] Handle errors when setting socket buffer sizes (backport #4760) (backport #4796) (backport #4812) #4852

Closed
wants to merge 1 commit into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented May 27, 2024

Description

This is a manual backport of #4760 where s_minimumSocketBuffer has been deprecated instead of removed.

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

  • Any new/modified methods have been properly documented using Doxygen.

  • N/A Any new configuration API has an equivalent XML API (with the corresponding XSD extension)

  • Changes are backport compatible: they do NOT break ABI nor change library core behavior.

  • 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.

  • N/A 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.

This is an automatic backport of pull request #4796 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #4812 done by [Mergify](https://mergify.com).

* Handle errors when setting socket buffer sizes (#4760) (#4796)

* Refs #20972. Method socket_buffer_size in DDS_PIM helpers sets also sending buffer.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Method socket_buffer_size in fastrtps_deprecated helpers sets also sending buffer.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Improvements in on_sample_lost blackbox tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Move code into new private methods.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_send_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor on configure_receive_buffer_size.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check user configuration at the beginning of init method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Use maxMessageSize as minimum possible value.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Applying changes on OpenAndBindUnicastOutputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Applying changes on CreateInputChannelResource.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Revert "Refs #20972. Applying changes on CreateInputChannelResource."

This reverts commit ed848e9.

* Refs #20972. Add helper header with template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods return boolean.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Configure methods use new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. OpenAndBindUnicastOutputSocket uses new template method.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Changes in OpenAndBindInputSocket.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972.Setting options on TCP channels.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Doxygen.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check limits of configured sizes.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add UDP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Add TCP unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Move checks in TCP to beginning of init.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in UDP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Refactor for common code in TCP.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove unused constants in UDP tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Check final configuration on unit tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Uncrustify.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Less strict tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Remove `s_minimumSocketBuffer` from tests.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #20972. Deprecate `s_minimumSocketBuffer`.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 53cd211)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPv4Transport.cpp
#	src/cpp/rtps/transport/UDPv6Transport.cpp
#	test/blackbox/common/DDSBlackboxTestsListeners.cpp

* Refs #21036. Fix conflicts.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

* Refs #21036. Update for non-backported changes

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>

---------

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Co-authored-by: Miguel Company <miguelcompany@eprosima.com>
(cherry picked from commit 5d1c013)

# Conflicts:
#	src/cpp/rtps/transport/TCPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPTransportInterface.cpp
#	src/cpp/rtps/transport/UDPv4Transport.cpp
#	test/unittest/transport/TCPv6Tests.cpp
#	test/unittest/transport/UDPv4Tests.cpp
#	test/unittest/transport/UDPv6Tests.cpp
@mergify mergify bot added the conflicts Backport PR wich git cherry pick failed label May 27, 2024
Copy link
Contributor Author

mergify bot commented May 27, 2024

Cherry-pick of 5d1c013 has failed:

On branch mergify/bp/2.6.x/pr-4812
Your branch is up to date with 'origin/2.6.x'.

You are currently cherry-picking commit 5d1c0138a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   include/fastdds/rtps/transport/TransportInterface.h
	modified:   include/fastrtps/transport/TransportInterface.h
	modified:   src/cpp/rtps/transport/TCPChannelResource.cpp
	modified:   src/cpp/rtps/transport/TCPChannelResource.h
	modified:   src/cpp/rtps/transport/TCPChannelResourceBasic.cpp
	modified:   src/cpp/rtps/transport/TCPChannelResourceSecure.cpp
	modified:   src/cpp/rtps/transport/UDPTransportInterface.h
	modified:   src/cpp/rtps/transport/UDPv6Transport.cpp
	new file:   src/cpp/rtps/transport/asio_helpers.hpp
	modified:   test/blackbox/api/dds-pim/PubSubReader.hpp
	modified:   test/blackbox/api/dds-pim/PubSubWriter.hpp
	modified:   test/blackbox/api/fastrtps_deprecated/PubSubReader.hpp
	modified:   test/blackbox/api/fastrtps_deprecated/PubSubWriter.hpp
	modified:   test/unittest/transport/TCPv4Tests.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/cpp/rtps/transport/TCPTransportInterface.cpp
	both modified:   src/cpp/rtps/transport/UDPTransportInterface.cpp
	both modified:   src/cpp/rtps/transport/UDPv4Transport.cpp
	both modified:   test/unittest/transport/TCPv6Tests.cpp
	both modified:   test/unittest/transport/UDPv4Tests.cpp
	both modified:   test/unittest/transport/UDPv6Tests.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@Mario-DL
Copy link
Member

Mario-DL commented Jul 1, 2024

Closing this since I mistakenly merged it silently in #4607

@Mario-DL Mario-DL closed this Jul 1, 2024
@mergify mergify bot deleted the mergify/bp/2.6.x/pr-4812 branch July 1, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Backport PR wich git cherry pick failed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants