OSDN Git Service

mptcp: add the outgoing MP_PRIO support
authorGeliang Tang <geliangtang@gmail.com>
Sat, 9 Jan 2021 00:47:57 +0000 (16:47 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 Jan 2021 02:18:43 +0000 (18:18 -0800)
commit067065422fcd625492efb7ba130adb8ac1bd8078
tree97da762e7bb7f72a2175571a6b5baf9940572052
parentdc8eb10e95a88143b1957dfcce37fc4c91218e69
mptcp: add the outgoing MP_PRIO support

This patch added the outgoing MP_PRIO logic:

In mptcp_pm_nl_mp_prio_send_ack, find the related subflow and subsocket
according to the input parameter addr. Save the input priority value to
suflow's backup, then set subflow's send_mp_prio flag to true, and save
the input priority value to suflow's request_bkup. Finally, send out a
pure ACK on the related subsocket.

In mptcp_established_options_mp_prio, check whether the subflow's
send_mp_prio is set. If it is, this is the packet for sending MP_PRIO.
So save subflow->request_bkup value to mptcp_out_options's backup, and
change the option type to OPTION_MPTCP_PRIO.

In mptcp_write_options, clear the send_mp_prio flag and send out the
MP_PRIO suboption with mptcp_out_options's backup value.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/options.c
net/mptcp/pm_netlink.c
net/mptcp/protocol.h