aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-03 17:35:48 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-03 17:35:48 -0400
commit36a2c6b28003dd0592b8ece5e9409991e0820f50 (patch)
treec5b52547b2658a8a3b898b8224b835a7e8396017 /net/core/dev.c
parent95916edd02e3a7752315422f386c55723d4a3637 (diff)
parentf1d39b291e2263f5e2f2ec5d4061802f76d8ae67 (diff)
Merge branch 'upstream-fixes' into upstream
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 4d2b5167d7f5..d95e2626d944 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1166,11 +1166,6 @@ int skb_checksum_help(struct sk_buff *skb, int inward)
1166 goto out_set_summed; 1166 goto out_set_summed;
1167 1167
1168 if (unlikely(skb_shinfo(skb)->gso_size)) { 1168 if (unlikely(skb_shinfo(skb)->gso_size)) {
1169 static int warned;
1170
1171 WARN_ON(!warned);
1172 warned = 1;
1173
1174 /* Let GSO fix up the checksum. */ 1169 /* Let GSO fix up the checksum. */
1175 goto out_set_summed; 1170 goto out_set_summed;
1176 } 1171 }
@@ -1220,11 +1215,6 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
1220 __skb_pull(skb, skb->mac_len); 1215 __skb_pull(skb, skb->mac_len);
1221 1216
1222 if (unlikely(skb->ip_summed != CHECKSUM_HW)) { 1217 if (unlikely(skb->ip_summed != CHECKSUM_HW)) {
1223 static int warned;
1224
1225 WARN_ON(!warned);
1226 warned = 1;
1227
1228 if (skb_header_cloned(skb) && 1218 if (skb_header_cloned(skb) &&
1229 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) 1219 (err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
1230 return ERR_PTR(err); 1220 return ERR_PTR(err);
@@ -3429,12 +3419,9 @@ static void net_dma_rebalance(void)
3429 unsigned int cpu, i, n; 3419 unsigned int cpu, i, n;
3430 struct dma_chan *chan; 3420 struct dma_chan *chan;
3431 3421
3432 lock_cpu_hotplug();
3433
3434 if (net_dma_count == 0) { 3422 if (net_dma_count == 0) {
3435 for_each_online_cpu(cpu) 3423 for_each_online_cpu(cpu)
3436 rcu_assign_pointer(per_cpu(softnet_data.net_dma, cpu), NULL); 3424 rcu_assign_pointer(per_cpu(softnet_data, cpu).net_dma, NULL);
3437 unlock_cpu_hotplug();
3438 return; 3425 return;
3439 } 3426 }
3440 3427
@@ -3447,15 +3434,13 @@ static void net_dma_rebalance(void)
3447 + (i < (num_online_cpus() % net_dma_count) ? 1 : 0)); 3434 + (i < (num_online_cpus() % net_dma_count) ? 1 : 0));
3448 3435
3449 while(n) { 3436 while(n) {
3450 per_cpu(softnet_data.net_dma, cpu) = chan; 3437 per_cpu(softnet_data, cpu).net_dma = chan;
3451 cpu = next_cpu(cpu, cpu_online_map); 3438 cpu = next_cpu(cpu, cpu_online_map);
3452 n--; 3439 n--;
3453 } 3440 }
3454 i++; 3441 i++;
3455 } 3442 }
3456 rcu_read_unlock(); 3443 rcu_read_unlock();
3457
3458 unlock_cpu_hotplug();
3459} 3444}
3460 3445
3461/** 3446/**