lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m28qxzdyzi.fsf@chopps.org>
Date: Wed, 17 Jul 2024 22:56:04 -0700
From: Christian Hopps <chopps@...pps.org>
To: Simon Horman <horms@...nel.org>
Cc: Christian Hopps <chopps@...pps.org>, Steffen Klassert
 <steffen.klassert@...unet.com>, netdev@...r.kernel.org, Christian Hopps
 <chopps@...n.net>, devel@...ux-ipsec.org
Subject: Re: [devel-ipsec] [PATCH ipsec-next v5 08/17] xfrm: iptfs: add new
 iptfs xfrm mode impl


Simon Horman via Devel <devel@...ux-ipsec.org> writes:

> On Sun, Jul 14, 2024 at 04:22:36PM -0400, Christian Hopps wrote:
>> From: Christian Hopps <chopps@...n.net>
>>
>> Add a new xfrm mode implementing AggFrag/IP-TFS from RFC9347.
>>
>> This utilizes the new xfrm_mode_cbs to implement demand-driven IP-TFS
>> functionality. This functionality can be used to increase bandwidth
>> utilization through small packet aggregation, as well as help solve PMTU
>> issues through it's efficient use of fragmentation.
>>
>>   Link: https://www.rfc-editor.org/rfc/rfc9347.txt
>>
>> Multiple commits follow to build the functionality into xfrm_iptfs.c
>>
>> Signed-off-by: Christian Hopps <chopps@...n.net>
>> ---
>>  net/xfrm/Makefile     |   1 +
>>  net/xfrm/xfrm_iptfs.c | 206 ++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 207 insertions(+)
>>  create mode 100644 net/xfrm/xfrm_iptfs.c
>>
>> diff --git a/net/xfrm/Makefile b/net/xfrm/Makefile
>> index 512e0b2f8514..5a1787587cb3 100644
>> --- a/net/xfrm/Makefile
>> +++ b/net/xfrm/Makefile
>> @@ -21,5 +21,6 @@ obj-$(CONFIG_XFRM_USER) += xfrm_user.o
>>  obj-$(CONFIG_XFRM_USER_COMPAT) += xfrm_compat.o
>>  obj-$(CONFIG_XFRM_IPCOMP) += xfrm_ipcomp.o
>>  obj-$(CONFIG_XFRM_INTERFACE) += xfrm_interface.o
>> +obj-$(CONFIG_XFRM_IPTFS) += xfrm_iptfs.o
>>  obj-$(CONFIG_XFRM_ESPINTCP) += espintcp.o
>>  obj-$(CONFIG_DEBUG_INFO_BTF) += xfrm_state_bpf.o
>> diff --git a/net/xfrm/xfrm_iptfs.c b/net/xfrm/xfrm_iptfs.c
>> new file mode 100644
>> index 000000000000..414035a7a208
>> --- /dev/null
>> +++ b/net/xfrm/xfrm_iptfs.c
>> @@ -0,0 +1,206 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/* xfrm_iptfs: IPTFS encapsulation support
>> + *
>> + * April 21 2022, Christian Hopps <chopps@...n.net>
>> + *
>> + * Copyright (c) 2022, LabN Consulting, L.L.C.
>> + *
>> + */
>> +
>> +#include <linux/kernel.h>
>> +#include <linux/icmpv6.h>
>> +#include <net/gro.h>
>> +#include <net/icmp.h>
>> +#include <net/ip6_route.h>
>> +#include <net/inet_ecn.h>
>> +#include <net/xfrm.h>
>> +
>> +#include <crypto/aead.h>
>> +
>> +#include "xfrm_inout.h"
>> +
>> +struct xfrm_iptfs_config {
>> +	u32 pkt_size;	    /* outer_packet_size or 0 */
>> +};
>> +
>> +struct xfrm_iptfs_data {
>> +	struct xfrm_iptfs_config cfg;
>> +
>> +	/* Ingress User Input */
>> +	struct xfrm_state *x;	    /* owning state */
>> +	u32 payload_mtu;	    /* max payload size */
>> +};
>> +
>> +/* ========================== */
>> +/* State Management Functions */
>> +/* ========================== */
>> +
>> +/**
>> + * iptfs_get_inner_mtu() - return inner MTU with no fragmentation.
>> + * @x: xfrm state.
>> + * @outer_mtu: the outer mtu
>> + */
>
> Hi Christian,
>
> Please consider including a "Return:" or "Returns:" section
> in the Kernel doc for functions that return values.
>
> Likewise elsewhere in this patchset.
>
> Flagged by: ./scripts/kernel-doc -none -Wall
>
>> +static u32 iptfs_get_inner_mtu(struct xfrm_state *x, int outer_mtu)
>
> ...

I've updated all the doc comments to include "Return:"s.

Thanks!
Chris.

Download attachment "signature.asc" of type "application/pgp-signature" (858 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ