Subject: Re: [PATCH ipsec-next v5 08/17] xfrm: iptfs: add new iptfs xfrm mode impl

From: Christian Hopps <[email-masked]>
Date: Wed, 31 Jul 2024 12:29:06 -0400

Sabrina Dubroca <[email-masked]> writes:

> 2024-07-14, 16:22:36 -0400, Christian Hopps wrote:
>> +struct xfrm_iptfs_config {
>> +	u32 pkt_size;	    /* outer_packet_size or 0 */
>
> Please convert this to kdoc.

Done.

>> +};
>> +
>> +struct xfrm_iptfs_data {
>> +	struct xfrm_iptfs_config cfg;
>> +
>> +	/* Ingress User Input */
>> +	struct xfrm_state *x;	    /* owning state */
>
> And this too.

Done.

>> +	u32 payload_mtu;	    /* max payload size */
>> +};
>
>
>> +static int iptfs_create_state(struct xfrm_state *x)
>> +{
>> +	struct xfrm_iptfs_data *xtfs;
>> +	int err;
>> +
>> +	xtfs = kzalloc(sizeof(*xtfs), GFP_KERNEL);
>> +	if (!xtfs)
>> +		return -ENOMEM;
>> +
>> +	err = __iptfs_init_state(x, xtfs);
>> +	if (err)
>> +		return err;
>
> BTW, I wrote that this was leaking xtfs in my previous review, back in
> March :/

I went back through your earlier review again. The next patch set adds the queue flush/cleanup on state delete, and uses a new MIB direction independent MIB counter for failed skb alloc -- which you identified as well.

Thanks,
Chris.