rmind/npf

Feature Request: replace table contents in single atomic operation

yazshel opened this issue · 1 comments

As per my direct emails, I'm working on fixing & improving the NPF support for greyd(8), and am looking for a way to replace the full contents of a table in a single atomic operation.

One possible design option for implementing this functionality:

  • Add commands for IOC_NPF_TABLE ioctl(2) to create, swap and destroy tables:
    • New NPF_CMD_TABLE_SWAP command will will be a front-end to npf_tableset_swap()
    • New NPF_CMD_TABLE_CREATE command will create a table (potentially reallocating the current tableset to make enough space and allocating the next available table ID?) Is there a better way to get around the initial tableset size allocation limit?
    • New NPF_CMD_TABLE_REMOVE command to remove a temporary table from the tableset and destroy then table removing/destroying the swapped-out table.

Any comments/suggestions on the above design?

rmind commented

Implemented by #38. Issue resolved.