Subject: Re: [devel-ipsec] [PATCH ipsec-next, v2] xfrm: support sending NAT keepalives in ESP in UDP states

From: Michael Richardson <[email-masked]>
Date: Sun, 10 Dec 2023 13:47:35 -0500

+		BUILD_BUG_ON(XFRMA_MAX != XFRMA_NAT_KEEPALIVE_INTERVAL);

This code was there before, and you are just updating it, but I gotta wonder
about it.  It feels very not-DRY.
It seems to be testing that XFRMA_MAX was updated correctly in the header
file, and I guess I'm dubious about where it is being done.

I said last year at the workshop that I'd start a tree on documentation for
XFRM stuff, and I've managed to actually start that, and I'll attempt to use
this new addition as template.

As a general comment, until this work is RCU'ed I'm wondering how it will
perform on systems with thousands of SAs. As you say: this is a place for
improvement.  If no keepalives are set, does the code need to walk the xfrm
states at all.  I wonder if that might mitigate the situation for bigger
systems that have not yet adapted.  I don't see a way to not include this
code.