Skip to content

Conversation

@vtz
Copy link
Owner

@vtz vtz commented Jan 7, 2026

  • Add UdpTransportConfig struct with SOME/IP compliant defaults:

    • max_message_size = 1400 bytes (avoids IP fragmentation per SOME/IP-TP spec)
    • multicast_ttl = 1 (local network default per SOME/IP SD spec)
    • blocking = true (efficient for typical SOME/IP applications)
    • Configurable buffer sizes, reuse options, broadcast support
  • Implement blocking/non-blocking I/O modes:

    • Blocking mode: Efficient, no busy loops, recommended for most use cases
    • Non-blocking mode: Integrates with event loops, responsive shutdown
    • Proper error handling for both modes
  • Add multicast interface configuration (IP_MULTICAST_IF socket option)

  • Add message size validation with SOME/IP-TP awareness

  • Add UDP broadcast support with SO_BROADCAST option

  • Add comprehensive UDP transport unit tests (test_udp_transport.cpp)

  • Add UDP configuration examples (examples/advanced/udp_config/):

    • Blocking vs non-blocking usage examples
    • High-performance and low-latency configurations
    • Broadcast-enabled transport examples
    • Performance considerations and best practices
  • Update .gitignore for test output (test_results.json)

  • Update examples/CMakeLists.txt to include new UDP config example

  • Update tests/CMakeLists.txt to include UDP transport tests

All changes are SOME/IP specification compliant and maintain backward compatibility.

vtz added 3 commits January 7, 2026 02:16
- Add UdpTransportConfig struct with SOME/IP compliant defaults:
  * max_message_size = 1400 bytes (avoids IP fragmentation per SOME/IP-TP spec)
  * multicast_ttl = 1 (local network default per SOME/IP SD spec)
  * blocking = true (efficient for typical SOME/IP applications)
  * Configurable buffer sizes, reuse options, broadcast support

- Implement blocking/non-blocking I/O modes:
  * Blocking mode: Efficient, no busy loops, recommended for most use cases
  * Non-blocking mode: Integrates with event loops, responsive shutdown
  * Proper error handling for both modes

- Add multicast interface configuration (IP_MULTICAST_IF socket option)
- Add message size validation with SOME/IP-TP awareness
- Add UDP broadcast support with SO_BROADCAST option
- Add comprehensive UDP transport unit tests (test_udp_transport.cpp)

- Add UDP configuration examples (examples/advanced/udp_config/):
  * Blocking vs non-blocking usage examples
  * High-performance and low-latency configurations
  * Broadcast-enabled transport examples
  * Performance considerations and best practices

- Update .gitignore for test output (test_results.json)
- Update examples/CMakeLists.txt to include new UDP config example
- Update tests/CMakeLists.txt to include UDP transport tests

All changes are SOME/IP specification compliant and maintain backward compatibility.
- Socket buffer size settings (SO_RCVBUF/SO_SNDBUF) now continue on failure
- Prevents socket creation failure in CI environments/containers
- Maintains backward compatibility while allowing buffer size configuration
- SD tests should no longer hang in CI due to socket option restrictions
- Make socket buffer size settings non-critical in UDP transport:
  * SO_RCVBUF/SO_SNDBUF failures no longer prevent socket creation
  * Allows SOME/IP to work in CI environments with restricted permissions
  * Maintains backward compatibility with optimal buffer sizes when available

- Improve socket shutdown handling:
  * Add shutdown() call before close() to wake up blocking recvfrom() calls
  * Prevents hanging threads during transport shutdown
  * Better cleanup in constrained environments

- Make multicast group joining non-critical:
  * Continue without multicast support in containerized/CI environments
  * Enables SOME/IP unicast-only operation when multicast unavailable
  * Prevents SD server initialization failures in restricted networks

- Add comprehensive Docker testing environment:
  * Dockerfile.test: Ubuntu 22.04 container matching CI environment
  * scripts/test_in_docker.sh: Run tests in isolated container
  * Supports interactive debugging and specific test filtering
  * Simulates CI conditions for local development

- Update scripts documentation with Docker testing instructions

These changes resolve CI hanging issues while maintaining full SOME/IP functionality.
@vtz vtz force-pushed the add-blocking-udp-transport branch from 32a88f8 to eb7a946 Compare January 8, 2026 14:27
@vtz vtz merged commit ffd6ffb into main Jan 8, 2026
2 checks passed
@vtz vtz deleted the add-blocking-udp-transport branch January 8, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants