tcp: whitespace fixes
Fix places where there is space before tab, long lines, and awkward if(){, double spacing etc. Add blank line after declaration/initialization. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
d09d3038a3
commit
688d1945bc
@@ -17,7 +17,6 @@
|
||||
#include <linux/module.h>
|
||||
#include <net/tcp.h>
|
||||
|
||||
|
||||
#define BICTCP_BETA_SCALE 1024 /* Scale factor beta calculation
|
||||
* max_cwnd = snd_cwnd * beta
|
||||
*/
|
||||
@@ -46,11 +45,10 @@ MODULE_PARM_DESC(initial_ssthresh, "initial value of slow start threshold");
|
||||
module_param(smooth_part, int, 0644);
|
||||
MODULE_PARM_DESC(smooth_part, "log(B/(B*Smin))/log(B/(B-1))+B, # of RTT from Wmax-B to Wmax");
|
||||
|
||||
|
||||
/* BIC TCP Parameters */
|
||||
struct bictcp {
|
||||
u32 cnt; /* increase cwnd by 1 after ACKs */
|
||||
u32 last_max_cwnd; /* last maximum snd_cwnd */
|
||||
u32 last_max_cwnd; /* last maximum snd_cwnd */
|
||||
u32 loss_cwnd; /* congestion window at last loss */
|
||||
u32 last_cwnd; /* the last snd_cwnd */
|
||||
u32 last_time; /* time when updated last_cwnd */
|
||||
@@ -103,7 +101,7 @@ static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
|
||||
|
||||
/* binary increase */
|
||||
if (cwnd < ca->last_max_cwnd) {
|
||||
__u32 dist = (ca->last_max_cwnd - cwnd)
|
||||
__u32 dist = (ca->last_max_cwnd - cwnd)
|
||||
/ BICTCP_B;
|
||||
|
||||
if (dist > max_increment)
|
||||
@@ -154,7 +152,6 @@ static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
|
||||
bictcp_update(ca, tp->snd_cwnd);
|
||||
tcp_cong_avoid_ai(tp, ca->cnt);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -177,7 +174,6 @@ static u32 bictcp_recalc_ssthresh(struct sock *sk)
|
||||
|
||||
ca->loss_cwnd = tp->snd_cwnd;
|
||||
|
||||
|
||||
if (tp->snd_cwnd <= low_window)
|
||||
return max(tp->snd_cwnd >> 1U, 2U);
|
||||
else
|
||||
@@ -188,6 +184,7 @@ static u32 bictcp_undo_cwnd(struct sock *sk)
|
||||
{
|
||||
const struct tcp_sock *tp = tcp_sk(sk);
|
||||
const struct bictcp *ca = inet_csk_ca(sk);
|
||||
|
||||
return max(tp->snd_cwnd, ca->loss_cwnd);
|
||||
}
|
||||
|
||||
@@ -206,12 +203,12 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt)
|
||||
|
||||
if (icsk->icsk_ca_state == TCP_CA_Open) {
|
||||
struct bictcp *ca = inet_csk_ca(sk);
|
||||
|
||||
cnt -= ca->delayed_ack >> ACK_RATIO_SHIFT;
|
||||
ca->delayed_ack += cnt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static struct tcp_congestion_ops bictcp __read_mostly = {
|
||||
.init = bictcp_init,
|
||||
.ssthresh = bictcp_recalc_ssthresh,
|
||||
|
Reference in New Issue
Block a user