Re: [PATCH nft] json: collapse set element commands from parser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>

Thanks Pablo!

Tested-by: Eric Garver <eric@xxxxxxxxxxx>





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux