All of lore.kernel.org
 help / color / mirror / Atom feed
From: "G.W. Haywood" <ged@jubileegroup.co.uk>
To: Cristian Constantin <const.crist@googlemail.com>
Cc: netfilter@vger.kernel.org
Subject: Re: nft set load metrics
Date: Thu, 30 Sep 2021 18:34:52 +0100 (BST)	[thread overview]
Message-ID: <b943f279-73a-303e-3244-ed7fd4d4949@jubileegroup.co.uk> (raw)
In-Reply-To: <CANCV4NP-9qTA+ehWNMT5-WEkomWkKrLWg30vcuEYaihs6a3sww@mail.gmail.com>

Hi there,

On Thu, 30 Sep 2021, Cristian Constantin wrote:

> ... reading large packets over netlink sockets just to count the
> elements in the sets does not seem very efficient.

Agreed.

It seems to me that if you need to read what you've put in the sets
for the purposes of some facility, then you need to store it in RAM.

It doesn't make sense to me to try to use netfilter as a kind of RAM;
as you say that will be very inefficient.

Presumably it was you who created the elements, can you not simply
store them e.g. in a Perl hash at the time they're created?  I do
something similar using Net::CIDR::Lite.  (I would never claim that a
Perl script is the most efficient way of doing it, nor anything else
for that matter, but it gets the job done. :)

-- 

73,
Ged.

  reply	other threads:[~2021-09-30 17:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 11:21 nft set load metrics Cristian Constantin
2021-09-30 14:00 ` Pablo Neira Ayuso
2021-09-30 15:47   ` Cristian Constantin
2021-09-30 17:34     ` G.W. Haywood [this message]
2021-09-30 18:12       ` Pablo Neira Ayuso
2021-09-30 19:01       ` Cristian Constantin
2021-09-30 18:04     ` Pablo Neira Ayuso
2021-09-30 18:46       ` Cristian Constantin
2021-10-02 11:54       ` Pablo Neira Ayuso

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=b943f279-73a-303e-3244-ed7fd4d4949@jubileegroup.co.uk \
    --to=ged@jubileegroup.co.uk \
    --cc=const.crist@googlemail.com \
    --cc=netfilter@vger.kernel.org \
    /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 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.