Skip to content

Conversation

@mathiaspeters
Copy link
Contributor

@mathiaspeters mathiaspeters commented Jan 16, 2026

Problem

We want to add TP-Lite stats collection to libtelio

Solution

The stats collection is implemented in libfirewall so we just need to configure that. Some inbound packets will be rewritten slightly which requires the packet buffer for that to be mutable, which requires changes to neptun. And tests need a newer version of libfirewall which means that libtelio-build needs to be updated as well

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

@stalowyjez stalowyjez force-pushed the LLT-6647-use_libfirewall branch 2 times, most recently from 4cec59b to ba678a2 Compare January 20, 2026 22:51
@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from 6e24aab to a6c769b Compare January 21, 2026 21:15
@stalowyjez stalowyjez force-pushed the LLT-6647-use_libfirewall branch 2 times, most recently from ba18143 to 43c943a Compare January 22, 2026 14:58
@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from e7d365c to 4627210 Compare January 22, 2026 16:29
Base automatically changed from LLT-6647-use_libfirewall to main January 22, 2026 17:04
@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from 4627210 to 9a6685a Compare January 22, 2026 17:50
@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from 9a6685a to b006869 Compare January 23, 2026 09:23
@mathiaspeters mathiaspeters marked this pull request as ready for review January 23, 2026 09:25
@mathiaspeters mathiaspeters requested a review from a team as a code owner January 23, 2026 09:25
})?;
{
let mut old_cb = Box::new(collect_stats_cb);
let mut cb = self.tp_lite_stats_cb.callback.write();
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need the old value, so a simple assignment should be enough - no need for swap.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment to explain it, let me know if it clears it up or if you want me to change something

Copy link
Contributor

Choose a reason for hiding this comment

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

Could we change the order of those two operations to make it simpler, and avoid this temporal coupling? First call libfw_enable_tp_lite_stats_collection and only if it succeeds, do we update the callback field?

Paintree
Paintree previously approved these changes Jan 27, 2026
Copy link
Contributor

@Paintree Paintree left a comment

Choose a reason for hiding this comment

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

+0.5

@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from 67dce12 to e5bb73f Compare January 28, 2026 16:10
@tomaszklak
Copy link
Contributor

I can already give +1, regardless of #1648 (comment)

@mathiaspeters mathiaspeters force-pushed the LLT-6769_add_tp_lite_stats_collection branch from e5bb73f to eb1cc25 Compare January 30, 2026 10:11
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.

4 participants