Configure MP-DCCP

Enable MP-DCCP on physical interfaces

MP-DCCP has to be enabled on both ends (client and server), on each one of the interfaces intended to transmit traffic.

>printf "0x%x\n" $((($(cat "/sys/class/net/<interface_name>/flags"))|0x200000)) > "/sys/class/net/<interface_name>/flags"

Load module

>modprobe mpdccp
>echo 1 > /sys/module/mpdccp/parameters/mpdccp_debug // Optional enable debugging

Scheduler selection

Traffic steering is managed by a modular scheduler architecture. Different scheduling algorithms are developed as independent modules and can be selected via the Linux sysctl interface after the mp-dccp module is loaded.

>sysctl net.mpdccp.mpdccp_scheduler=<sched module name>

The algorithms available are:

  • Default: Selects the first available path - module name = default
  • SRTT: Selects the path with the lowest estimated rtt - module name = srtt
  • Round Robin: Iterates over the available paths (load balancing) - module name = rr
  • Redundant: Sends the same data over all the available paths - module name = redundant
  • OTIAS: Out-of-Order Transmission for In-Order Arrival
  • CPF:Allocates packets based on a predefined path priority, if the prioritized path is congested, the next available path is selected for transmission - module name = cpf
  • Handover: Allocates packets based on a predefined path priority, if the prioritazed path is broken, the next available path is selected for transmission - module name = handover

Path manager selection

The establishment of DCCP flows within the MP-DCCP connection is part of the path management. Different path managers are developed as independent modules and can be selected via the Linux sysctl interface after the mp-dccp module is loaded.

>sysctl net.mpdccp.mpdccp_path_manager=<sched module name>

The algorithms available are:

  • Default: Establishes a DCCP flow per available access link - module name = default

Reordering engine selection

The degree of in-order delivery is determined by the reordering engine on receiver side. Different reordering algorithms are developed as independent modules and can be selected via the Linux sysctl interface after the mp-dccp module is loaded.

>sysctl net.mpdccp.mpdccp_reordering=<sched module name>

The algorithms available are:

  • Default: Forward packages in the order they arrive - module name = default
  • Fixed: Reads packet sequence numbers to verify in order arrival. When a gap is detected, a buffer is used to store received packets until the missing one(s) arrive, or a fixed timer expires. - module name = fixed

Path priority configuration

Priority can be set for each path on client and server side by using the mpdccp link structure, whose information is located under the directory /sys/module/mpdccplink/. Within this directory 2 types of links can be found:

  • Device links: For each network device there is one link structure automatically created
  • Name links: can be created dynamically by the user

Each link has its corresponding directory where meta data is stored, and where specific parameters (like priority) can be configured. Below an example on how to setup priority for device links on client side, and how to create name links and set their priority on server side

### Set Priority for device links on client side ###
echo <prio value> > /sys/module/mpdccplink/links/dev/<netdevice>/mpdccp_prio
# e.g:
echo 0 > /sys/module/mpdccplink/links/dev/eno1/mpdccp_prio

### Set Priority for name links on server side ###
echo mpdccp_lte > /sys/module/mpdccplink/add_link #Create link
echo 1 > /sys/module/mpdccplink/links/name/mpdccp_lte/mpdccp_prio # Set priority

# In a typical half mesh topology the DCCP subflows are established # 
# from one or more interfaces in client side towards one interface #
# on server side. In that case fw marks can be used to match the traffic # 
# from the different subflows and make possible the assignation of priority.#
printf %d 0xc0000000 > /sys/module/mpdccplink/links/name/mpdccp_lte/mpdccp_match_mask 
printf %d 0xc0000000 > /sys/module/mpdccplink/links/name/mpdccp_lte/mpdccp_match_mark
# e.g:
echo 0 > /sys/module/mpdccplink/links/name/mpdccp_lte/mpdccp_prio

Congestion Control selection and queue setup

MP-DCCP can work with two different congestion control algorithms: CCID2, which is the default CCID for DCCP, and CCID5 which corresponds to an implementation of BBR for DCCP (for more details see here). The below configuration shows how to select each CCID and how to set different network buffers to achieve best possible performance with each one.

#### CCID2 configuration ###
sysctl -w net.dccp.default.tx_ccid=2
sysctl -w net.dccp.default.rx_ccid=2

##
echo 20000 > /proc/sys/net/dccp/default/tx_qlen

## Default and maximum amount for the receive socket memory ##
echo 20000000 > /proc/sys/net/core/rmem_max
echo 20000000 > /proc/sys/net/core/rmem_default

## Default and maximum amount for the send socket memory ##
## Having a larger value avoids the cycle sleep/wakeup/send ## 
## on a waitqueue in the dccp_sendmsg() function, wich might ##
## not be very efficient at hihgh throughput##
echo 20000000 > /proc/sys/net/core/wmem_max
echo 20000000 > /proc/sys/net/core/wmem_default
echo 1000000 > /proc/sys/net/core/netdev_max_backlog

#### CCID5 configuration ###
sysctl -w net.dccp.default.tx_ccid=5
sysctl -w net.dccp.default.rx_ccid=5
tc qdisc replace dev eno1 root fq flow_limit 2000
echo 1000 > /proc/sys/net/dccp/default/tx_qlen
echo 20000000 > /proc/sys/net/core/rmem_max
echo 2000000 > /proc/sys/net/core/rmem_default
echo 20000000 > /proc/sys/net/core/wmem_max
echo 2000000 > /proc/sys/net/core/wmem_default
echo 1000000 > /proc/sys/net/core/netdev_max_backlog