selftests: mptcp: add ip mptcp wrappers
authorGeliang Tang <geliang.tang@suse.com>
Sat, 5 Feb 2022 00:03:32 +0000 (16:03 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Feb 2022 04:30:23 +0000 (20:30 -0800)
commit34aa6e3bccd8620ca07f47b52dfd144c2418690a
tree8f6bb97d8c1f8dadbd4080cbd8f7592f5b4f5e84
parent33397b83eee6417ab144966743024cd7c0e55a9a
selftests: mptcp: add ip mptcp wrappers

This patch added four basic 'ip mptcp' wrappers:

pm_nl_set_limits()
pm_nl_add_endpoint()
pm_nl_del_endpoint()
pm_nl_flush_endpoint().

Wrapped the PM netlink commands 'ip mptcp' and 'pm_nl_ctl' in them, and
used a new argument 'ip_mptcp' to choose which one to use for setting the
PM limits, adding or deleting the PM endpoint.

Used the wrappers in all the selftests in mptcp_join.sh instead of using
the pm_nl_ctl commands directly.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/mptcp/mptcp_join.sh