|
@@ -1134,6 +1134,12 @@ static void tcp_fragment_tstamp(struct sk_buff *skb, struct sk_buff *skb2)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static void tcp_skb_fragment_eor(struct sk_buff *skb, struct sk_buff *skb2)
|
|
|
|
+{
|
|
|
|
+ TCP_SKB_CB(skb2)->eor = TCP_SKB_CB(skb)->eor;
|
|
|
|
+ TCP_SKB_CB(skb)->eor = 0;
|
|
|
|
+}
|
|
|
|
+
|
|
/* Function to create two new TCP segments. Shrinks the given segment
|
|
/* Function to create two new TCP segments. Shrinks the given segment
|
|
* to the specified size and appends a new segment with the rest of the
|
|
* to the specified size and appends a new segment with the rest of the
|
|
* packet to the list. This won't be called frequently, I hope.
|
|
* packet to the list. This won't be called frequently, I hope.
|
|
@@ -1179,6 +1185,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
|
|
TCP_SKB_CB(skb)->tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH);
|
|
TCP_SKB_CB(skb)->tcp_flags = flags & ~(TCPHDR_FIN | TCPHDR_PSH);
|
|
TCP_SKB_CB(buff)->tcp_flags = flags;
|
|
TCP_SKB_CB(buff)->tcp_flags = flags;
|
|
TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked;
|
|
TCP_SKB_CB(buff)->sacked = TCP_SKB_CB(skb)->sacked;
|
|
|
|
+ tcp_skb_fragment_eor(skb, buff);
|
|
|
|
|
|
if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) {
|
|
if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_PARTIAL) {
|
|
/* Copy and checksum data tail into the new buffer. */
|
|
/* Copy and checksum data tail into the new buffer. */
|
|
@@ -1739,6 +1746,8 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len,
|
|
/* This packet was never sent out yet, so no SACK bits. */
|
|
/* This packet was never sent out yet, so no SACK bits. */
|
|
TCP_SKB_CB(buff)->sacked = 0;
|
|
TCP_SKB_CB(buff)->sacked = 0;
|
|
|
|
|
|
|
|
+ tcp_skb_fragment_eor(skb, buff);
|
|
|
|
+
|
|
buff->ip_summed = skb->ip_summed = CHECKSUM_PARTIAL;
|
|
buff->ip_summed = skb->ip_summed = CHECKSUM_PARTIAL;
|
|
skb_split(skb, buff, len);
|
|
skb_split(skb, buff, len);
|
|
tcp_fragment_tstamp(skb, buff);
|
|
tcp_fragment_tstamp(skb, buff);
|
|
@@ -2499,6 +2508,7 @@ static void tcp_collapse_retrans(struct sock *sk, struct sk_buff *skb)
|
|
* packet counting does not break.
|
|
* packet counting does not break.
|
|
*/
|
|
*/
|
|
TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked & TCPCB_EVER_RETRANS;
|
|
TCP_SKB_CB(skb)->sacked |= TCP_SKB_CB(next_skb)->sacked & TCPCB_EVER_RETRANS;
|
|
|
|
+ TCP_SKB_CB(skb)->eor = TCP_SKB_CB(next_skb)->eor;
|
|
|
|
|
|
/* changed transmit queue under us so clear hints */
|
|
/* changed transmit queue under us so clear hints */
|
|
tcp_clear_retrans_hints_partial(tp);
|
|
tcp_clear_retrans_hints_partial(tp);
|
|
@@ -2550,6 +2560,9 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,
|
|
if (!tcp_can_collapse(sk, skb))
|
|
if (!tcp_can_collapse(sk, skb))
|
|
break;
|
|
break;
|
|
|
|
|
|
|
|
+ if (!tcp_skb_can_collapse_to(to))
|
|
|
|
+ break;
|
|
|
|
+
|
|
space -= skb->len;
|
|
space -= skb->len;
|
|
|
|
|
|
if (first) {
|
|
if (first) {
|