<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ouroboros/src/ipcpd/unicast/dir/dht.c, branch master</title>
<subtitle>Ouroboros main repository</subtitle>
<id>http://www.ouroboros.rocks/cgit/ouroboros/atom?h=master</id>
<link rel='self' href='http://www.ouroboros.rocks/cgit/ouroboros/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/'/>
<updated>2026-02-22T15:04:16+00:00</updated>
<entry>
<title>ipcpd: Fix unused values in unicast IPCP</title>
<updated>2026-02-22T15:04:16+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-02-21T11:05:11+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=c9662b47be711c00f013ac4606dc86c9a2ad8201'/>
<id>urn:sha1:c9662b47be711c00f013ac4606dc86c9a2ad8201</id>
<content type='text'>
Use the key in the store operation in the DHT, to avoid static
analyzer seeing it as being set without being used in release builds.

The length of the packet buffer is only used when tracking DT stats,
so should be set within the IPCP_FLOW_STATS guard.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Add struct llist for lists tracking len</title>
<updated>2026-02-18T06:58:21+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-02-15T11:26:04+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=760e17f142eb5cc0f594f1383ae68bb63bebe9ee'/>
<id>urn:sha1:760e17f142eb5cc0f594f1383ae68bb63bebe9ee</id>
<content type='text'>
The DHT uses a struct {struct list_head, size_t len} pattern, which is
also useful in the registry and other places. Having a struct llist
(defined in list.h) with consistent macros for addition/deletion etc
removes a lot of duplication and boilerplate and reduces the risk of
inconsistent updates.

The list management is now a macro-only implementation.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>build: Update copyright to 2026</title>
<updated>2026-02-18T06:54:56+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-02-15T09:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=0d72b59c2964208ea34ce2322978344d7ff1a223'/>
<id>urn:sha1:0d72b59c2964208ea34ce2322978344d7ff1a223</id>
<content type='text'>
Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>lib: Replace rdrbuff with a proper slab allocator</title>
<updated>2026-01-26T06:50:33+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-01-20T21:25:41+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=0ca48453a067c7862f0bb6b85f152da826f59af7'/>
<id>urn:sha1:0ca48453a067c7862f0bb6b85f152da826f59af7</id>
<content type='text'>
This is a first step towards the Secure Shared Memory (SSM)
infrastructure for Ouroboros, which will allow proper resource
separation for non-privileged processes.

This replaces the rdrbuff (random-deletion ring buffer) PoC allocator
with a sharded slab allocator for the packet buffer pool to avoid the
head-of-line blocking behaviour of the rdrb and reduce lock contention
in multi-process scenarios. Each size class contains multiple
independent shards, allowing parallel allocations without blocking.

- Configurable shard count per size class (default: 4, set via
  SSM_POOL_SHARDS in CMake). The configured number of blocks are
  spread over the number of shards. As an example:

  	 SSM_POOL_512_BLOCKS = 768 blocks total
	 These 768 blocks are shared among 4 shards
	       (not 768 × 4 = 3072 blocks)

- Lazy block distribution: all blocks initially reside in shard 0
  and naturally migrate to process-local shards upon first
  allocation and subsequent free operations

- Fallback with work stealing: processes attempt allocation from
  their local shard (pid % SSM_POOL_SHARDS) first, then steal
  from other shards if local is exhausted, eliminating
  fragmentation while maintaining low contention

- Round-robin condvar signaling: blocking allocations cycle
  through all shard condition variables to ensure fairness

- Blocks freed to allocator's shard: uses allocator_pid to
  determine target shard, enabling natural load balancing as
  process allocation patterns stabilize over time

Maintains existing robust mutex semantics including EOWNERDEAD
handling for dead process recovery. Internal structures exposed in
ssm.h for testing purposes. Adds some tests (pool_test,
pool_sharding_test.c. etc) verifying lazy distribution, migration,
fallback stealing, and multiprocess behavior.

Updates the ring buffer (rbuff) to use relaxed/acquire/release
ordering on atomic indices. The ring buffer requires the (robust)
mutex to ensure cross-structure synchronization between pool buffer
writes and ring buffer index publication.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>build: Add option to toggle Ouroboros logging in tests</title>
<updated>2026-01-19T07:14:55+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2026-01-14T00:07:53+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=8aa6ab4d29df80adde0d512244d43d38264bf32e'/>
<id>urn:sha1:8aa6ab4d29df80adde0d512244d43d38264bf32e</id>
<content type='text'>
The test output is a bit polluted with logs originating fomr the
logging system, e.g.:

23: test_bind_prog started.
23: ==16636== reg/name(DB): Add prog reg_test to name testname.
23: ==16636== reg(EE): Removing  from names.
23: test_bind_prog succeeded.

This adds a flag DISABLE_TEST_LOGGING that suppresses log_* output in
tests to keep them clean:

23: test_bind_prog started.
23: test_bind_prog succeeded.

The status is printed in CMake output:

-- Ouroboros logging in test output disabled
-- Ouroboros logging in test output enabled

By default the flag is ON (clean test output).

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>ipcpd: Fix missing return in DHT</title>
<updated>2025-08-24T08:23:47+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-24T08:23:47+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=e75861147fdf99509c699f47efffdb9a2966697a'/>
<id>urn:sha1:e75861147fdf99509c699f47efffdb9a2966697a</id>
<content type='text'>
The dht_kv_respond_req had a missing return statement. I'm not sure
why the double mutex_unlock() never caused havoc in testing.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>build: Add some hints for scan-build</title>
<updated>2025-08-23T12:11:39+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-23T09:01:57+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=6292bbbd245cb64a346f5126670085e656e89a88'/>
<id>urn:sha1:6292bbbd245cb64a346f5126670085e656e89a88</id>
<content type='text'>
The scan-build tool was pointing out some potential issues that were
understood or false positives. Added some asserts so scan-build can
complete successfully without these warnings.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>ipcpd: Add cleanup of DHT replication lists</title>
<updated>2025-08-23T08:13:36+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-16T11:02:08+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=5db139d2dc74f0d4450d3d7f45c3febc4b5dfc1f'/>
<id>urn:sha1:5db139d2dc74f0d4450d3d7f45c3febc4b5dfc1f</id>
<content type='text'>
The replication/republication lists could leak on shutdown. Added
cleanup handlers for them.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>ipcpd: Fix request handling at shutdown</title>
<updated>2025-08-23T08:13:33+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-16T08:54:14+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=575adac4acacf7d02395df0322ff5f03b7b82aaf'/>
<id>urn:sha1:575adac4acacf7d02395df0322ff5f03b7b82aaf</id>
<content type='text'>
The IPCP states were not entirely correct causing some operations to
be serviced during shutdown. This caused some use-after-free in the
pff. States in the IPCP are now correctly set. IRMd states updated to
the same strategy. The IRMd registry tracks if the IPCP was ENROLLED
or BOOTSTRAPPED, the IPCP just goes to OPERATIONAL.

IPCP state diagram::

NULL -&gt; init() -&gt; INIT -&gt; start() -&gt; BOOT -&gt;
     bootstrap/enroll() -&gt; OPERATIONAL -&gt; shutdown()
     -&gt; SHUTDOWN -&gt; stop_components() -&gt; BOOT -&gt;
stop() -&gt; INIT -&gt; fini() -&gt; NULL

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
</content>
</entry>
<entry>
<title>ipcpd: Fix readdir() not initializing ptr</title>
<updated>2025-08-11T08:17:14+00:00</updated>
<author>
<name>Dimitri Staessens</name>
<email>dimitri@ouroboros.rocks</email>
</author>
<published>2025-08-11T04:26:54+00:00</published>
<link rel='alternate' type='text/html' href='http://www.ouroboros.rocks/cgit/ouroboros/commit/?id=1c9f509cdaf0233ae4848c05c8bcd0de98bde89a'/>
<id>urn:sha1:1c9f509cdaf0233ae4848c05c8bcd0de98bde89a</id>
<content type='text'>
Some IPCP (sub)components returned successfully with 0 entries but did
not initialize the buf ptr when the RIB has no entries, causing a SEGV
on free() in the RIB.

Signed-off-by: Dimitri Staessens &lt;dimitri@ouroboros.rocks&gt;
Signed-off-by: Sander Vrijders &lt;sander@ouroboros.rocks&gt;
</content>
</entry>
</feed>
