CHERIoT-Platform / network-stack

5 stars 1 forks source link

Firewall code-size reduction. #33

Closed davidchisnall closed 1 month ago

davidchisnall commented 1 month ago

The firewall was using some generic bits of C++ code that generated a lot of custom template instantiations. Replace this with a small sorted vector implementation that is split into two parts:

These add up to about 1 KiB of code saving with just IPv4 enabled and 2 KiB with v4 and v6 enabled.

There are some tests in the code that are not run by default, but which do pass when run.