]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mptcp: add wrapper for setting flags
authorGeliang Tang <geliang.tang@suse.com>
Sat, 5 Feb 2022 00:03:34 +0000 (16:03 -0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 5 Feb 2022 04:30:24 +0000 (20:30 -0800)
commit4d0e495c894c33e84c7607fa000943b6a6a75465
tree4e3563c395f20dcc15129763f59fb0498aee6305
parent7581a04d85ca4ee3886b50bcb711e356dd012de5
selftests: mptcp: add wrapper for setting flags

This patch implemented a new function named pm_nl_set_endpoint(), wrapped
the PM netlink commands 'ip mptcp endpoint change flags' and 'pm_nl_ctl
set flags' in it, and used a new argument 'ip_mptcp' to choose which one
to use to set the flags of the PM endpoint.

'ip mptcp' used the ID number argument to find out the address to change
flags, while 'pm_nl_ctl' used the address and port number arguments. So
we need to parse the address ID from the PM dump output as well as the
address and port number.

Used this wrapper in do_transfer() instead of using the pm_nl_ctl command
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