All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH nft 0/4] add operation cache for timestamp
@ 2023-08-25 13:24 Thomas Haller
  2023-08-25 13:24 ` [PATCH nft 1/4] evaluate: add and use parse_ctx_init() helper method Thomas Haller
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Thomas Haller @ 2023-08-25 13:24 UTC (permalink / raw)
  To: NetFilter; +Cc: Thomas Haller

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(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-08-29 15:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-25 13:24 [PATCH nft 0/4] add operation cache for timestamp Thomas Haller
2023-08-25 13:24 ` [PATCH nft 1/4] evaluate: add and use parse_ctx_init() helper method Thomas Haller
2023-08-25 13:24 ` [PATCH nft 2/4] src: add ops_cache struct for caching information during parsing Thomas Haller
2023-08-28 15:00   ` Pablo Neira Ayuso
2023-08-25 13:24 ` [PATCH nft 3/4] src: cache result of time() during parsing/output Thomas Haller
2023-08-28 15:02   ` Pablo Neira Ayuso
2023-08-25 13:24 ` [PATCH nft 4/4] src: cache GMT offset for current time " Thomas Haller
2023-08-29 15:38 ` [PATCH nft 0/4] add operation cache for timestamp Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.