Skip to content

add operation cache for timestamp

Thomas Haller netfilter-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4evaluate: add and use parse_ctx_init() helper methodsrc/evaluate.c+20 -80 replies
2/4src: add ops_cache struct for caching information during parsinginclude/datatype.h include/nftables.h src/evaluate.c +1 more+31 -21 reply
3/4src: cache result of time() during parsing/outputinclude/datatype.h src/datatype.c src/meta.c+24 -21 reply
4/4src: cache GMT offset for current time during parsing/outputinclude/datatype.h src/datatype.c src/meta.c+65 -220 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH nft 0/4] add operation cache for timestamp

Add a cache for "time(NULL)" and tm_gmtoff from localtime_r(time(NULL), &tm). The point is to ensure that one parse/output operation fetches the current time and GMT offset at most once.

Follow up to ([1])

Subject: Re: [nft PATCH 2/2] meta: use reentrant localtime_r()/gmtime_r() functions
Date: Tue, 22 Aug 2023 17:15:14 +0200

[1] https://marc.info/?l=netfilter-devel&m=169271724629901&w=4

Thomas Haller (4):
evaluate: add and use parse_ctx_init() helper method
src: add ops_cache struct for caching information during parsing
src: cache result of time() during parsing/output
src: cache GMT offset for current time during parsing/output

 include/datatype.h | 22 ++++++++++++++++++++
 include/nftables.h |  3 +++
 src/datatype.c     | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 src/evaluate.c     | 29 +++++++++++++++++++-------
 src/libnftables.c  | 17 +++++++++++++++
 src/meta.c         | 43 +++++++++++++++++++-------------------
 6 files changed, 136 insertions(+), 30 deletions(-)
Signature · 1 line
2.41.0