Linux Netfilter development
 help / color / mirror / Atom feed
From: Eric Garver <eric@garver.life>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org, phil@nwl.cc
Subject: Re: [PATCH nft] json: collapse set element commands from parser
Date: Fri, 1 Nov 2024 10:55:24 -0400	[thread overview]
Message-ID: <ZyTr3OJ5i79aTc_Z@egarver-mac> (raw)
In-Reply-To: <20241031220411.165942-1-pablo@netfilter.org>

On Thu, Oct 31, 2024 at 11:04:11PM +0100, Pablo Neira Ayuso wrote:
> Update json parser to collapse {add,create} element commands to reduce
> memory consumption in the case of large sets defined by one element per
> command:
> 
> {"nftables": [{"add": {"element": {"family": "ip", "table": "x", "name":
> "y", "elem": [{"set": ["1.1.0.0"]}]}}},...]}
> 
> Add CTX_F_COLLAPSED flag to report that command has been collapsed.
> 
> This patch reduces memory consumption by ~32% this case.
> 
> Fixes: 20f1c60ac8c8 ("src: collapse set element commands from parser")
> Reported-by: Eric Garver <eric@garver.life>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>

Thanks Pablo!

Tested-by: Eric Garver <eric@garver.life>


  reply	other threads:[~2024-11-01 14:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-31 22:04 [PATCH nft] json: collapse set element commands from parser Pablo Neira Ayuso
2024-11-01 14:55 ` Eric Garver [this message]
2024-11-05 13:35 ` Phil Sutter
2024-11-05 16:51   ` Pablo Neira Ayuso
2024-11-05 17:07     ` Phil Sutter
2024-11-13 11:08       ` improving json error reporting [was Re: [PATCH nft] json: collapse set element commands from parser] Pablo Neira Ayuso
2024-11-13 14:18         ` Phil Sutter
2024-11-12 20:52 ` [PATCH nft] json: collapse set element commands from parser Phil Sutter
2024-11-13 11:01   ` Pablo Neira Ayuso
2024-11-13 11:34     ` Pablo Neira Ayuso
2024-11-13 14:35     ` Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZyTr3OJ5i79aTc_Z@egarver-mac \
    --to=eric@garver.life \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox