Subject: Re: [devel-ipsec] [PATCH ipsec-next v4 05/18] xfrm: netlink: add config (netlink) options

From: Christian Hopps <[email-masked]>
Date: Wed, 26 Jun 2024 09:38:57 -0400

Antony Antony via Devel <[email-masked]> writes:

> On Mon, Jun 17, 2024 at 04:53:03PM -0400, Christian Hopps via Devel wrote:
>> From: Christian Hopps <[email-masked]>
>>
>> Add netlink options for configuring IP-TFS SAs.
>>
>> Signed-off-by: Christian Hopps <[email-masked]>
>> ---
>>  include/uapi/linux/xfrm.h |  9 ++++++-
>>  net/xfrm/xfrm_compat.c    | 10 ++++++--
>>  net/xfrm/xfrm_user.c      | 52 +++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 68 insertions(+), 3 deletions(-)
>>
>> diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
>> index 18ceaba8486e..3bd1f810e079 100644
>> --- a/include/uapi/linux/xfrm.h
>> +++ b/include/uapi/linux/xfrm.h
>> @@ -158,7 +158,8 @@ enum {
>>  #define XFRM_MODE_ROUTEOPTIMIZATION 2
>>  #define XFRM_MODE_IN_TRIGGER 3
>>  #define XFRM_MODE_BEET 4
>> -#define XFRM_MODE_MAX 5
>> +#define XFRM_MODE_IPTFS 5
>> +#define XFRM_MODE_MAX 6
>>
>>  /* Netlink configuration messages.  */
>>  enum {
>> @@ -321,6 +322,12 @@ enum xfrm_attr_type_t {
>>  	XFRMA_IF_ID,		/* __u32 */
>>  	XFRMA_MTIMER_THRESH,	/* __u32 in seconds for input SA */
>>  	XFRMA_SA_DIR,		/* __u8 */
>> +	XFRMA_IPTFS_DROP_TIME,	/* __u32 in: usec to wait for next seq */
>> +	XFRMA_IPTFS_REORDER_WINDOW, /* __u16 in: reorder window size */
>> +	XFRMA_IPTFS_DONT_FRAG,	/* out: don't use fragmentation */
>> +	XFRMA_IPTFS_INIT_DELAY,	/* __u32 out: initial packet wait delay (usec) */
>> +	XFRMA_IPTFS_MAX_QSIZE,	/* __u32 out: max ingress queue size */
>
> +	XFRMA_IPTFS_MAX_QSIZE,	/* __u32 out: max ingress queue size octets */
>
> Add the units in comments? This would help the users.  The "struct
> xfrm_iptfs_config {" mentions it is octets. Adding it to uapi would help the
> users more. The defaults are not so obvious to find.

Will add "octets" to comment (and "pkts" to reorder window comment).

Thanks,
Chris.