CHERIoT-Platform / network-stack

5 stars 1 forks source link

Reduce code size of the firewall. #18

Closed hlef closed 5 months ago

hlef commented 5 months ago

The firewall is a little bit too big. Reduce the code size by...

With this, we gain about 2kB.

davidchisnall commented 5 months ago

This wastes a lot of space for IPv4 addresses. I would still like separate arrays for each, I just want them sorted / searched with something like qsort (sort variable-sized things taking the size as an argument, using memcmp rather than comparison operators for sorting). This can be done either by writing in a more C style, or by providing iterations to the standard algorithms that are initialised with a dynamic size.

hlef commented 5 months ago

Sounds like we want a different approach here. I'll close this one for now and come back with what we discussed.