netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Hopps <chopps@chopps.org>
To: Antony Antony <antony@phenome.org>
Cc: Christian Hopps <chopps@chopps.org>,
	devel@linux-ipsec.org, netdev@vger.kernel.org,
	Christian Hopps <chopps@labn.net>,
	Steffen Klassert <steffen.klassert@secunet.com>
Subject: Re: [devel-ipsec] [RFC ipsec-next v2 0/8] Add IP-TFS mode to xfrm
Date: Thu, 07 Mar 2024 06:05:37 -0500	[thread overview]
Message-ID: <m2edcmz3ok.fsf@ja.int.chopps.org> (raw)
In-Reply-To: <ZVY9Bh5lKEqQCBrc@Antony2201.local>

[-- Attachment #1: Type: text/plain, Size: 2932 bytes --]


Antony Antony <antony@phenome.org> writes:

> On Sun, Nov 12, 2023 at 10:52:11PM -0500, Christian Hopps via Devel wrote:
>> From: Christian Hopps <chopps@labn.net>
>>
>> This patchset adds a new xfrm mode implementing on-demand IP-TFS. IP-TFS
>> (AggFrag encapsulation) has been standardized in RFC9347.
>>
>> Link: https://www.rfc-editor.org/rfc/rfc9347.txt
>>
>> This feature supports demand driven (i.e., non-constant send rate) IP-TFS to
>> take advantage of the AGGFRAG ESP payload encapsulation. This payload type
>> supports aggregation and fragmentation of the inner IP packet stream which in
>> turn yields higher small-packet bandwidth as well as reducing MTU/PMTU issues.
>> Congestion control is unimplementated as the send rate is demand driven rather
>> than constant.
>>
>> In order to allow loading this fucntionality as a module a set of callbacks
>> xfrm_mode_cbs has been added to xfrm as well.
>
> Hi Chris,
>
> I have further reviewed the code and have a few minor questions, mainly
> related to handling of XFRM_MODE_IPTFS. It appears to me be either some case
> missing support or/and in a few places it should be prohibited. I have three
> types of questions:
>
> 1. missing XFRM_MODE_IPTFS support?
> 2. Will XFRM_MODE_IPTFS be supported this combination?
> 3. Should be prohibited combination with XFRM_MODE_IPTFS
>
> 1.  Missing:
>
> a.  wouldn't xfrm_sa_len() need extending?
>
> I could not find support for XFRM_MODE_IPTFS explicitly.
>
> However, I'm not sure how the following code is working when xfrm_sa_len is
> missing IP-TFS xfrm_sa_len:
>
> copy_to_user_state_extra() {
>     if (x->mode_cbs && x->mode_cbs->copy_to_user)
>         ret = x->mode_cbs->copy_to_user(x, skb);
> }
>
> I have attached what I imagine is a fix. Check with Steffen or others if
> this is necessary.

I have adopted this change with a couple small changes, thanks!

> b. esp6_init_state() and esp_init_state():
> These functions do not seem to handle XFRM_MODE_IPTFS. Would they default to work with it?

That's b/c IPTFS uses ESP w/o modification. IP-TFS makes its own mode based changes (similar to what `esp_init_state()` does) in it's `create_state` callback which like `esp_init_state()` is called from `__xfrm_init_state()`.

> 2. Would xfrm4_outer_mode_gso_segment() xfrm6_outer_mode_gso_segment():
> support XFRM_MODE_IPTFS?
> These functions appear to be missing. Is it possible that you don't support GSO and GRO?

Correct.

> 3: Shouldn't these combinations return error?
>
> a. ipcomp and  XFRM_MODE_IPTFS
> I'm guessing that ipcomp would generate an error when userspace tries to add an SA with XFRM_MODE_IPTFS.
> ipcomp6_init_state()
> ipcomp4_init_state()

Correct.

> b: In xfrm_state_construct():
>
> if (attrs[XFRMA_TFCPAD])
>     x->tfcpad = nla_get_u32(attrs[XFRMA_TFCPAD]);

Can you explain this more?

Thanks,
Chris.

>
> -antony
>
> [2. text/plain; 0001-xfrm-iptfs-extend-xfrm_sa_len.patch]...


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 857 bytes --]

  reply	other threads:[~2024-03-07 11:23 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13  3:52 [RFC ipsec-next v2 0/8] Add IP-TFS mode to xfrm Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 1/8] iptfs: config: add CONFIG_XFRM_IPTFS Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 2/8] iptfs: uapi: ip: add ip_tfs_*_hdr packet formats Christian Hopps
2023-11-20 15:28   ` Sabrina Dubroca
2023-11-20 20:18     ` Christian Hopps
2023-11-20 22:38       ` Sabrina Dubroca
2024-02-01 14:15     ` Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 3/8] iptfs: uapi: IPPROTO_AGGFRAG AGGFRAG in ESP Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 4/8] iptfs: sysctl: allow configuration of global default values Christian Hopps
2023-11-20 23:05   ` Sabrina Dubroca
2024-02-01 13:57     ` Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 5/8] iptfs: netlink: add config (netlink) options Christian Hopps
2023-11-30 15:36   ` Sabrina Dubroca
2023-11-13  3:52 ` [RFC ipsec-next v2 6/8] iptfs: xfrm: Add mode_cbs module functionality Christian Hopps
2023-11-13 14:07   ` [devel-ipsec] " Antony Antony
2023-11-15 19:04     ` Antony Antony
2023-11-30 15:35   ` Sabrina Dubroca
2024-02-01 15:34     ` Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 7/8] iptfs: xfrm: add generic iptfs defines and functionality Christian Hopps
2023-11-13  3:52 ` [RFC ipsec-next v2 8/8] iptfs: impl: add new iptfs xfrm mode impl Christian Hopps
2023-11-30 15:33   ` Sabrina Dubroca
2024-02-02  9:44     ` Christian Hopps
2023-11-13  7:15 ` [RFC ipsec-next v2 0/8] Add IP-TFS mode to xfrm Steffen Klassert
2023-11-16 15:14   ` [devel-ipsec] " Andrew Cagney
2023-11-20 18:39     ` Christian Hopps
2023-11-20 20:00       ` [DKIM] " Antony Antony
2023-11-20 20:02         ` Antony Antony
2023-11-20 20:14         ` Christian Hopps
2023-11-21 19:13   ` Antony Antony
2023-11-16 16:02 ` Antony Antony
2024-03-07 11:05   ` Christian Hopps [this message]
2024-03-10 20:34     ` Antony Antony
2023-11-28 22:12 ` Antony Antony

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2edcmz3ok.fsf@ja.int.chopps.org \
    --to=chopps@chopps.org \
    --cc=antony@phenome.org \
    --cc=chopps@labn.net \
    --cc=devel@linux-ipsec.org \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).