diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-14 13:08:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-14 13:08:24 -0400 |
commit | 6aa5fc434958d15a4d66d922d0416dfb03c07def (patch) | |
tree | c68811b0e38afe68156022bed324d8df25fb45be /net/ipv4 | |
parent | 362a61ad61199e19a61b8e432015e2586b288f5b (diff) | |
parent | 9ee6b7f1556e7889eff4666483b1b554d4686cd4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (73 commits)
net: Fix typo in net/core/sock.c.
ppp: Do not free not yet unregistered net device.
netfilter: xt_iprange: module aliases for xt_iprange
netfilter: ctnetlink: dump conntrack ID in event messages
irda: Fix a misalign access issue. (v2)
sctp: Fix use of uninitialized pointer
cipso: Relax too much careful cipso hash function.
tcp FRTO: work-around inorder receivers
tcp FRTO: Fix fallback to conventional recovery
New maintainer for Intel ethernet adapters
DM9000: Use delayed work to update MII PHY state
DM9000: Update and fix driver debugging messages
DM9000: Add __devinit and __devexit attributes to probe and remove
sky2: fix simple define thinko
[netdrvr] sfc: sfc: Add self-test support
[netdrvr] sfc: Increment rx_reset when reported as driver event
[netdrvr] sfc: Remove unused macro EFX_XAUI_RETRAIN_MAX
[netdrvr] sfc: Fix code formatting
[netdrvr] sfc: Remove kernel-doc comments for removed members of struct efx_nic
[netdrvr] sfc: Remove garbage from comment
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/arp.c | 2 | ||||
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 4 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 4 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 6 | ||||
-rw-r--r-- | net/ipv4/raw.c | 10 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 17 |
6 files changed, 24 insertions, 19 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 68b72a7a1806..418862f1bf22 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c | |||
@@ -570,7 +570,7 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip, | |||
570 | * Allocate a buffer | 570 | * Allocate a buffer |
571 | */ | 571 | */ |
572 | 572 | ||
573 | skb = alloc_skb(arp_hdr_len(dev) + LL_RESERVED_SPACE(dev), GFP_ATOMIC); | 573 | skb = alloc_skb(arp_hdr_len(dev) + LL_ALLOCATED_SPACE(dev), GFP_ATOMIC); |
574 | if (skb == NULL) | 574 | if (skb == NULL) |
575 | return NULL; | 575 | return NULL; |
576 | 576 | ||
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 05afb576d935..2c0e4572cc90 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
@@ -338,7 +338,7 @@ static int cipso_v4_cache_check(const unsigned char *key, | |||
338 | return -ENOENT; | 338 | return -ENOENT; |
339 | 339 | ||
340 | hash = cipso_v4_map_cache_hash(key, key_len); | 340 | hash = cipso_v4_map_cache_hash(key, key_len); |
341 | bkt = hash & (CIPSO_V4_CACHE_BUCKETBITS - 1); | 341 | bkt = hash & (CIPSO_V4_CACHE_BUCKETS - 1); |
342 | spin_lock_bh(&cipso_v4_cache[bkt].lock); | 342 | spin_lock_bh(&cipso_v4_cache[bkt].lock); |
343 | list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { | 343 | list_for_each_entry(entry, &cipso_v4_cache[bkt].list, list) { |
344 | if (entry->hash == hash && | 344 | if (entry->hash == hash && |
@@ -417,7 +417,7 @@ int cipso_v4_cache_add(const struct sk_buff *skb, | |||
417 | atomic_inc(&secattr->cache->refcount); | 417 | atomic_inc(&secattr->cache->refcount); |
418 | entry->lsm_data = secattr->cache; | 418 | entry->lsm_data = secattr->cache; |
419 | 419 | ||
420 | bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETBITS - 1); | 420 | bkt = entry->hash & (CIPSO_V4_CACHE_BUCKETS - 1); |
421 | spin_lock_bh(&cipso_v4_cache[bkt].lock); | 421 | spin_lock_bh(&cipso_v4_cache[bkt].lock); |
422 | if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) { | 422 | if (cipso_v4_cache[bkt].size < cipso_v4_cache_bucketsize) { |
423 | list_add(&entry->list, &cipso_v4_cache[bkt].list); | 423 | list_add(&entry->list, &cipso_v4_cache[bkt].list); |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 6250f4239b61..2769dc4a4c84 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -292,7 +292,7 @@ static struct sk_buff *igmpv3_newpack(struct net_device *dev, int size) | |||
292 | struct iphdr *pip; | 292 | struct iphdr *pip; |
293 | struct igmpv3_report *pig; | 293 | struct igmpv3_report *pig; |
294 | 294 | ||
295 | skb = alloc_skb(size + LL_RESERVED_SPACE(dev), GFP_ATOMIC); | 295 | skb = alloc_skb(size + LL_ALLOCATED_SPACE(dev), GFP_ATOMIC); |
296 | if (skb == NULL) | 296 | if (skb == NULL) |
297 | return NULL; | 297 | return NULL; |
298 | 298 | ||
@@ -653,7 +653,7 @@ static int igmp_send_report(struct in_device *in_dev, struct ip_mc_list *pmc, | |||
653 | return -1; | 653 | return -1; |
654 | } | 654 | } |
655 | 655 | ||
656 | skb=alloc_skb(IGMP_SIZE+LL_RESERVED_SPACE(dev), GFP_ATOMIC); | 656 | skb=alloc_skb(IGMP_SIZE+LL_ALLOCATED_SPACE(dev), GFP_ATOMIC); |
657 | if (skb == NULL) { | 657 | if (skb == NULL) { |
658 | ip_rt_put(rt); | 658 | ip_rt_put(rt); |
659 | return -1; | 659 | return -1; |
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 89dee4346f60..ed45037ce9be 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -710,14 +710,14 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d | |||
710 | struct net_device *dev = d->dev; | 710 | struct net_device *dev = d->dev; |
711 | struct sk_buff *skb; | 711 | struct sk_buff *skb; |
712 | struct bootp_pkt *b; | 712 | struct bootp_pkt *b; |
713 | int hh_len = LL_RESERVED_SPACE(dev); | ||
714 | struct iphdr *h; | 713 | struct iphdr *h; |
715 | 714 | ||
716 | /* Allocate packet */ | 715 | /* Allocate packet */ |
717 | skb = alloc_skb(sizeof(struct bootp_pkt) + hh_len + 15, GFP_KERNEL); | 716 | skb = alloc_skb(sizeof(struct bootp_pkt) + LL_ALLOCATED_SPACE(dev) + 15, |
717 | GFP_KERNEL); | ||
718 | if (!skb) | 718 | if (!skb) |
719 | return; | 719 | return; |
720 | skb_reserve(skb, hh_len); | 720 | skb_reserve(skb, LL_RESERVED_SPACE(dev)); |
721 | b = (struct bootp_pkt *) skb_put(skb, sizeof(struct bootp_pkt)); | 721 | b = (struct bootp_pkt *) skb_put(skb, sizeof(struct bootp_pkt)); |
722 | memset(b, 0, sizeof(struct bootp_pkt)); | 722 | memset(b, 0, sizeof(struct bootp_pkt)); |
723 | 723 | ||
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 11d7f753a820..fead049daf43 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -322,7 +322,6 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
322 | unsigned int flags) | 322 | unsigned int flags) |
323 | { | 323 | { |
324 | struct inet_sock *inet = inet_sk(sk); | 324 | struct inet_sock *inet = inet_sk(sk); |
325 | int hh_len; | ||
326 | struct iphdr *iph; | 325 | struct iphdr *iph; |
327 | struct sk_buff *skb; | 326 | struct sk_buff *skb; |
328 | unsigned int iphlen; | 327 | unsigned int iphlen; |
@@ -336,13 +335,12 @@ static int raw_send_hdrinc(struct sock *sk, void *from, size_t length, | |||
336 | if (flags&MSG_PROBE) | 335 | if (flags&MSG_PROBE) |
337 | goto out; | 336 | goto out; |
338 | 337 | ||
339 | hh_len = LL_RESERVED_SPACE(rt->u.dst.dev); | 338 | skb = sock_alloc_send_skb(sk, |
340 | 339 | length + LL_ALLOCATED_SPACE(rt->u.dst.dev) + 15, | |
341 | skb = sock_alloc_send_skb(sk, length+hh_len+15, | 340 | flags & MSG_DONTWAIT, &err); |
342 | flags&MSG_DONTWAIT, &err); | ||
343 | if (skb == NULL) | 341 | if (skb == NULL) |
344 | goto error; | 342 | goto error; |
345 | skb_reserve(skb, hh_len); | 343 | skb_reserve(skb, LL_RESERVED_SPACE(rt->u.dst.dev)); |
346 | 344 | ||
347 | skb->priority = sk->sk_priority; | 345 | skb->priority = sk->sk_priority; |
348 | skb->mark = sk->sk_mark; | 346 | skb->mark = sk->sk_mark; |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 26c936930e92..b54d9d37b636 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1842,9 +1842,16 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag) | |||
1842 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; | 1842 | TCP_SKB_CB(skb)->sacked &= ~TCPCB_SACKED_RETRANS; |
1843 | } | 1843 | } |
1844 | 1844 | ||
1845 | /* Don't lost mark skbs that were fwd transmitted after RTO */ | 1845 | /* Marking forward transmissions that were made after RTO lost |
1846 | if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) && | 1846 | * can cause unnecessary retransmissions in some scenarios, |
1847 | !after(TCP_SKB_CB(skb)->end_seq, tp->frto_highmark)) { | 1847 | * SACK blocks will mitigate that in some but not in all cases. |
1848 | * We used to not mark them but it was causing break-ups with | ||
1849 | * receivers that do only in-order receival. | ||
1850 | * | ||
1851 | * TODO: we could detect presence of such receiver and select | ||
1852 | * different behavior per flow. | ||
1853 | */ | ||
1854 | if (!(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) { | ||
1848 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; | 1855 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; |
1849 | tp->lost_out += tcp_skb_pcount(skb); | 1856 | tp->lost_out += tcp_skb_pcount(skb); |
1850 | } | 1857 | } |
@@ -1860,7 +1867,7 @@ static void tcp_enter_frto_loss(struct sock *sk, int allowed_segments, int flag) | |||
1860 | tp->reordering = min_t(unsigned int, tp->reordering, | 1867 | tp->reordering = min_t(unsigned int, tp->reordering, |
1861 | sysctl_tcp_reordering); | 1868 | sysctl_tcp_reordering); |
1862 | tcp_set_ca_state(sk, TCP_CA_Loss); | 1869 | tcp_set_ca_state(sk, TCP_CA_Loss); |
1863 | tp->high_seq = tp->frto_highmark; | 1870 | tp->high_seq = tp->snd_nxt; |
1864 | TCP_ECN_queue_cwr(tp); | 1871 | TCP_ECN_queue_cwr(tp); |
1865 | 1872 | ||
1866 | tcp_clear_retrans_hints_partial(tp); | 1873 | tcp_clear_retrans_hints_partial(tp); |
@@ -2482,7 +2489,7 @@ static void tcp_try_to_open(struct sock *sk, int flag) | |||
2482 | 2489 | ||
2483 | tcp_verify_left_out(tp); | 2490 | tcp_verify_left_out(tp); |
2484 | 2491 | ||
2485 | if (tp->retrans_out == 0) | 2492 | if (!tp->frto_counter && tp->retrans_out == 0) |
2486 | tp->retrans_stamp = 0; | 2493 | tp->retrans_stamp = 0; |
2487 | 2494 | ||
2488 | if (flag & FLAG_ECE) | 2495 | if (flag & FLAG_ECE) |