summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-05-01 18:32:17 +0200
committerSander Vrijders <sander@ouroboros.rocks>2026-05-20 08:17:05 +0200
commit6cd68ca0e61311cd4d6177b4c564432865a84a23 (patch)
tree1d54e87e154d8200bb8ab15eb734f9c3ec437db6 /cmake
parentaa3901535516d49c7a881c9c06e3582e1a6f1ada (diff)
downloadouroboros-6cd68ca0e61311cd4d6177b4c564432865a84a23.tar.gz
ouroboros-6cd68ca0e61311cd4d6177b4c564432865a84a23.zip
ipcpd: Expose ipcpd-eth flow statistics via RIB
Adds an IPCP_ETH_FLOW_STATS cmake option (gated on HAVE_FUSE; default off) exposing per-flow and aggregate frame counters at /<ipcp>/eth/{summary,<fd>}. Counters use RELAXED atomics; the macros expand to ((void) 0) when the option is off. Per-flow and global counters live in nested stat structs. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config/ipcp/common.cmake10
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/config/ipcp/common.cmake b/cmake/config/ipcp/common.cmake
index ffd5dc32..0c873b76 100644
--- a/cmake/config/ipcp/common.cmake
+++ b/cmake/config/ipcp/common.cmake
@@ -41,3 +41,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(IPCP_LINUX_TIMERSLACK_NS 100 CACHE STRING
"Slack value for high resolution timers on Linux systems.")
endif()
+
+# ipcpd-eth flow statistics (requires FUSE - eth.c relies on
+# IPCP_ETH_FLOW_STATS implying HAVE_FUSE for rib_reg/rib_unreg)
+if(HAVE_FUSE)
+ set(IPCP_ETH_FLOW_STATS FALSE CACHE BOOL
+ "Enable ipcpd-eth flow statistics via RIB")
+ if(IPCP_ETH_FLOW_STATS)
+ message(STATUS "ipcpd-eth flow statistics enabled")
+ endif()
+endif()