Subject: Re: [PATCH ipsec-next v5 06/17] xfrm: add mode_cbs module functionality

From: Sabrina Dubroca <[email-masked]>
Date: Thu, 25 Jul 2024 15:32:18 +0200

2024-07-14, 16:22:34 -0400, Christian Hopps wrote:
> +struct xfrm_mode_cbs {

It would be nice to add kdoc for the whole thing.

> diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
> index 7cee9c0a2cdc..6ff05604f973 100644
> --- a/net/xfrm/xfrm_input.c
> +++ b/net/xfrm/xfrm_input.c
> @@ -494,6 +497,10 @@ int xfrm_input(struct sk_buff *skb, int nexthdr, __be32 spi, int encap_type)
>  
>  		family = x->props.family;
>  
> +		/* An encap_type of -3 indicates reconstructed inner packet */

And I think it's time to document all the encap_types above the
function (and in particular, how xfrm_inner_mode_input/encap_type=-3
pair together), and/or define some constants. Also, is -2 used
anywhere (I only see -1 and -3)? If not, then why -3?

-- 
Sabrina