feat(ether): add network footprint support - #133
Conversation
EnriqueParodi
left a comment
There was a problem hiding this comment.
Hi Manuel, can you please relay my feedback to the author?
The way this is wired is right. The kernel offers a hook and ether installs the reporter, so the kernel does not need to know the component exists.
-
getNetworkFootprint calls the reporter without checking it is set.
return networkReport_(busAddresses);The only installer is components/ether/src/component.cpp:166, and mode=barebones builds no components at all (conanfile.py:22). So in a barebones build the reporter is never installed and this calls an empty callable. move_only_function_impl.h:151 guards it with assert, which is compiled out with NDEBUG, so a debug build aborts with a clear message and a release build calls a null pointer.
Nothing calls getNetworkFootprint yet, so this cannot happen today. That makes it a good moment to guard it, because once there is a caller the problem only shows up in release builds without ether.
-
Installing a second reporter silently replaces the first. Only ether installs one today, so nothing is wrong, but the header does not say the slot holds one.
-
The kernel side has no caller in this PR. I assume a later one uses it. Worth confirming, otherwise the only thing exercising it is the test.
Thanks!
2b0857a to
06a70ba
Compare
0ce9a0b to
73e4221
Compare
|
Thanks for the review!
|
a2a7247 to
b9ba15e
Compare
@luisgutierrezpereda and I are preparing the changes:
|
b6c4929 to
37a7957
Compare
73e4221 to
06c3e88
Compare
37a7957 to
55a2903
Compare
06c3e88 to
e662e00
Compare
e662e00 to
cc232ec
Compare
55a2903 to
81f94df
Compare
cc232ec to
29a5ed0
Compare
81f94df to
fae23df
Compare
Adds the `stl` to represent a network footprint report and internal support needed to build it. The report describes the buses and their multicast addresses, multicast exclusions, conflicts and the ports used. A new reporter can now be installed through `PreloadApi` and invoked by the kernel with a list of bus addresses. resolves SEN-1717
29a5ed0 to
473d05f
Compare
Adds the
stlto represent a network footprint report and internal support needed to build it. The report describes the buses and their multicast addresses, multicast exclusions, conflicts and the ports used.A new reporter can now be installed through
PreloadApiand invoked by the kernel with a list of bus addresses.Resolves SEN-1717