OSDN Git Service

mptcp: unify pm get_local_id interfaces
authorGeliang Tang <geliang.tang@suse.com>
Thu, 8 Jun 2023 13:20:50 +0000 (15:20 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Jun 2023 07:05:59 +0000 (00:05 -0700)
commit9bbec87ecfe8a5c06710100a93e6b7e66f2cbbaf
tree464719c001d141f260fd43c0389de515cd85bf20
parentdc886bce753cc2cf3c88ec5c7a6880a4e17d65ba
mptcp: unify pm get_local_id interfaces

This patch unifies the three PM get_local_id() interfaces:

mptcp_pm_nl_get_local_id() in mptcp/pm_netlink.c for the in-kernel PM and
mptcp_userspace_pm_get_local_id() in mptcp/pm_userspace.c for the
userspace PM.

They'll be switched in the common PM infterface mptcp_pm_get_local_id()
in mptcp/pm.c based on whether mptcp_pm_is_userspace() or not.

Also put together the declarations of these three functions in protocol.h.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm.c
net/mptcp/pm_netlink.c
net/mptcp/protocol.h