mptcp: implement mptcp_pm_remove_subflow
authorGeliang Tang <geliangtang@gmail.com>
Thu, 24 Sep 2020 00:29:55 +0000 (08:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 02:58:34 +0000 (19:58 -0700)
commit0ee4261a36817c441d26ee90ad96f9cc30d678ce
tree460c05bc5cf90cc618f7eb901f971501998eabd5
parentb6c08380860b926752d57c8fa9911fa388c4b876
mptcp: implement mptcp_pm_remove_subflow

This patch implemented the local subflow removing function,
mptcp_pm_remove_subflow, it simply called mptcp_pm_nl_rm_subflow_received
under the PM spin lock.

We use mptcp_pm_remove_subflow to remove a local subflow, so change it's
argument from remote_id to local_id.

We check subflow->local_id in mptcp_pm_nl_rm_subflow_received to remove
a subflow.

Suggested-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Suggested-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm.c
net/mptcp/pm_netlink.c
net/mptcp/protocol.h