mptcp: consolidate initial ack seq generation
authorPaolo Abeni <pabeni@redhat.com>
Fri, 25 Nov 2022 22:29:49 +0000 (23:29 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 30 Nov 2022 04:24:25 +0000 (20:24 -0800)
commitb3ea6b272d79a43baaaa9af871ee66f6fda4688f
tree8bf89e6610ebfbe5289d83a3f7a90082e6eb29cf
parentfe33d38626779ffcc1c88204b1931774dc204cb5
mptcp: consolidate initial ack seq generation

Currently the initial ack sequence is generated on demand whenever
it's requested and the remote key is handy. The relevant code is
scattered in different places and can lead to multiple, unneeded,
crypto operations.

This change consolidates the ack sequence generation code in a single
helper, storing the sequence number at the subflow level.

The above additionally saves a few conditional in fast-path and will
simplify the upcoming fast-open implementation.

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/options.c
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c