summaryrefslogtreecommitdiffstats
path: root/src/libnftnl.map
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2022-05-01 17:40:01 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2022-05-04 11:58:01 +0200
commitb9e00458b9f357f6c9b301f95b276fd019da0692 (patch)
tree7bda5c1f1b684da25e864b42feb28d2f76a86a78 /src/libnftnl.map
parente2514c0eff4da7e8e0aabd410f7b7d0b7564c880 (diff)
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 <phil@nwl.cc> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/libnftnl.map')
-rw-r--r--src/libnftnl.map7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libnftnl.map b/src/libnftnl.map
index ad8f2af..3a85325 100644
--- a/src/libnftnl.map
+++ b/src/libnftnl.map
@@ -387,3 +387,10 @@ LIBNFTNL_16 {
LIBNFTNL_17 {
nftnl_set_elem_nlmsg_build;
} LIBNFTNL_16;
+
+LIBNFTNL_18 {
+ nftnl_regs_alloc;
+ nftnl_regs_free;
+ nftnl_reg_get;
+ nftnl_reg_get_scratch;
+} LIBNFTNL_17;