aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:51:48 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-14 21:51:48 -0500
commit6f37ac793d6ba7b35d338f791974166f67fdd9ba (patch)
treece7e05fc4ede544021f4e395346a87f649f581f7 /net
parent2f1f53bdc6531696934f6ee7bbdfa2ab4f4f62a3 (diff)
parentd90bf5a976793edfa88d3bb2393f0231eb8ce1e5 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NET]: rt_check_expire() can take a long time, add a cond_resched() [ISDN] sc: Really, really fix warning [ISDN] sc: Fix sndpkt to have the correct number of arguments [TCP] FRTO: Clear frto_highmark only after process_frto that uses it [NET]: Remove notifier block from chain when register_netdevice_notifier fails [FS_ENET]: Fix module build. [TCP]: Make sure write_queue_from does not begin with NULL ptr [TCP]: Fix size calculation in sk_stream_alloc_pskb [S2IO]: Fixed memory leak when MSI-X vector allocation fails [BONDING]: Fix resource use after free [SYSCTL]: Fix warning for token-ring from sysctl checker [NET] random : secure_tcp_sequence_number should not assume CONFIG_KTIME_SCALAR [IWLWIFI]: Not correctly dealing with hotunplug. [TCP] FRTO: Plug potential LOST-bit leak [TCP] FRTO: Limit snd_cwnd if TCP was application limited [E1000]: Fix schedule while atomic when called from mii-tool. [NETX]: Fix build failure added by 2.6.24 statistics cleanup. [EP93xx_ETH]: Build fix after 2.6.24 NAPI changes. [PKT_SCHED]: Check subqueue status before calling hard_start_xmit
Diffstat (limited to 'net')
-rw-r--r--net/core/dev.c2
-rw-r--r--net/ipv4/route.c3
-rw-r--r--net/ipv4/tcp_input.c16
-rw-r--r--net/sched/sch_generic.c5
4 files changed, 21 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index dd40b35bb006..86d62611f2fc 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1171,6 +1171,8 @@ rollback:
1171 nb->notifier_call(nb, NETDEV_UNREGISTER, dev); 1171 nb->notifier_call(nb, NETDEV_UNREGISTER, dev);
1172 } 1172 }
1173 } 1173 }
1174
1175 raw_notifier_chain_unregister(&netdev_chain, nb);
1174 goto unlock; 1176 goto unlock;
1175} 1177}
1176 1178
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 45651834e1e2..1bff9ed349ff 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -578,6 +578,9 @@ static void rt_check_expire(struct work_struct *work)
578 i = (i + 1) & rt_hash_mask; 578 i = (i + 1) & rt_hash_mask;
579 rthp = &rt_hash_table[i].chain; 579 rthp = &rt_hash_table[i].chain;
580 580
581 if (need_resched())
582 cond_resched();
583
581 if (*rthp == NULL) 584 if (*rthp == NULL)
582 continue; 585 continue;
583 spin_lock_bh(rt_hash_lock_addr(i)); 586 spin_lock_bh(rt_hash_lock_addr(i));
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 20c9440ab85e..0f0c1c9829a1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1269,6 +1269,9 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1269 if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window)) 1269 if (before(TCP_SKB_CB(ack_skb)->ack_seq, prior_snd_una - tp->max_window))
1270 return 0; 1270 return 0;
1271 1271
1272 if (!tp->packets_out)
1273 goto out;
1274
1272 /* SACK fastpath: 1275 /* SACK fastpath:
1273 * if the only SACK change is the increase of the end_seq of 1276 * if the only SACK change is the increase of the end_seq of
1274 * the first block then only apply that SACK block 1277 * the first block then only apply that SACK block
@@ -1515,6 +1518,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
1515 (!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark))) 1518 (!tp->frto_highmark || after(tp->snd_una, tp->frto_highmark)))
1516 tcp_update_reordering(sk, tp->fackets_out - reord, 0); 1519 tcp_update_reordering(sk, tp->fackets_out - reord, 0);
1517 1520
1521out:
1522
1518#if FASTRETRANS_DEBUG > 0 1523#if FASTRETRANS_DEBUG > 0
1519 BUG_TRAP((int)tp->sacked_out >= 0); 1524 BUG_TRAP((int)tp->sacked_out >= 0);
1520 BUG_TRAP((int)tp->lost_out >= 0); 1525 BUG_TRAP((int)tp->lost_out >= 0);
@@ -1669,6 +1674,9 @@ void tcp_enter_frto(struct sock *sk)
1669 } 1674 }
1670 tcp_verify_left_out(tp); 1675 tcp_verify_left_out(tp);
1671 1676
1677 /* Too bad if TCP was application limited */
1678 tp->snd_cwnd = min(tp->snd_cwnd, tcp_packets_in_flight(tp) + 1);
1679
1672 /* Earlier loss recovery underway (see RFC4138; Appendix B). 1680 /* Earlier loss recovery underway (see RFC4138; Appendix B).
1673 * The last condition is necessary at least in tp->frto_counter case. 1681 * The last condition is necessary at least in tp->frto_counter case.
1674 */ 1682 */
@@ -1701,6 +1709,8 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
1701 tcp_for_write_queue(skb, sk) { 1709 tcp_for_write_queue(skb, sk) {
1702 if (skb == tcp_send_head(sk)) 1710 if (skb == tcp_send_head(sk))
1703 break; 1711 break;
1712
1713 TCP_SKB_CB(skb)->sacked &= ~TCPCB_LOST;
1704 /* 1714 /*
1705 * Count the retransmission made on RTO correctly (only when 1715 * Count the retransmission made on RTO correctly (only when
1706 * waiting for the first ACK and did not get it)... 1716 * waiting for the first ACK and did not get it)...
@@ -1714,7 +1724,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag)
1714 } else { 1724 } else {
1715 if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS) 1725 if (TCP_SKB_CB(skb)->sacked & TCPCB_RETRANS)
1716 tp->undo_marker = 0; 1726 tp->undo_marker = 0;
1717 TCP_SKB_CB(skb)->sacked &= ~(TCPCB_LOST|TCPCB_SACKED_RETRANS); 1727 TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS;
1718 } 1728 }
1719 1729
1720 /* Don't lost mark skbs that were fwd transmitted after RTO */ 1730 /* Don't lost mark skbs that were fwd transmitted after RTO */
@@ -3103,11 +3113,11 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
3103 /* See if we can take anything off of the retransmit queue. */ 3113 /* See if we can take anything off of the retransmit queue. */
3104 flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); 3114 flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets);
3105 3115
3116 if (tp->frto_counter)
3117 frto_cwnd = tcp_process_frto(sk, flag);
3106 /* Guarantee sacktag reordering detection against wrap-arounds */ 3118 /* Guarantee sacktag reordering detection against wrap-arounds */
3107 if (before(tp->frto_highmark, tp->snd_una)) 3119 if (before(tp->frto_highmark, tp->snd_una))
3108 tp->frto_highmark = 0; 3120 tp->frto_highmark = 0;
3109 if (tp->frto_counter)
3110 frto_cwnd = tcp_process_frto(sk, flag);
3111 3121
3112 if (tcp_ack_is_dubious(sk, flag)) { 3122 if (tcp_ack_is_dubious(sk, flag)) {
3113 /* Advance CWND, if state allows this. */ 3123 /* Advance CWND, if state allows this. */
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index fa1a6f45dc41..e595e6570ce0 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -134,7 +134,7 @@ static inline int qdisc_restart(struct net_device *dev)
134{ 134{
135 struct Qdisc *q = dev->qdisc; 135 struct Qdisc *q = dev->qdisc;
136 struct sk_buff *skb; 136 struct sk_buff *skb;
137 int ret; 137 int ret = NETDEV_TX_BUSY;
138 138
139 /* Dequeue packet */ 139 /* Dequeue packet */
140 if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL)) 140 if (unlikely((skb = dev_dequeue_skb(dev, q)) == NULL))
@@ -145,7 +145,8 @@ static inline int qdisc_restart(struct net_device *dev)
145 spin_unlock(&dev->queue_lock); 145 spin_unlock(&dev->queue_lock);
146 146
147 HARD_TX_LOCK(dev, smp_processor_id()); 147 HARD_TX_LOCK(dev, smp_processor_id());
148 ret = dev_hard_start_xmit(skb, dev); 148 if (!netif_subqueue_stopped(dev, skb))
149 ret = dev_hard_start_xmit(skb, dev);
149 HARD_TX_UNLOCK(dev); 150 HARD_TX_UNLOCK(dev);
150 151
151 spin_lock(&dev->queue_lock); 152 spin_lock(&dev->queue_lock);