All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Florian Westphal <fw@strlen.de>,
	netfilter-devel@vger.kernel.org
Subject: Re: [nf-next PATCH 0/5] nf_tables: nft_rule_dump_ctx fits into netlink_callback
Date: Thu, 5 Oct 2023 10:02:05 +0200	[thread overview]
Message-ID: <20231005080205.GA11420@breakpoint.cc> (raw)
In-Reply-To: <20230929191922.6230-1-phil@nwl.cc>

Phil Sutter <phil@nwl.cc> wrote:
> Struct netlink_callback has a 48byte scratch area for use by dump
> callbacks to keep personal stuff.
> 
> In rule dumps set up by nf_tables_getrule(), this is used only to store
> a cursor into the list of rules being dumped. Other data is allocated
> and the pointer value assigned to struct netlink_callback::data.
> 
> Since the allocated data structure is small and fits into the scratch
> area even after adding some more fields, move it there.
> 
> Patch 1 "simplifies" nf_tables_dump_rules_start() a bit, but actually
> exists only to reduce patch 5's size.
> 
> Patch 2 is more or less fallout: The memset would mess things up after
> this series, but it was pointless in the first place.
> 
> Patches 3 and 4 extend struct nft_rule_dump_ctx and make
> struct netlink_callback's scratch area unused.
> 
> Patch 5 then finally eliminates the allocation.
> 
> All this is early preparation for reset command locking but unrelated
> enough to go alone.

LGTM, I've applied this to nf-next:testing to have the buildbots
check it out.

      parent reply	other threads:[~2023-10-05 16:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 19:19 [nf-next PATCH 0/5] nf_tables: nft_rule_dump_ctx fits into netlink_callback Phil Sutter
2023-09-29 19:19 ` [nf-next PATCH 1/5] netfilter: nf_tables: Always allocate nft_rule_dump_ctx Phil Sutter
2023-09-29 19:19 ` [nf-next PATCH 2/5] netfilter: nf_tables: Drop pointless memset when dumping rules Phil Sutter
2023-09-29 19:19 ` [nf-next PATCH 3/5] netfilter: nf_tables: Carry reset flag in nft_rule_dump_ctx Phil Sutter
2023-09-29 19:19 ` [nf-next PATCH 4/5] netfilter: nf_tables: Carry s_idx " Phil Sutter
2023-09-29 19:19 ` [nf-next PATCH 5/5] netfilter: nf_tables: Don't allocate nft_rule_dump_ctx Phil Sutter
2023-10-05  8:02 ` Florian Westphal [this message]

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=20231005080205.GA11420@breakpoint.cc \
    --to=fw@strlen.de \
    --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 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.