Fix: Also accept window-updates at the subflow-level

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: mptso_fragment, mptcp_fragment

Insert the buff at the right place in the reinject-queue.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: pskb-copy segment with correct head-len

pskb_copy just copies the necessary space for THIS segment. However,
when we are reinjecting we do not yet know the necessary header-space.
E.g., SACK, REMOVE_ADDR,... may need to get added to the header-space.
In this case, the header-space would not be sufficient.

Thus, do like tcp_retransmit_skb, and take the maximum header space.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Create full new skb for the subflow

Subflows may play around with skb's by readjusting tso_segs, and so on.
This messes up with the tso_segs values on a meta-level.

We either would need to block the subflow from readjusting tso_segs
which would involve many changes in the TCP-stack.

Or, we create a fresh skb like sk_stream_alloc_skb. Then, the subflow is
free to do whatever he wants on the skb. And, we have the fast-cloning
in tcp_transmit_skb.

However, we create a clone-skb for the meta-sk and never use it. We
stick with this at the moment to reduce the changes to tcp_sendmsg,
where we would need to avoid the clone-skb.

Further, this also adds an overhead as the whole linear data has to be
copied. We take this overhead for now.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Reset highest_sack, if transmit_skb_failed

tcp_add_write_queue_tail initializes highest_sack. If then the
transmission fails, we have to reset the highest_sack-pointer because
otherwise he will be referencing garbage.

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

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Update skb-pointer when reinjecting cloned skb

skb will be changed to subskb inside mptcp_skb_entail if it is a clone.
We have to update the skb-pointer as it will be used afterwards in
mptcp_write_xmit.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Under all price, we have to disable TSO.

It may be that due to varying MTU-values, the kernel might be tempted to
create a TSO-segment. We do not want this! (for now)

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
netxen: fix off by one bug in netxen_release_tx_buffer()

Christoph Paasch found netxen could trigger a BUG in its dismantle
phase, in netxen_release_tx_buffer(), using full size TSO packets.

cmd_buf->frag_count includes the skb->data part, so the loop must
start at index 1 instead of 0, or else we can make an out
of bound access to cmd_buff->frag_array[MAX_SKB_FRAGS + 2]

Christoph provided the fixes in netxen_map_tx_skb() function.
In case of a dma mapping error, its better to clear the dma fields
so that we don't try to unmap them again in netxen_release_tx_buffer()

Reported-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Cc: Sony Chacko <sony.chacko@qlogic.com>
Cc: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Signed-off-by: David S. Miller <davem@davemloft.net>

Conflicts:

	drivers/net/ethernet/qlogic/netxen/netxen_nic_init.c
	drivers/net/ethernet/qlogic/netxen/netxen_nic_main.c
Limit /proc/net/mptcp to current net namespace

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Cleanup: sysctl

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Finalize mptcp_write_wakeup

We still have to initialize gso_segs in mptcp_write_wakeup.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Fixes to CCC

It may be that we get stuck with CCC. Because, the alpha may have a
"bad" value, disfavoring one subflow. When then the good subflow
disappears, the remaining subflow's congestion window will not raise
anymore. And we are completly stuck.

This behavior is even more apparent with TSO, as we receive less acks
and thus have less chances of increasing the congestion window
appropriatly.

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Always parse the options

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

Conflicts:

	net/ipv4/tcp_input.c
Parse mp_fail and fclose after parse options

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Parse low_prio after validity checks

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Handle add_addr in tcp_validate_incoming

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

Conflicts:

	net/mptcp/mptcp_input.c
Handle rem_addr in tcp_validate_incoming

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

Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Fix: Don't adjust pcount of reinjected segments

They are not counted in packets_out - Thus, do not adjust it.

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