git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mtd: OneNAND: 4-bit ECC status macros
[safe/jmp/linux-2.6]
/
net
/
ipv4
/
tcp_output.c
diff --git
a/net/ipv4/tcp_output.c
b/net/ipv4/tcp_output.c
index
f1db89b
..
bd62712
100644
(file)
--- a/
net/ipv4/tcp_output.c
+++ b/
net/ipv4/tcp_output.c
@@
-288,7
+288,7
@@
static inline void TCP_ECN_send_syn(struct sock *sk, struct sk_buff *skb)
struct tcp_sock *tp = tcp_sk(sk);
tp->ecn_flags = 0;
struct tcp_sock *tp = tcp_sk(sk);
tp->ecn_flags = 0;
- if (sysctl_tcp_ecn) {
+ if (sysctl_tcp_ecn
== 1
) {
TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE | TCPCB_FLAG_CWR;
tp->ecn_flags = TCP_ECN_OK;
}
TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE | TCPCB_FLAG_CWR;
tp->ecn_flags = TCP_ECN_OK;
}
@@
-725,7
+725,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)
{
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) ||
+ skb->ip_summed == CHECKSUM_NONE) {
/* Avoid the costly divide in the normal
* non-TSO case.
*/
/* Avoid the costly divide in the normal
* non-TSO case.
*/
@@
-778,7
+779,7
@@
static void tcp_adjust_pcount(struct sock *sk, struct sk_buff *skb, int decr)
if (tp->lost_skb_hint &&
before(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(tp->lost_skb_hint)->seq) &&
if (tp->lost_skb_hint &&
before(TCP_SKB_CB(skb)->seq, TCP_SKB_CB(tp->lost_skb_hint)->seq) &&
- (tcp_is_fack(tp) ||
TCP_SKB_CB(skb)->sacked
))
+ (tcp_is_fack(tp) ||
(TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)
))
tp->lost_cnt_hint -= decr;
tcp_verify_left_out(tp);
tp->lost_cnt_hint -= decr;
tcp_verify_left_out(tp);
@@
-1893,7
+1894,12
@@
int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb)
if (tcp_fragment(sk, skb, cur_mss, cur_mss))
return -ENOMEM; /* We'll try again later. */
} else {
if (tcp_fragment(sk, skb, cur_mss, cur_mss))
return -ENOMEM; /* We'll try again later. */
} else {
- tcp_init_tso_segs(sk, skb, cur_mss);
+ int oldpcount = tcp_skb_pcount(skb);
+
+ if (unlikely(oldpcount > 1)) {
+ tcp_init_tso_segs(sk, skb, cur_mss);
+ tcp_adjust_pcount(sk, skb, oldpcount - tcp_skb_pcount(skb));
+ }
}
tcp_retrans_try_collapse(sk, skb, cur_mss);
}
tcp_retrans_try_collapse(sk, skb, cur_mss);
@@
-2197,7
+2203,7
@@
struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
/* Reserve space for headers. */
skb_reserve(skb, MAX_TCP_HEADER);
/* Reserve space for headers. */
skb_reserve(skb, MAX_TCP_HEADER);
- skb
->dst = dst_clone(dst
);
+ skb
_dst_set(skb, dst_clone(dst)
);
mss = dst_metric(dst, RTAX_ADVMSS);
if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < mss)
mss = dst_metric(dst, RTAX_ADVMSS);
if (tp->rx_opt.user_mss && tp->rx_opt.user_mss < mss)
@@
-2255,7
+2261,7
@@
struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
#ifdef CONFIG_TCP_MD5SIG
/* Okay, we have all we need - do the md5 hash if needed */
if (md5) {
#ifdef CONFIG_TCP_MD5SIG
/* Okay, we have all we need - do the md5 hash if needed */
if (md5) {
- t
p
->af_specific->calc_md5_hash(md5_hash_location,
+ t
cp_rsk(req)
->af_specific->calc_md5_hash(md5_hash_location,
md5, NULL, req, skb);
}
#endif
md5, NULL, req, skb);
}
#endif