From b9e00458b9f357f6c9b301f95b276fd019da0692 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 1 May 2022 17:40:01 +0200 Subject: src: add dynamic register allocation infrastructure 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 Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'include/libnftnl') diff --git a/include/libnftnl/Makefile.am b/include/libnftnl/Makefile.am index d846a57..186f758 100644 --- a/include/libnftnl/Makefile.am +++ b/include/libnftnl/Makefile.am @@ -3,6 +3,7 @@ pkginclude_HEADERS = batch.h \ trace.h \ chain.h \ object.h \ + regs.h \ rule.h \ expr.h \ set.h \ -- cgit v1.2.3