Re: [PATCH v2] tcp: update outdated comment for removed _decode_session6()
From: Eric Dumazet
Date: Mon Mar 23 2026 - 16:41:10 EST
On Sat, Mar 21, 2026 at 10:24 PM Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx> wrote:
>
> The comment in tcp_v6_fill_cb() states that the memmove of
> IP6CB into TCP_SKB_CB must be done after xfrm6_policy_check()
> because _decode_session6() uses IP6CB().
>
> This ordering constraint was introduced by commit 2dc49d1680b5
> ("tcp6: don't move IP6CB before xfrm6_policy_check()") and was
> valid at the time. However, commit 7a0207094f1b ("xfrm: policy:
> replace session decode with flow dissector") replaced the
> per-family decode_session callbacks with the flow dissector,
> which parses packet headers directly without accessing IP6CB().
>
> Since xfrm6_policy_check() no longer reads IP6CB() anywhere in
> its call chain, the ordering constraint no longer applies.
> Simplify the comment to describe only what the memmove and
> barrier() actually do.
Adding Florian to this thread.
So... the real question is :
Do we still need to call tcp_v6_fill_cb() from 4 different points,
and having this dance with tcp_v6_restore_cb() ?
Otherwise I see no real value in rephrasing a comment...