Skip to content

Commit

Permalink
mptcpd 0.6
Browse files Browse the repository at this point in the history
- Mptcpd now supports versions of the Embedded Linux Library (ELL)
  greater than 0.33.

- Plugins should use the new MPTCPD_PLUGIN_DEFINE() preprocessor macro
  instead of L_PLUGIN_DEFINE().

- A pointer to the mptcpd path manager object, i.e. struct mptcpd *pm,
  is now passed to the plugin init and exit functions.  This allows
  plugins to potentially perform mptcpd path manager related
  operations during initialization and finalization.

- Support for the MPTCP netlink path manager in the upstream Linux
  kernel is now available.  A new set of path management command
  functions corresponding to those available in the kernel netlink
  path management API has been added to the `<mptcpd/path_manager.h>'
  header.  The new functions allow plugins to retrieve IP address
  information, flush addresses, and modify MPTCP resource limits.

- The mptcpd_pm_add_addr() (formerly mptcpd_pm_send_addr()) and
  mptcpd_pm_remove_addr() function parameters have been modified in
  order to support both the upstream and multipath-tcp.org kernels.

- Mptcpd path management command functions declared in
  `<mptcpd/path_manager.h>' now return zero on success and -1 or an
  errno on failure instead of a bool.

- A MPTCP address ID manager "mptcpd_idm" interface was introduced
  that mptcpd plugins may leverage to map an IP address to a MPTCP
  address ID, as well as to track used and unused IDs.  The interface
  is defined in the new `<mptcpd/id_manager.h>' header.

- A new address advertising plugin, "addr_adv", has been added.  It
  simply triggers a MPTCP ADD_ADDR when a new IP address is detected
  by the mptcpd network monitor.  Similarly, a MPTCP REMOVE_ADDR is
  triggered when an IP address is no longer available.

- MPTCP netlink command error message logging was improved to be more
  descriptive when possible.
  • Loading branch information
Ossama Othman authored Jan 26, 2021
1 parent a042b34 commit bd3845f
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 39 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
25 January 2021 - mptcpd 0.6

- Mptcpd now supports versions of the Embedded Linux Library (ELL)
greater than 0.33.

Expand Down
11 changes: 8 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
#
# Copyright (c) 2017-2020, Intel Corporation
# Copyright (c) 2017-2021, Intel Corporation

AC_PREREQ([2.69])
AC_INIT([mptcpd],
[0.5],
[0.6],
[[email protected]],
[],
[https://01.org/multipath-tcp-linux])
Expand Down Expand Up @@ -147,7 +147,12 @@ AS_IF([test "x$ax_enable_debug" != "xyes"],
dnl AX_ENABLE_DEBUG macro disables the autoconf default of
dnl implicitly adding it.
AS_IF([test "x$enable_code_coverage" != "xyes"],
[AX_APPEND_COMPILE_FLAGS([-O2])])
[AX_APPEND_COMPILE_FLAGS([-O2])
AC_LANG_PUSH([C++])
AX_APPEND_COMPILE_FLAGS([-O2])
AC_LANG_POP([C++])
])
dnl AX_CODE_COVERAGE will define NDEBUG on the command line,
dnl equivalent to #define NDEBUG 1, if code coverage is
Expand Down
10 changes: 0 additions & 10 deletions src/path_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,16 +920,6 @@ static void complete_mptcp_org_kernel_pm_init(struct mptcpd_pm *pm)
static void dump_addrs_callback(struct mptcpd_addr_info const *info,
void *callback_data)
{
/**
* @todo The kernel's pm_netlink path manager doesn't generate
* dump reply containing an array. Rather a separate
* dump is sent for each set of address/ID information.
* In particular, this callback will be called once per
* address/ID. There is no need for the @a len
* parameter and should be entirely removed from the
* API.
*/

char addrstr[INET6_ADDRSTRLEN]; // Long enough for both IPv4
// and IPv6 addresses.

Expand Down
13 changes: 5 additions & 8 deletions tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## SPDX-License-Identifier: BSD-3-Clause
##
## Copyright (c) 2017-2020, Intel Corporation
## Copyright (c) 2017-2021, Intel Corporation

include $(top_srcdir)/aminclude_static.am

Expand Down Expand Up @@ -28,17 +28,14 @@ check_PROGRAMS = \
test-configuration \
test-id-manager

## Test scripts expected to fail due to intentionally bad mptcpd
## command line options. Successful exit will be treated as failure.
xfail_test_scripts = \
dist_check_SCRIPTS = \
test-bad-log-empty \
test-bad-log-long \
test-bad-log-short \
test-bad-option \
test-bad-path-manager \
test-bad-plugin-dir

dist_check_SCRIPTS = test-start-stop $(xfail_test_scripts)
test-bad-plugin-dir \
test-start-stop

test_plugin_SOURCES = test-plugin.c
test_plugin_CPPFLAGS = \
Expand Down Expand Up @@ -113,7 +110,7 @@ endif

AM_TESTS_ENVIRONMENT = TEST_PLUGIN_DIR=$(TEST_PLUGIN_DIR_NOOP)
TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
XFAIL_TESTS = $(xfail_test_scripts)
XFAIL_TESTS = test-commands

# Clean up code coverage related generated files.
clean-local: code-coverage-clean
10 changes: 7 additions & 3 deletions tests/test-bad-log-empty
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test empty mptcpd "--log" command line option.
#
# Copyright (c) 2019, Intel Corporation
# Copyright (c) 2019, 2021, Intel Corporation


set -e

../src/mptcpd --log=

# Command line usage error exit code. See <sysexits.h>
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE
10 changes: 7 additions & 3 deletions tests/test-bad-log-long
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test bad mptcpd "--log" long command line option.
#
# Copyright (c) 2019, Intel Corporation
# Copyright (c) 2019, 2021, Intel Corporation


set -e

../src/mptcpd --log=foo

# Command line usage error exit code. See <sysexits.h>
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE
10 changes: 7 additions & 3 deletions tests/test-bad-log-short
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test bad mptcpd "-l" short command line option.
#
# Copyright (c) 2019, Intel Corporation
# Copyright (c) 2019, 2021, Intel Corporation


set -e

../src/mptcpd -l foo

# Command line usage error exit code. See <sysexits.h>
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE
10 changes: 7 additions & 3 deletions tests/test-bad-option
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test unknown command line option.
#
# Copyright (c) 2018, 2019, Intel Corporation
# Copyright (c) 2018-2019, 2021, Intel Corporation


set -e

../src/mptcpd --foo

# Command line usage error exit code. See <sysexits.h>
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE
10 changes: 7 additions & 3 deletions tests/test-bad-path-manager
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test bad mptcpd "--path-manager" command line option.
#
# Copyright (c) 2019, Intel Corporation
# Copyright (c) 2019, 2021, Intel Corporation


set -e

../src/mptcpd --path-manager=

# Command line usage error exit code. See <sysexits.h>
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE
10 changes: 7 additions & 3 deletions tests/test-bad-plugin-dir
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@

# Test bad mptcpd "--plugin-dir" command line option.
#
# Copyright (c) 2019, Intel Corporation
# Copyright (c) 2019, 2021, Intel Corporation


set -e

../src/mptcpd --plugin-dir=

# Command line usage error exit code. See <sysexits.h>.
EX_USAGE=64

# mptcpd should have exited with an EX_USAGE exit code.
test $? != $EX_USAGE

0 comments on commit bd3845f

Please sign in to comment.