Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13829
b: refs/heads/master
c: f4805ed
h: refs/heads/master
i:
  13827: c6b333a
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 11, 2005
1 parent 02190c8 commit ac93ac6
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5aac37f1cdbbd1e587fc618e778ddae124e5ac3
refs/heads/master: f4805eded7d38c4e42bf473dc5eb2f34853beb06
2 changes: 1 addition & 1 deletion trunk/drivers/sbus/char/display7seg.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static long d7s_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
__u8 regs = readb(d7s_regs);
__u8 ireg = 0;
int error = 0;
int error = 0

if (D7S_MINOR != iminor(file->f_dentry->d_inode))
return -ENODEV;
Expand Down
21 changes: 21 additions & 0 deletions trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,27 @@ static __inline__ __u32 tcp_max_burst(const struct tcp_sock *tp)
return 3;
}

/* RFC2861 Check whether we are limited by application or congestion window
* This is the inverse of cwnd check in tcp_tso_should_defer
*/
static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
{
const struct tcp_sock *tp = tcp_sk(sk);
u32 left;

if (in_flight >= tp->snd_cwnd)
return 1;

if (!(sk->sk_route_caps & NETIF_F_TSO))
return 0;

left = tp->snd_cwnd - in_flight;
if (sysctl_tcp_tso_win_divisor)
return left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd;
else
return left <= tcp_max_burst(tp);
}

static __inline__ void tcp_minshall_update(struct tcp_sock *tp, int mss,
const struct sk_buff *skb)
{
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_bic.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ static void bictcp_cong_avoid(struct sock *sk, u32 ack,

bictcp_low_utilization(sk, data_acked);

if (in_flight < tp->snd_cwnd)
if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_cong.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight,
{
struct tcp_sock *tp = tcp_sk(sk);

if (in_flight < tp->snd_cwnd)
if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv4/tcp_highspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ static void hstcp_init(struct sock *sk)
}

static void hstcp_cong_avoid(struct sock *sk, u32 adk, u32 rtt,
u32 in_flight, int good)
u32 in_flight, u32 pkts_acked)
{
struct tcp_sock *tp = tcp_sk(sk);
struct hstcp *ca = inet_csk_ca(sk);

if (in_flight < tp->snd_cwnd)
if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp_htcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
struct tcp_sock *tp = tcp_sk(sk);
struct htcp *ca = inet_csk_ca(sk);

if (in_flight < tp->snd_cwnd)
if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/ipv4/tcp_hybla.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
ca->minrtt = tp->srtt;
}

if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (!ca->hybla_en)
return tcp_reno_cong_avoid(sk, ack, rtt, in_flight, flag);

if (in_flight < tp->snd_cwnd)
return;

if (ca->rho == 0)
hybla_recalc_param(sk);

Expand Down
1 change: 1 addition & 0 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -2058,3 +2058,4 @@ EXPORT_SYMBOL(tcp_connect);
EXPORT_SYMBOL(tcp_make_synack);
EXPORT_SYMBOL(tcp_simple_retransmit);
EXPORT_SYMBOL(tcp_sync_mss);
EXPORT_SYMBOL(sysctl_tcp_tso_win_divisor);
3 changes: 2 additions & 1 deletion trunk/net/ipv4/tcp_scalable.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ static void tcp_scalable_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
u32 in_flight, int flag)
{
struct tcp_sock *tp = tcp_sk(sk);
if (in_flight < tp->snd_cwnd)

if (!tcp_is_cwnd_limited(sk, in_flight))
return;

if (tp->snd_cwnd <= tp->snd_ssthresh) {
Expand Down

0 comments on commit ac93ac6

Please sign in to comment.