From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Ahmed Zaki <anzaki@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf,v2] netfilter: flowtable: tear down flow entries with stale dst from GC
Date: Sun, 12 Jul 2026 21:27:47 +0200 [thread overview]
Message-ID: <alPqs8gMuF1uJuTw@chamomile> (raw)
In-Reply-To: <CANczwAFH_GFK+uTTcpOoogQ8LuY6MRRwe0Q76=rP=F-9bY953g@mail.gmail.com>
On Sun, Jul 12, 2026 at 07:39:25AM -0600, Ahmed Zaki wrote:
> On Sat, Jul 11, 2026 at 3:02 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> >
> .
>
> > > I am testing this patch and keep getting some splats. I am testing
> > > with a MTK7621 hw which
> > > to my understanding, marks the tuple's xmit_type DIRECT (not neigh or XFRM).
> > >
> > > In nft_dev_forward_path(), out.h_source is set and this overrides the
> > > dst_cache (same union)
> > > this seems to be causing the splat when the dst_cache is dereferenced.
> > > (btw, not like his patch,
> > > in the latest HEAD, nf_flow_dst_check() guards tuple->dst_**** by
> > > checks on xmit_type)
> >
> > We have move dst_cache out of the union quite recently so... (see below)
> >
> > > So, to support DIRECT types, we can:
> > > 1 - go back to my v1 patch (no dependency on dst_cache)
> > > 2 - same patch but use dst_check() only for NEIGH/XFRM
> > > 3 - or maybe we can have the dst_cache out of the union and available
> > > for all xmit_types.
> > >
> > > I have some time to work on this, let me know if I can help.
> >
> > ... probably you are missing this series? They got merged quite
> > recently, I am not sure what tree you are using as reference:
>
> yeah, I was looking at nf-next. These seem to be in nf only as of now.
OK.
> > fa7395c02d95 netfilter: flowtable: support IPIP tunnel with direct xmit
> > 6c5dcab95f4c netfilter: flowtable: IPIP tunnel hardware offload is not yet support
> > c328b90c17fc netfilter: flowtable: use dst in this direction when pushing IPIP header
> >
> > There is also this patch which is needed:
> >
> > https://patchwork.ozlabs.org/project/netfilter-devel/patch/20260709114025.1294044-1-pablo@netfilter.org/
> >
> > which has been included in the last PR this Friday.
>
> I have some limitations so I can only test with 6.6 or 6.12. I will
> try to trim down these patches to
> "move dst_cache out of union and use the gc to check all entries" and
> will let you know if I see
> any more problems.
You will have to backport the move of dst_cache out of the union.
> The one thing I believe is still missing is to remove the if condition
> in flow_offload_fill_route()
> when setting "flow_tuple->dst_cache/dst_cookie":
>
> - if (route->tuple[!dir].in.num_tuns) {
>
> We now need "flow_tuple->dst_cache/dst_cookie" for all DIRECT xmit
> even with no tunnels
How so? ->dst_cache is not available when sending packets to a port
behind a master bridge device.
next prev parent reply other threads:[~2026-07-12 19:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 7:54 [PATCH nf,v2] netfilter: flowtable: tear down flow entries with stale dst from GC Pablo Neira Ayuso
2026-07-10 19:55 ` Ahmed Zaki
2026-07-11 21:02 ` Pablo Neira Ayuso
2026-07-12 13:39 ` Ahmed Zaki
2026-07-12 19:27 ` Pablo Neira Ayuso [this message]
2026-07-13 11:46 ` Ahmed Zaki
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=alPqs8gMuF1uJuTw@chamomile \
--to=pablo@netfilter.org \
--cc=anzaki@gmail.com \
--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