Re: [PATCH ipsec-next v5 08/17] xfrm: iptfs: add new iptfs xfrm mode impl
From: Christian Hopps <hidden>
Date: 2024-07-31 16:32:34
From: Christian Hopps <hidden>
Date: 2024-07-31 16:32:34
Sabrina Dubroca [off-list ref] writes:
2024-07-14, 16:22:36 -0400, Christian Hopps wrote:quoted
+struct xfrm_iptfs_config { + u32 pkt_size; /* outer_packet_size or 0 */Please convert this to kdoc.
Done.
quoted
+}; + +struct xfrm_iptfs_data { + struct xfrm_iptfs_config cfg; + + /* Ingress User Input */ + struct xfrm_state *x; /* owning state */And this too.
Done.
quoted
+ u32 payload_mtu; /* max payload size */ +};quoted
+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.