Cleanup

Reported-by: Gregory Detal <gregory.detal@uclouvain.be>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Rebuild the mapping on the subflow when fragmenting or trimming

If we loose a mapping due to fragmenting or trimming, the reinjection
cannot work. This will then require the meta-level retransmission timer
to trigger the recovery. This is very slow and may even lead to stalls.

We now reconstruct the mapping when fragmenting or trimming. This allows
us to quickly recover from the loss. In __mptcp_reinject_data, we have
to look for the data from the meta-send-queue in order to reinject it
properly.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: NULL-pointer exception in mptcp_del_sock

9c2c649cc57 (Fix: Race condition while creating subsocket on the
server-side) introduced a regression when mptcp_check_req_child fails.
tp->mpc is set, but tp->mptcp not yet. Then, in mptcp_del_sock we will
have a NULL Pointer Exception.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Consider data-fin when checking if the mapping is coherent

If multiple packets cover a single mapping, and a data-fin is part of
this mapping, then the check in mptcp_detect_mapping is wrong.

map_data_len is data_len - 1, if a data-fin is present. We have to
consider this.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Don't check for mptcp-flag data-fin in mptcp_queue_skb

If we receive a data-fin, mptcp_prepare_skb will set tcp_hdr()->fin to
1. If the mapping covers multiple segments however, mptcp_flags will
have the data-fin flag set on each of these segments.

Thus, we should rather check on the more accurate tcp_hdr()->fin flag,
which is only set on the real last segment.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Use tcp_try_coalesce in the meta-rcv and ofo-queue

This reduces the pressure on the receive-buffer as segments will be
coalesced better.

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