Skip to content

feat(ether): add network footprint support - #133

Open
lolito93 wants to merge 1 commit into
SEN-1716-detect-multicast-address-collisionfrom
SEN-1717-network-footprint-output-model
Open

feat(ether): add network footprint support#133
lolito93 wants to merge 1 commit into
SEN-1716-detect-multicast-address-collisionfrom
SEN-1717-network-footprint-output-model

Conversation

@lolito93

Copy link
Copy Markdown
Collaborator

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

@EnriqueParodi EnriqueParodi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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

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

  3. 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!

@EnriqueParodi
EnriqueParodi force-pushed the SEN-1716-detect-multicast-address-collision branch from 2b0857a to 06a70ba Compare August 27, 2026 10:33
@EnriqueParodi
EnriqueParodi force-pushed the SEN-1717-network-footprint-output-model branch from 0ce9a0b to 73e4221 Compare August 27, 2026 10:33
@EnriqueParodi
EnriqueParodi marked this pull request as draft August 27, 2026 14:28
@EnriqueParodi
EnriqueParodi marked this pull request as ready for review August 27, 2026 14:28
@EnriqueParodi
EnriqueParodi marked this pull request as draft August 27, 2026 15:14
@EnriqueParodi
EnriqueParodi marked this pull request as ready for review August 27, 2026 15:14
@andressaumell

Copy link
Copy Markdown
Contributor

Thanks for the review!

  1. This guard already exists in the following PR feat(ether): offline network footprint report #143 .
    However, since getNetworkFootprint() itself is introduced in this PR, I agree the guard belongs here.
  2. Okay, we can clarify in component_api.h:240 that the kernel stores a single reporter and that installing another one replaces the existing reporter.
  3. Yes, this PR only introduces the reporter and its installation hook. It is consumed in feat(ether): offline network footprint report #143 and a following PR for runtime diagnostic.

@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1716-detect-multicast-address-collision branch 2 times, most recently from a2a7247 to b9ba15e Compare September 7, 2026 12:38
@andressaumell

Copy link
Copy Markdown
Contributor

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.

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

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

  3. 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!

@luisgutierrezpereda and I are preparing the changes:

  1. Added a guard to getNetworkFootprint() to throw an error when no reporter is installed.
  2. Documented that the kernel stores a single reporter and installing another replaces the existing one.

@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1716-detect-multicast-address-collision branch 2 times, most recently from b6c4929 to 37a7957 Compare September 9, 2026 08:33
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1717-network-footprint-output-model branch from 73e4221 to 06c3e88 Compare September 9, 2026 08:40
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1716-detect-multicast-address-collision branch from 37a7957 to 55a2903 Compare September 9, 2026 08:47
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1717-network-footprint-output-model branch from 06c3e88 to e662e00 Compare September 9, 2026 08:49
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1717-network-footprint-output-model branch from e662e00 to cc232ec Compare September 9, 2026 11:53
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1716-detect-multicast-address-collision branch from 55a2903 to 81f94df Compare September 9, 2026 12:00
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1717-network-footprint-output-model branch from cc232ec to 29a5ed0 Compare September 9, 2026 12:01
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1716-detect-multicast-address-collision branch from 81f94df to fae23df Compare September 9, 2026 17:52
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
@luisgutierrezpereda
luisgutierrezpereda force-pushed the SEN-1717-network-footprint-output-model branch from 29a5ed0 to 473d05f Compare September 9, 2026 17:54
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.

3 participants