]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_output.c
tcp: introduce struct tcp_sacktag_state to reduce arg pressure
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_output.c
index 86ef98975e945cb7689be39d24a732c128ea5d3c..76f840917bcb6c86d10f2431cd027ce6ec6590ab 100644 (file)
@@ -722,7 +722,8 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
 static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb,
                                 unsigned int mss_now)
 {
-       if (skb->len <= mss_now || !sk_can_gso(sk)) {
+       if (skb->len <= mss_now || !sk_can_gso(sk) ||
+           tcp_urg_mode(tcp_sk(sk))) {
                /* Avoid the costly divide in the normal
                 * non-TSO case.
                 */
@@ -1163,7 +1164,9 @@ static int tcp_init_tso_segs(struct sock *sk, struct sk_buff *skb,
 {
        int tso_segs = tcp_skb_pcount(skb);
 
-       if (!tso_segs || (tso_segs > 1 && tcp_skb_mss(skb) != mss_now)) {
+       if (!tso_segs ||
+           (tso_segs > 1 && (tcp_skb_mss(skb) != mss_now ||
+                             tcp_urg_mode(tcp_sk(sk))))) {
                tcp_set_skb_tso_segs(sk, skb, mss_now);
                tso_segs = tcp_skb_pcount(skb);
        }
@@ -1879,56 +1882,6 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *to,
        }
 }
 
-/* Do a simple retransmit without using the backoff mechanisms in
- * tcp_timer. This is used for path mtu discovery.
- * The socket is already locked here.
- */
-void tcp_simple_retransmit(struct sock *sk)
-{
-       const struct inet_connection_sock *icsk = inet_csk(sk);
-       struct tcp_sock *tp = tcp_sk(sk);
-       struct sk_buff *skb;
-       unsigned int mss = tcp_current_mss(sk, 0);
-       u32 prior_lost = tp->lost_out;
-
-       tcp_for_write_queue(skb, sk) {
-               if (skb == tcp_send_head(sk))
-                       break;
-               if (skb->len > mss &&
-                   !(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) {
-                       if (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_RETRANS) {
-                               TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS;
-                               tp->retrans_out -= tcp_skb_pcount(skb);
-                       }
-                       tcp_skb_mark_lost_uncond_verify(tp, skb);
-               }
-       }
-
-       tcp_clear_retrans_hints_partial(tp);
-
-       if (prior_lost == tp->lost_out)
-               return;
-
-       if (tcp_is_reno(tp))
-               tcp_limit_reno_sacked(tp);
-
-       tcp_verify_left_out(tp);
-
-       /* Don't muck with the congestion window here.
-        * Reason is that we do not increase amount of _data_
-        * in network, but units changed and effective
-        * cwnd/ssthresh really reduced now.
-        */
-       if (icsk->icsk_ca_state != TCP_CA_Loss) {
-               tp->high_seq = tp->snd_nxt;
-               tp->snd_ssthresh = tcp_current_ssthresh(sk);
-               tp->prior_ssthresh = 0;
-               tp->undo_marker = 0;
-               tcp_set_ca_state(sk, TCP_CA_Loss);
-       }
-       tcp_xmit_retransmit_queue(sk);
-}
-
 /* This retransmits one SKB.  Policy decisions and retransmit queue
  * state updates are done by the caller.  Returns non-zero if an
  * error occurred which prevented the send.