mptcp: allow the in kernel PM to set MPC subflow priority
authorPaolo Abeni <pabeni@redhat.com>
Mon, 11 Jul 2022 19:16:31 +0000 (12:16 -0700)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jul 2022 01:37:19 +0000 (18:37 -0700)
commitc157bbe776b799fba885577e193e94068cefe9c7
tree4d844dddc72bff7197fc7d4faa0c9c189b057336
parentbedee0b561138346967cf1443f2afd1b48b3148f
mptcp: allow the in kernel PM to set MPC subflow priority

Any local endpoints configured on the address matching the
MPC subflow are currently ignored.

Specifically, setting a backup flag on them has no effect
on the first subflow, as the MPC handshake can't carry such
info.

This change refactors the MPC endpoint id accounting to
additionally fetch the priority info from the relevant endpoint
and eventually trigger the MP_PRIO handshake as needed.

As a result, the MPC subflow now switches to backup priority
after that the MPTCP socket is fully established, according
to the local endpoint configuration.

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_netlink.c