netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Netfilter Development <netfilter-devel@vger.kernel.org>
Subject: Re: libnetfilter_queue patch ping
Date: Sun, 20 Aug 2023 23:34:34 +0200	[thread overview]
Message-ID: <ZOKG6nnqEY9v6ctp@calendula> (raw)
In-Reply-To: <ZOAvByRubG+0lVHX@slk15.local.net>

On Sat, Aug 19, 2023 at 12:55:03PM +1000, Duncan Roe wrote:
> There is a libnetfilter_queue patch of mine from the March 2022 that is still
> under review in Patchwork:
> 
> https://patchwork.ozlabs.org/project/netfilter-devel/patch/20220328024821.9927-1-duncan_roe@optusnet.com.au/
> 
> I tested recently with 63KB packets: overall CPU decrease 20%, user CPU decrease
> 50%.

I just took the bare minimum of this patch to provide more control on
memory management as you request, it is here:

http://git.netfilter.org/libnetfilter_queue/commit/?id=91d2c947b473b3540be5474c7128a5fa4ce60934

I have removed the extra callback wrapper which does not provide much
but an extra layer to the user.

> This patch could open an avenue to having libnetfilter_queue handle tunneling.
> E.g. for tcp over udp, you could have 2 pktbuff structs (because the data area
> can be anywhere, rather than residing after the pktbuff head).

Please, do not pursue this approach, this pkt_buff structure is
mocking the sk_buff API in the kernel in a very simplistic way. You
can still implement such tunnel handling in your application.

Thanks.

  reply	other threads:[~2023-08-20 21:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-19  2:55 libnetfilter_queue patch ping Duncan Roe
2023-08-20 21:34 ` Pablo Neira Ayuso [this message]
2023-08-21  0:14   ` Duncan Roe
  -- strict thread matches above, loose matches on Subject: below --
2024-02-05  4:21 Duncan Roe
2024-06-03  6:25 Duncan Roe

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=ZOKG6nnqEY9v6ctp@calendula \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).