Skip to content

Commit 6274c40

Browse files
Duarte FonsecaDuarte Fonseca
authored andcommitted
Merge branch 'master' into cycle_event_fix
2 parents ef10550 + 3bda931 commit 6274c40

File tree

681 files changed

+28605
-32878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

681 files changed

+28605
-32878
lines changed

.clang-format

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ Standard: c++17
1616
# Column width is limited to 100 in accordance with Qt Coding Style.
1717
# https://wiki.qt.io/Qt_Coding_Style
1818
# Note that this may be changed at some point in the future.
19-
ColumnLimit: 100
19+
ColumnLimit: 140
20+
2021
# How much weight do extra characters after the line length limit have.
2122
# PenaltyExcessCharacter: 4
2223

@@ -47,6 +48,9 @@ ContinuationIndentWidth: 8
4748
# No spaces inside the braced list.
4849
Cpp11BracedListStyle: true
4950

51+
# No spaces before a braced list
52+
SpaceBeforeCpp11BracedList: false
53+
5054
# No indentation for namespaces.
5155
NamespaceIndentation: None
5256

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# clang-format applied to the codebase
2+
17acd2207d1599ced7a8468efb29cdc81966a5d4

Android.bp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ cc_library_shared {
7979

8080
cflags: [
8181
"-DWITHOUT_SYSTEMD",
82-
"-DVSOMEIP_VERSION=\"3.5.5\"",
83-
"-DVSOMEIP_COMPAT_VERSION=\"3.5.5\"",
82+
"-DVSOMEIP_VERSION=\"3.5.7\"",
83+
"-DVSOMEIP_COMPAT_VERSION=\"3.5.7\"",
8484
"-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\"",
8585
"-DUSE_DLT",
8686
],

Android.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ LOCAL_CFLAGS := \
101101
-frtti \
102102
-fexceptions \
103103
-DWITHOUT_SYSTEMD \
104-
-DVSOMEIP_VERSION=\"3.5.5\" \
104+
-DVSOMEIP_VERSION=\"3.5.7\" \
105105
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
106106
-Wno-unused-parameter \
107107
-Wno-non-virtual-dtor \
@@ -154,7 +154,7 @@ LOCAL_CFLAGS := \
154154
-frtti \
155155
-fexceptions \
156156
-DWITHOUT_SYSTEMD \
157-
-DVSOMEIP_VERSION=\"3.5.5\" \
157+
-DVSOMEIP_VERSION=\"3.5.7\" \
158158
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
159159
-Wno-unused-parameter \
160160
-Wno-non-virtual-dtor \
@@ -201,8 +201,8 @@ LOCAL_CFLAGS := \
201201
-frtti \
202202
-fexceptions \
203203
-DWITHOUT_SYSTEMD \
204-
-DVSOMEIP_VERSION=\"3.5.5\" \
205-
-DVSOMEIP_COMPAT_VERSION=\"3.5.5\" \
204+
-DVSOMEIP_VERSION=\"3.5.7\" \
205+
-DVSOMEIP_COMPAT_VERSION=\"3.5.7\" \
206206
-DVSOMEIP_BASE_PATH=\"/vendor/run/someip/\" \
207207
-Wno-unused-parameter \
208208
-Wno-non-virtual-dtor \

CHANGES

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,189 @@
11
Changes
22
=======
3+
v3.5.7
4+
- global
5+
- Update deprecated boost::asio APIs
6+
- Update documentation regarding the vsomeip configurations
7+
- Addresses most shadowing variables
8+
- Fixes some old style C-casts
9+
10+
- routing_manager_base
11+
- Always send initial event on subscription
12+
13+
- routing_manager_impl
14+
- The rule vsomeip_sec_policy_is_client_allowed_to_access_member, was considered to be redundant,
15+
therefore it is now removed.
16+
- Consistently execute/schedule the action (sending, processing a received message), before trace
17+
the message.
18+
- Ensure to unsubscribe non selective events.
19+
- Clear multicast only for last subscriber
20+
21+
- routing_manager_stub
22+
- Fix SIGSEGV on application register that cna happen if an application sends
23+
REGISTER_APPLICATION_ID without giving a non-zero port, when using local TCP.
24+
- Fix client registration thread names.
25+
- Enforce a client reconnect by dropping the connection client->routingd
26+
27+
- routing_manager_client
28+
- Replace an erase from know_clients map call with the appropriate function.
29+
- Make client id show as hex value, in logs
30+
- Consistently execute/schedule the action (sending, processing a received message), before trace
31+
the message.
32+
- Close all connections on "client error".
33+
- Drop use of netlink and use IP_FREEBIND, for linux and android platforms
34+
- Ensure client process only once the registration
35+
- Update security offer rule for messages
36+
37+
- endpoints
38+
- local communication
39+
- Added missing timeout handling on connection timeout.
40+
- Fix use of bound client
41+
- Change the order how a connection is cleaned-up.
42+
- external communication
43+
- Add predicate to condition variables.
44+
- udp_server_endpoint_impl refactoring
45+
- local and external communication
46+
- Set TCP_USER_TIMEOUT on connections, which causes a connection to timeout when data
47+
remains unacknowledged for more than a certain amount of time.
48+
- Remove the exponential timer increase from connection.
49+
- Handle not_socket error on send_cbk.
50+
- Set was_not_connected to true if not established or connected when send_cbk is called.
51+
- Close all connections on "client error".
52+
- netlink
53+
- optimize get link request by filtering the output
54+
- optimize bind parameters to the data really needed
55+
- fix IPv6 handling
56+
- improve error handling
57+
- reduce buffer size
58+
59+
- service_discovery
60+
- Rename IPV3 to IPV4
61+
62+
- application
63+
- GCC 15 requires stdint.h to be explicitly imported.
64+
- Add logs to registering of subscription handlers.
65+
- Add predicate to condition variables.
66+
67+
- configurations
68+
- Allow to set any service/instance on supress missing events.
69+
- Use application name instead of client identifier for specific debouncing configurations.
70+
71+
- plugin
72+
- Remove unused load_plugins
73+
74+
- tests
75+
- network_tests
76+
- Enables Valgrind (massif and memcheck) and removes Valgrind Helgrind.
77+
- Fix issues with certain Valgrind memcheck tests where Valgrind can't follow TLS memory until
78+
the thread is completely destroyed, therefore can't confirm whether the thread cleans it up
79+
after exit, hence it marks it "possibly lost".
80+
- Fix security tests false positives, in tests that have the missing check for the exit codes in
81+
the .sh starter script.
82+
- Added new test to verify if the availability handler is working correctly.
83+
- Added new test to validate local tcp client registration sequence.
84+
- Added tests for local tcp communication with fault injection
85+
- Fix offer_stop_offer_test by leaving the trigger if the (Un)Available to the end of the process
86+
- unit_tests
87+
- Fix unit tests failling on Windows
88+
89+
- examples
90+
- Fix examples on Windows and set them as voting
91+
92+
- documentation
93+
- Add extra documentation for routing info command
94+
95+
v3.5.6
96+
- routing_manager_client
97+
- Forcing the ON_AVAILABLE log and send subscription of requested services even if availability was
98+
previously known.
99+
- Remove pending subscription entry right after calling on_subscription from application impl - race
100+
condition
101+
- Add missing mutex on request_debounce_timeout_ck and reset request_debounce_timer_running_ if
102+
requests_to_debounce_ is empty - race condition (issue: missing request)
103+
- lock registration_state_mutex_ before sending subscribes and unsubscribes - race condition
104+
- re-request service availability triggers from the routing host when a client loses the connection
105+
to a service provider
106+
107+
- routing_manager_impl
108+
- Convert pending_sd_offers_ from vector to set to avoid repeated service entries.
109+
110+
- routing_manager_stub
111+
- Send a `config_command` to share the _client hostname with the _target application. the
112+
config_command message is only sent after the routing_info is sent, thereby guaranteeing
113+
that the routing_info is processed first.
114+
- Send ADD_CLIENT command to all the client registered, without considering if they are
115+
requesting services from this client.
116+
117+
- routing_manager_base
118+
- Added a change to add_known_client so that the order of calling config_command and
119+
routing_info_command would not matter. This change only has impact when the clients adds itself
120+
as a known_client and was made to safeguard its hostname.
121+
122+
- endpoints
123+
- local comunication
124+
- Force endpoint to perform port assignment when local network interface becomes unavailable.
125+
- Check on local_tcp_client and local_uds_client if socket is open before sending.
126+
- Do not call shutdown_and_close_socket if socket state is connecting - race condition
127+
- A condition variable was implemented on local-tcp_client endpoint to notify the stop process
128+
to exit the 10ms wait if an EOF is received in receive_cbk, since the queue is cleared in this case.
129+
- Ensuring the lifetime of message_buffer_ptr on uds.
130+
- external communication
131+
- A state machine was created to cascade the stop -> init + start The goal was to ensure that
132+
the udp_server endpoint waits on both unicast and multicast stop, and after they are both stopped,
133+
and the flag restarting is set, the init and start can be called. (issue: Bad File Descriptor)
134+
- Syncronize the join and leave process of udp server multicast sockets. also (issue: in some situations
135+
after STR, vsomeip will not join the multicast group used by service discovery).
136+
- leave and join multicast address only starts when network is ready. (issue: join/leave multicast was
137+
causing CPU load, because this process starts when network is not ready).
138+
- Remove use of linger-with-timeout in tse, which fixes blocking socket operations
139+
- Ensure "shutdown_and_close" is called on "stop".
140+
- local and external communication
141+
- Endpoints would start every time find_or_create_local would execute, even if endpoint already existed.
142+
- Fix is_sending_ status
143+
- Increase mutex_ scope to include was_not_connected flag on connect (issue: REMOTE_ERROR on response)
144+
- cancel_and_connect_cbk was updated to only report the connection as successfully terminated when
145+
cancel_and_connect_cbk is called without error. Previously, it was reporting the connection as successfully
146+
terminated even when there was a connection error, preventing the endpoint from being.
147+
restarted.
148+
149+
- netlink
150+
- Removes the interface index when we get a RTM_DELLINK.
151+
- Added an option to consider the reset of sd_route_set_ when interface goes down. This is enabled by default.
152+
153+
- security
154+
- For each received response/notification, call is_client_allowed_to_offer to check whether the sending client
155+
is allowed to offer the service. This is done only for internal TCP communication; for UDS the check is done
156+
with the bound client.
157+
158+
- service discovery
159+
- Fix multicast threshold for initial events.
160+
- Stop find/offer debounce timers when the service discovery is stopped.
161+
- Added a mecaism on start of SD, to try rejooin the multicast address if any message was received by 1.1s
162+
(default timer) (issue: in some situations after STR, vsomeip will not join the multicast group used by
163+
service discovery).
164+
165+
- IO threads
166+
- To mitigate IO threads exit and stalled threads, a solution in which the io_context object processing is
167+
ran for determined duration was developed. This feature is disable by default and can be enable by
168+
configurations.
169+
170+
- configurations
171+
- Added configuration to enable io thread mitigation.
172+
- Enable configuration of client-specific debouncing.
173+
- Allow global configuration of maximum (additional) dispatchers and dispatch time.
174+
- Unspecify catch exception for boost exceptions.
175+
- Added configuration to consider the reset of sd_route_set_ when interface goes down. This is enabled by
176+
default.
177+
- Enable global configuration of request debounce time.
178+
- Support multiple IPsec activation files per connection.
179+
180+
- application_impl
181+
- Fix host assignment with non-local routing: add SO_REUSEADDR to the non-local routing host check
182+
183+
- runtime
184+
- Remove the get_mutex_ from runtime_impl - This mutex is not needed, as the static initialization of the
185+
shared_ptr is atomic. (issue: tombstone in application shutdown)
186+
3187
v3.5.5
4188
- Fix build issue on Ubuntu 24.04
5189
- Fixing change that was introduced on Fix for Find messages commit

CMakeLists.txt

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ set (VSOMEIP_COMPAT_NAME vsomeip)
1111

1212
set (VSOMEIP_MAJOR_VERSION 3)
1313
set (VSOMEIP_MINOR_VERSION 5)
14-
set (VSOMEIP_PATCH_VERSION 5)
14+
set (VSOMEIP_PATCH_VERSION 7)
1515
set (VSOMEIP_HOTFIX_VERSION 0)
1616

1717
set (VSOMEIP_VERSION ${VSOMEIP_MAJOR_VERSION}.${VSOMEIP_MINOR_VERSION}.${VSOMEIP_PATCH_VERSION})
@@ -75,10 +75,11 @@ endif()
7575

7676
set(NO_DEPRECATED "")
7777
set(OPTIMIZE "")
78-
if(NOT DEFINED _FORTIFY_SOURCE)
79-
set(_FORTIFY_SOURCE 2)
80-
endif()
81-
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector-strong -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=${_FORTIFY_SOURCE} -Wformat -Wformat-security -Wpedantic -Werror -fPIE")
78+
79+
if(NOT DEFINED _FORTIFY_SOURCE)
80+
set(_FORTIFY_SOURCE 2)
81+
endif()
82+
set(OS_CXX_FLAGS "${OS_CXX_FLAGS} -D_GLIBCXX_USE_NANOSLEEP -pthread -O -Wall -Wextra -Wformat -Wformat-security -Wconversion -fexceptions -fstrict-aliasing -fstack-protector-strong -fasynchronous-unwind-tables -fno-omit-frame-pointer -D_FORTIFY_SOURCE=${_FORTIFY_SOURCE} -Wformat -Wformat-security -Wpedantic -Werror -fPIE -Wno-inconsistent-missing-override")
8283

8384
# force all use of std::mutex and std::recursive_mutex to use runtime init
8485
# instead of static initialization so mutexes can be hooked to enable PI as needed
@@ -144,10 +145,6 @@ if (NOT MSVC)
144145
add_definitions(-DBOOST_USE_VALGRIND)
145146
endif ()
146147

147-
if (VALGRIND_TYPE STREQUAL "helgrind")
148-
set(TEST_ENTRYPOINT ${TEST_ENTRYPOINT} --show-error-list=yes --suppressions=${VALGRIND_SUPPRESS_FILE} --gen-suppressions=all --log-file=${VALGRIND_LOGS_DIR}/test_name.out)
149-
endif ()
150-
151148
if (VALGRIND_TYPE STREQUAL "massif")
152149
set(TEST_ENTRYPOINT ${TEST_ENTRYPOINT} --massif-out-file=${VALGRIND_LOGS_DIR}/test_name.out)
153150
endif ()

README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,50 @@ PRODUCT_PACKAGES += \
118118
libvsomeip_sd \
119119
libvsomeip_e2e \
120120
```
121+
122+
##### Build Instructions for Windows
123+
124+
###### Setup
125+
126+
- Visual Studio Code
127+
- Visual Studio Build Tools with:
128+
- Desktop development with C++
129+
- MSVC v143 - VS 2022 C++ x64/x86 build tools
130+
- Windows 10/11 SDK
131+
- CMake for Windows
132+
- vSomeIP uses CMake as buildsystem.
133+
- vSomeIP uses Boost >= 1.71.0:
134+
- GIT
135+
136+
For the tests Google's test framework https://code.google.com/p/googletest/[gtest] is needed.
137+
-- URL: https://googletest.googlecode.com/files/gtest-<version>.zip
138+
or
139+
-- git clone https://github.com/google/googletest.git
140+
141+
###### Compilation
142+
143+
For compilation call:
144+
145+
```bash
146+
rmdir /s /q build
147+
cd build
148+
cmake .. -A x64 -DCMAKE_INSTALL_PREFIX:PATH=$YOUR_PATH
149+
cmake --build . --config [Release|Debug]
150+
cmake --build . --config [Release|Debug] --target install
151+
```
152+
153+
For compilation outside vsomeip-lib folder call:
154+
155+
```bash
156+
rmdir /s /q build
157+
cmake -B "buildlib" -DCMAKE_BUILD_TYPE=[Release|Debug] -DCMAKE_INSTALL_PREFIX=$YOUR_PATH -A x64 vsomeip-lib
158+
#vsomeip-lib compilation
159+
cmake --build build --config [Release|Debug] --parallel 16 --target install
160+
#examples compilation
161+
cmake --build build --config [Release|Debug] --parallel 16 --parallel 16 --target examples
162+
cmake --build build --config [Release|Debug] --parallel 16 --target install
163+
#unit-tests compilation
164+
cmake --build build/test --config [Release|Debug] --parallel 16 --parallel 16 --target build_unit_tests
165+
#all tests compilation
166+
cmake --build build/test --config [Release|Debug] --parallel 16 --parallel 16 --target all build_tests
167+
```

0 commit comments

Comments
 (0)