Fix: Don't access tcp_hdr in the TCP-stack

Because skb->transport_header is only set in tcp_transmit_skb, where the
tcp-header is written. Before that, all necessary info is in
tcp_skb_cb->tcp_flags.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Cleanup

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Minor: Use zalloc instead memsetting to 0

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: We have to lock the socket before iterating

Otherwise, subsockets may get removed in between.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Minor: Cleanup

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Set sk_error_report elsewhere

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Create custom work-queue for parallel work-execution

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Don't wakeup on subflow creation

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Cleanup locking architecture

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Handle pskb_copy differently

68dae05f5eead7fda0e1a6fb057af215752f11d1 introduced a bug. Actually,
skb->len does not anymore reflect tcb->end_seq - tcb->seq and thus we
had all kind of strange behaviors under certain conditions.

This patch reverts it back again and handles pskb_copy in
tcp_transmit_skb as needed.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Use bh_lock_sock_nested in mptcp_lookup_join

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Remove time-wait-sock when handling MP_JOIN

Otherwise the socket will be in a strange state. We thus have to
properly remove it upon reception of a valid SYN with MP_JOIN.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Cache-line optimizations

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Ignore csum-field if it has not been negotiated

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Update pointers correctly in tcp_sendmsg

This may happen, if the socket becomes mp-capable while waiting in
lock_sock(sk). Thus, pointers need to get updated.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Support tcp_disconnect with meta-sk

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
mptcp: consolidate tcp_skb_cb by moving path_mask into a union

The path_mask field is used on the send path while the header field is
used on the received side, so we can reduce the tcp_skb_cb size by
creating union for the path_mask and header fields.

This patch also reverts the size of sk_buff back to 48 since now
the size of tcp_skb_cb is back to 44 bytes.

Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Update contributors list

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Don't send Fin after receiving an error (e.g., RST)

Otherwise, mptcp_sub_close will still trigger the FIN even if we
received a RST. This is undesirable behavior.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Don't send FIN when resetting upon Remove-Addr

It's needless, as we already sent a Remove-Addr. Thus, we set sk_err to
ECONNRESET, which prevents sending a FIN in mptcp_sub_close.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>