+ All Categories
Home > Documents > MultiPath TCP : Linux Kernel implementation - Linux Plumbers

MultiPath TCP : Linux Kernel implementation - Linux Plumbers

Date post: 23-Feb-2022
Category:
Author: others
View: 1 times
Download: 0 times
Share this document with a friend
Embed Size (px)
of 77 /77
MultiPath TCP : Linux Kernel implementation Presenter: Christoph Paasch IP Networking Lab UCLouvain, Belgium August 28, 2012 http://multipath-tcp.org IP Networking Lab http://multipath-tcp.org 1 / 29
Transcript
CMSS12Presenter: Christoph Paasch IP Networking Lab UCLouvain, Belgium
August 28, 2012
Networks are becoming Multipath
Mobile devices can connect to the Internet via different interfaces
3G
WiFi
Internet
Networks are becoming Multipath
Mobile devices can connect to the Internet via different interfaces
3G
WiFi
Internet
IP Networking Lab http://multipath-tcp.org 2 / 29
However, TCP does not support this
Smartphones have to restart their data-transfer when moving away from the WiFi access-point.
IP Networking Lab http://multipath-tcp.org 3 / 29
3G
WiFi
Internet
However, TCP does not support this
Smartphones have to restart their data-transfer when moving away from the WiFi access-point.
IP Networking Lab http://multipath-tcp.org 3 / 29
3G
WiFi
Internet
However, TCP does not support this
Smartphones have to restart their data-transfer when moving away from the WiFi access-point.
IP Networking Lab http://multipath-tcp.org 3 / 29
3G
WiFi
Internet
A B C
A B C
Collisions in data-center reduce the bandwidth and result in suboptimal load-balancing
IP Networking Lab http://multipath-tcp.org 5 / 29
A B C
Collisions in data-center reduce the bandwidth and result in suboptimal load-balancing
IP Networking Lab http://multipath-tcp.org 5 / 29
A B C
Collisions in data-center reduce the bandwidth and result in suboptimal load-balancing
IP Networking Lab http://multipath-tcp.org 5 / 29
A B C
Collisions in data-center reduce the bandwidth and result in suboptimal load-balancing
IP Networking Lab http://multipath-tcp.org 5 / 29
A B C
Mismatch between the multipath network and the single-path transport protocol.
IP Networking Lab http://multipath-tcp.org 6 / 29
MultiPath TCP
IPv4/IPv6 are both supported (even simultaneously)
IP Networking Lab http://multipath-tcp.org 7 / 29
MultiPath TCP
WiFi - IP: A
3G - IP: B
WiFi - IP: A
3G - IP: B
SrcIP: A DstIP: S
SrcIP: S DstIP: A
SYN + ACK MP_CAPABLE: ID23
MultiPath TCP
MultiPath TCP
MultiPath TCP
NAT Firewalls
MultiPath TCP
SrcIP: B DstIP: S
SrcIP: S DstIP: B
MultiPath TCP
write_seq
snd_cwnd
rcv_nxt
write_seq
snd_cwnd
rcv_nxt
write(...);
SubSeq: 102 DataSeq: 2
SubSeq: 2001 DataSeq: 3
SubSeq: 101 DataSeq: 1
Addresses are advertised with ADD_ADDR and removed by REMOVE_ADDR.
Subflows can be dynamically added and removed during the lifetime of the connection.
IP Networking Lab http://multipath-tcp.org 9 / 29
MultiPath TCP
Establishing first subflow
Establishing first subflow
standard Socket API
TCP subflow
struct tcp_sock
Establishing first subflow
tcp_v4_connect(...);
tcp_connect(...);
create SYN
tcp_transmit_skb(...); tcp_syn_options(...);
Establishing first subflow
SYN
Establishing first subflow
Establishing first subflow
standard Socket API
Creating the MPTCP-level and linking the application to this socket.TCP
subflow
Establishing first subflow
mptcp_add_sock(...); attach init. subflow to MPTCP
SYN/ACK
Establishing first subflow
Establishing first subflow
Handles the third ack of the 3-way Handshake
IP Networking Lab http://multipath-tcp.org 12 / 29
Establishing first subflow
High-Level Kernel design
standard Socket API
Establishing additional subflows
Establishing additional subflows
standard Socket API
subflow
Establishing additional subflows
connect(...);
mptcp_add_sock(...);
Adds the MP_JOIN
Establishing additional subflows
tcp_v4_rcv(...);
SYN
tcp_v4_send_synack(...);
mptcp_lookup_join(...);
SYN/ACK
Look for the MP_JOIN in a SYN And see if we know this identifier
mptcp_v4_do_rcv(...);
mptcp_v4_join_request(...);
Establishing additional subflows
Establishing additional subflows
Establishing additional subflows
mptcp_v4_do_rcv(...);
tcp_check_req(...);
IP Networking Lab http://multipath-tcp.org 14 / 29
Sending Data
Exchanged Messages
Sending Data
write(sock, &buf, size);
Sending Data
Sending Data
Receiving Data
Packets can be reordered at the data-level due to delay-differences.
IP Networking Lab http://multipath-tcp.org 16 / 29
SubSeq: 1 DataSeq: 1000
SubSeq: 200 DataSeq: 1001
SubSeq: 2 DataSeq: 1002
Packets can be reordered at the data-level due to delay-differences.
IP Networking Lab http://multipath-tcp.org 16 / 29
1000
Packets can be reordered at the data-level due to delay-differences.
IP Networking Lab http://multipath-tcp.org 16 / 29
1000
Receiving Data
A loss at the subflow-level (or network-reordering) can also cause reordering at the subflow-level
IP Networking Lab http://multipath-tcp.org 17 / 29
SubSeq: 3 DataSeq: 1003
SubSeq: 4 DataSeq: 1004
Receiving Data
A loss at the subflow-level (or network-reordering) can also cause reordering at the subflow-level
IP Networking Lab http://multipath-tcp.org 17 / 29
SubSeq: 4 DataSeq: 1004 Packet Dropped
Receiving Data
Subflow-level out-of-order queues are necessary to handle the retransmission at the subflow-level
IP Networking Lab http://multipath-tcp.org 18 / 29
SubSeq: 4 DataSeq: 1004
MultiPath TCP
Design Challenges
Writing the Data-sequence number in the TCP-options
Naive approach
s t r u c t t c p s k b cb { u32 seq ; /∗ S t a r t i n g sequence number ∗/
[ . . . ] #i f d e f CONFIG MPTCP
u32 da t a s eq ; u32 end da t a s eq ; u32 da ta ack ;
[ . . . ] #end i f }
Increased tcp skb cb by 24 bytes.
IP Networking Lab http://multipath-tcp.org 21 / 29
Writing the Data-sequence number in the TCP-options
Our solution
Inside the MPTCP-scheduler write the data-seq on top of the payload, before calling tcp transmit skb.
struct sk_buff
char *data;
IP Networking Lab http://multipath-tcp.org 22 / 29
Creating the MPTCP-level on the client-side.
Current Design
TCP subflow
struct tcp_sock
Current Design
Creating the MPTCP-level and linking the application to this socket.TCP
subflow
Current Design
struct socket
Current Design
struct socket
Current Design
struct socket
Current Design
struct socket
Current Design
Problems, if the application does a system-call on the socket, before the reception of the SYN+ACK
Fix: Wait for the SYN+ACK. E.g., tcp_sendmsg:
/∗ Wait f o r a connec t i on to f i n i s h . ∗/ i f ( (1 << sk−>s k s t a t e ) & ˜(TCPF ESTABLISHED |
TCPF CLOSE WAIT) ) i f ( ( e r r = s k s t r e am wa i t c o n n e c t ( sk , &t imeo ) )
!= 0) goto d o e r r o r ;
We need to do this in all functions that take a lock on the socket! tcp_recvmsg, tcp_splice_read, ip_setsockopt, ip_get_sockopt, tcp_ioctl, . . . and many more
IP Networking Lab http://multipath-tcp.org 24 / 29
Creating the MPTCP-level on the client-side.
Upcoming Design
Upcoming Design
subflow
Upcoming Design
struct socket
Upcoming Design
struct socket
Upcoming Design
struct socket
Lots of socket options in the TCP/IP stack
Some are for the MPTCP-level (SO SNDBUF ), some should get passed onto all other subflows (IP TTL)
This requires a lot of changes in TCP unrelated functions (e.g., do_ip_setsockopt)
How could we handle this?
IP Networking Lab http://multipath-tcp.org 26 / 29
Still lots of changes to the TCP-stack
Questions
We have a lot of:
i f ( t c p s k ( sk )−>mpc) { DO SOME MPTCP STUFF
} e l s e { DO USUAL TCP STUFF
}
Submitting MPTCP upstream???
Tightly integrated in the TCP-stack More work to do:
Cleanup - better separate MPTCP from TCP Some missing features Support TSO Support NET DMA . . .
How to split the patch in small pieces?
IP Networking Lab http://multipath-tcp.org 28 / 29
Conclusion
Prof. Olivier Bonaventure
IP Networking Lab http://multipath-tcp.org 29 / 29

Recommended