Re: [PATCH] tcp: update outdated comment for removed _decode_session6()
From: Kuniyuki Iwashima
Date: Sat Mar 21 2026 - 10:00:25 EST
On Sat, Mar 21, 2026 at 4:00 AM Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx> wrote:
>
> The function _decode_session6() was moved to
> net/xfrm/xfrm_policy.c and renamed to decode_session6() by commit
> c53ac41e3720 ("xfrm: remove decode_session indirection from
> afinfo_policy"), and was later refactored to use flow dissector
> instead of accessing IP6CB() directly by commit 7a0207094f1b
> ("xfrm: policy: replace session decode with flow dissector").
>
> Replace the stale function reference with a general description of
> the ordering constraint.
>
> Assisted-by: unnamed:deepseek-v3.2 coccinelle
> Signed-off-by: Kexin Sun <kexinsun@xxxxxxxxxxxxxxxx>
> ---
> net/ipv6/tcp_ipv6.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index d10487b4e5bf..84d95e76085a 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -1690,7 +1690,7 @@ static void tcp_v6_fill_cb(struct sk_buff *skb, const struct ipv6hdr *hdr,
> {
> /* This is tricky: we move IP6CB at its correct location into
> * TCP_SKB_CB(). It must be done after xfrm6_policy_check(), because
Is the second sentence still true after the flow dissector
commit ?
> - * _decode_session6() uses IP6CB().
> + * the flow decoding during XFRM policy check uses IP6CB().
> * barrier() makes sure compiler won't play aliasing games.
> */
> memmove(&TCP_SKB_CB(skb)->header.h6, IP6CB(skb),
> --
> 2.25.1
>