diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-08 22:03:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-08 22:03:26 -0400 |
commit | 28a4acb48586dc21d2d14a75a7aab7be78b7c83b (patch) | |
tree | 1e95503037a68286ba732dbc0a844dbf0f826223 /net/ipv4 | |
parent | 89f92d6425b099538932e9b881588f87ef9f3184 (diff) | |
parent | e46b66bc42b6b1430b04cc5c207ecb2b2f4553dc (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: (32 commits)
net: Added ASSERT_RTNL() to dev_open() and dev_close().
can: Fix can_send() handling on dev_queue_xmit() failures
netns: Fix arbitrary net_device-s corruptions on net_ns stop.
netfilter: Kconfig: default DCCP/SCTP conntrack support to the protocol config values
netfilter: nf_conntrack_sip: restrict RTP expect flushing on error to last request
macvlan: Fix memleak on device removal/crash on module removal
net/ipv4: correct RFC 1122 section reference in comment
tcp FRTO: SACK variant is errorneously used with NewReno
e1000e: don't return half-read eeprom on error
ucc_geth: Don't use RX clock as TX clock.
cxgb3: Use CAP_SYS_RAWIO for firmware
pcnet32: delete non NAPI code from driver.
fs_enet: Fix a memory leak in fs_enet_mdio_probe
[netdrvr] eexpress: IPv6 fails - multicast problems
3c59x: use netstats in net_device structure
3c980-TX needs EXTRA_PREAMBLE
fix warning in drivers/net/appletalk/cops.c
e1000e: Add support for BM PHYs on ICH9
uli526x: fix endianness issues in the setup frame
uli526x: initialize the hardware prior to requesting interrupts
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ip_input.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 7b4bad6d572f..ff77a4a7f9ec 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -397,7 +397,7 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, | |||
397 | iph = ip_hdr(skb); | 397 | iph = ip_hdr(skb); |
398 | 398 | ||
399 | /* | 399 | /* |
400 | * RFC1122: 3.1.2.2 MUST silently discard any IP frame that fails the checksum. | 400 | * RFC1122: 3.2.1.2 MUST silently discard any IP frame that fails the checksum. |
401 | * | 401 | * |
402 | * Is the datagram acceptable? | 402 | * Is the datagram acceptable? |
403 | * | 403 | * |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 8ac15a604e08..26c936930e92 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -114,8 +114,6 @@ int sysctl_tcp_abc __read_mostly; | |||
114 | #define FLAG_FORWARD_PROGRESS (FLAG_ACKED|FLAG_DATA_SACKED) | 114 | #define FLAG_FORWARD_PROGRESS (FLAG_ACKED|FLAG_DATA_SACKED) |
115 | #define FLAG_ANY_PROGRESS (FLAG_FORWARD_PROGRESS|FLAG_SND_UNA_ADVANCED) | 115 | #define FLAG_ANY_PROGRESS (FLAG_FORWARD_PROGRESS|FLAG_SND_UNA_ADVANCED) |
116 | 116 | ||
117 | #define IsSackFrto() (sysctl_tcp_frto == 0x2) | ||
118 | |||
119 | #define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH) | 117 | #define TCP_REMNANT (TCP_FLAG_FIN|TCP_FLAG_URG|TCP_FLAG_SYN|TCP_FLAG_PSH) |
120 | #define TCP_HP_BITS (~(TCP_RESERVED_BITS|TCP_FLAG_PSH)) | 118 | #define TCP_HP_BITS (~(TCP_RESERVED_BITS|TCP_FLAG_PSH)) |
121 | 119 | ||
@@ -1686,6 +1684,11 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp) | |||
1686 | tp->sacked_out = 0; | 1684 | tp->sacked_out = 0; |
1687 | } | 1685 | } |
1688 | 1686 | ||
1687 | static int tcp_is_sackfrto(const struct tcp_sock *tp) | ||
1688 | { | ||
1689 | return (sysctl_tcp_frto == 0x2) && !tcp_is_reno(tp); | ||
1690 | } | ||
1691 | |||
1689 | /* F-RTO can only be used if TCP has never retransmitted anything other than | 1692 | /* F-RTO can only be used if TCP has never retransmitted anything other than |
1690 | * head (SACK enhanced variant from Appendix B of RFC4138 is more robust here) | 1693 | * head (SACK enhanced variant from Appendix B of RFC4138 is more robust here) |
1691 | */ | 1694 | */ |
@@ -1702,7 +1705,7 @@ int tcp_use_frto(struct sock *sk) | |||
1702 | if (icsk->icsk_mtup.probe_size) | 1705 | if (icsk->icsk_mtup.probe_size) |
1703 | return 0; | 1706 | return 0; |
1704 | 1707 | ||
1705 | if (IsSackFrto()) | 1708 | if (tcp_is_sackfrto(tp)) |
1706 | return 1; | 1709 | return 1; |
1707 | 1710 | ||
1708 | /* Avoid expensive walking of rexmit queue if possible */ | 1711 | /* Avoid expensive walking of rexmit queue if possible */ |
@@ -1792,7 +1795,7 @@ void tcp_enter_frto(struct sock *sk) | |||
1792 | /* Earlier loss recovery underway (see RFC4138; Appendix B). | 1795 | /* Earlier loss recovery underway (see RFC4138; Appendix B). |
1793 | * The last condition is necessary at least in tp->frto_counter case. | 1796 | * The last condition is necessary at least in tp->frto_counter case. |
1794 | */ | 1797 | */ |
1795 | if (IsSackFrto() && (tp->frto_counter || | 1798 | if (tcp_is_sackfrto(tp) && (tp->frto_counter || |
1796 | ((1 << icsk->icsk_ca_state) & (TCPF_CA_Recovery|TCPF_CA_Loss))) && | 1799 | ((1 << icsk->icsk_ca_state) & (TCPF_CA_Recovery|TCPF_CA_Loss))) && |
1797 | after(tp->high_seq, tp->snd_una)) { | 1800 | after(tp->high_seq, tp->snd_una)) { |
1798 | tp->frto_highmark = tp->high_seq; | 1801 | tp->frto_highmark = tp->high_seq; |
@@ -3124,7 +3127,7 @@ static int tcp_process_frto(struct sock *sk, int flag) | |||
3124 | return 1; | 3127 | return 1; |
3125 | } | 3128 | } |
3126 | 3129 | ||
3127 | if (!IsSackFrto() || tcp_is_reno(tp)) { | 3130 | if (!tcp_is_sackfrto(tp)) { |
3128 | /* RFC4138 shortcoming in step 2; should also have case c): | 3131 | /* RFC4138 shortcoming in step 2; should also have case c): |
3129 | * ACK isn't duplicate nor advances window, e.g., opposite dir | 3132 | * ACK isn't duplicate nor advances window, e.g., opposite dir |
3130 | * data, winupdate | 3133 | * data, winupdate |