public inbox for netfilter-devel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org, Yiming Qian <yimingqian591@gmail.com>
Subject: Re: [PATCH v2 nf] netfilter: nft_set_pipapo: split gc in unlink and reclaim phase
Date: Tue, 10 Mar 2026 18:44:57 +0100 (CET)	[thread overview]
Message-ID: <20260310184455.3ab682f0@elisabeth> (raw)
In-Reply-To: <abBXVm9Fh1ZjkKG6@strlen.de>

On Tue, 10 Mar 2026 18:39:34 +0100
Florian Westphal <fw@strlen.de> wrote:

> Stefano Brivio <sbrivio@redhat.com> wrote:
> > Sorry for the late review. Just one (perhaps dumb) question:  
> 
> No problem, thanks for reviewing.
> 
> > >  	struct nft_pipapo *priv = nft_set_priv(set);
> > >  	struct net *net = read_pnet(&set->net);
> > > @@ -1697,6 +1697,8 @@ static void pipapo_gc(struct nft_set *set, struct nft_pipapo_match *m)
> > >  	if (!gc)
> > >  		return;
> > >  
> > > +	list_add(&gc->list, &priv->gc_head);  
> > 
> > ...is there a reason why we need to do this unconditionally, or could
> > we do this opportunistically if (__nft_set_elem_expired(&e->ext,
> > tstamp)) below, including the nft_trans_gc_alloc() call?  
> 
> Yes, its to make sure we run the catchall gc, which is external
> to the pipapo core datastructure.

Ah, right, it wouldn't run otherwise, I missed that. Thanks for
explaining.

> I admit we could be more clever and try to supress this
> gc container allocation, but I preferred to keep it simpler for now.

Yeah it sounds very reasonable.

-- 
Stefano


      reply	other threads:[~2026-03-10 17:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  5:36 [PATCH v2 nf] netfilter: nft_set_pipapo: split gc in unlink and reclaim phase Florian Westphal
2026-03-10 16:02 ` Stefano Brivio
2026-03-10 17:39   ` Florian Westphal
2026-03-10 17:44     ` Stefano Brivio [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=20260310184455.3ab682f0@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=yimingqian591@gmail.com \
    /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