summaryrefslogtreecommitdiffstats
path: root/include/regs.h
Commit message (Collapse)AuthorAgeFilesLines
* expr: extend support for dynamic register allocationJose M. Guisado Gomez2022-05-151-0/+38
| | | | | | | | | | | | | | | | | | | | Add expression support for: - ct - exthdr - fib - osf - rt - socket - xfrm to extend b9e00458b9f3 ("src: add dynamic register allocation infrastructure"). Joint work with Pablo. Signed-off-by: Jose M. Guisado Gomez <guigom@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add dynamic register allocation infrastructurePablo Neira Ayuso2022-05-041-0/+32
Starting Linux kernel 5.18-rc, operations on registers that already contain the expected data are turned into noop. Track operation on registers to use the same register through nftnl_reg_get(). This patch introduces an LRU eviction strategy when all the registers are in used. nftnl_reg_get_scratch() is used to allocate a register as scratchpad area: no tracking is performed in this case, although register eviction might occur. Acked-by: Phil Sutter <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>