Skip to content

Commit

Permalink
tcp: mark tcp_congestion_ops read_mostly
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Stephen Hemminger authored and davem330 committed Mar 10, 2011
1 parent cc7e17e commit a252beb
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_bic.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt)
}


static struct tcp_congestion_ops bictcp = {
static struct tcp_congestion_ops bictcp __read_mostly = {
.init = bictcp_init,
.ssthresh = bictcp_recalc_ssthresh,
.cong_avoid = bictcp_cong_avoid,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_cubic.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ static void bictcp_acked(struct sock *sk, u32 cnt, s32 rtt_us)
hystart_update(sk, delay);
}

static struct tcp_congestion_ops cubictcp = {
static struct tcp_congestion_ops cubictcp __read_mostly = {
.init = bictcp_init,
.ssthresh = bictcp_recalc_ssthresh,
.cong_avoid = bictcp_cong_avoid,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_highspeed.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static u32 hstcp_ssthresh(struct sock *sk)
}


static struct tcp_congestion_ops tcp_highspeed = {
static struct tcp_congestion_ops tcp_highspeed __read_mostly = {
.init = hstcp_init,
.ssthresh = hstcp_ssthresh,
.cong_avoid = hstcp_cong_avoid,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_htcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static void htcp_state(struct sock *sk, u8 new_state)
}
}

static struct tcp_congestion_ops htcp = {
static struct tcp_congestion_ops htcp __read_mostly = {
.init = htcp_init,
.ssthresh = htcp_recalc_ssthresh,
.cong_avoid = htcp_cong_avoid,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_hybla.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
tp->snd_cwnd = min_t(u32, tp->snd_cwnd, tp->snd_cwnd_clamp);
}

static struct tcp_congestion_ops tcp_hybla = {
static struct tcp_congestion_ops tcp_hybla __read_mostly = {
.init = hybla_init,
.ssthresh = tcp_reno_ssthresh,
.min_cwnd = tcp_reno_min_cwnd,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_illinois.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ static void tcp_illinois_info(struct sock *sk, u32 ext,
}
}

static struct tcp_congestion_ops tcp_illinois = {
static struct tcp_congestion_ops tcp_illinois __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_illinois_init,
.ssthresh = tcp_illinois_ssthresh,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_lp.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, s32 rtt_us)
lp->last_drop = tcp_time_stamp;
}

static struct tcp_congestion_ops tcp_lp = {
static struct tcp_congestion_ops tcp_lp __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_lp_init,
.ssthresh = tcp_reno_ssthresh,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_scalable.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static u32 tcp_scalable_ssthresh(struct sock *sk)
}


static struct tcp_congestion_ops tcp_scalable = {
static struct tcp_congestion_ops tcp_scalable __read_mostly = {
.ssthresh = tcp_scalable_ssthresh,
.cong_avoid = tcp_scalable_cong_avoid,
.min_cwnd = tcp_reno_min_cwnd,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_vegas.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void tcp_vegas_get_info(struct sock *sk, u32 ext, struct sk_buff *skb)
}
EXPORT_SYMBOL_GPL(tcp_vegas_get_info);

static struct tcp_congestion_ops tcp_vegas = {
static struct tcp_congestion_ops tcp_vegas __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_vegas_init,
.ssthresh = tcp_reno_ssthresh,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_veno.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static u32 tcp_veno_ssthresh(struct sock *sk)
return max(tp->snd_cwnd >> 1U, 2U);
}

static struct tcp_congestion_ops tcp_veno = {
static struct tcp_congestion_ops tcp_veno __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_veno_init,
.ssthresh = tcp_veno_ssthresh,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_westwood.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void tcp_westwood_info(struct sock *sk, u32 ext,
}


static struct tcp_congestion_ops tcp_westwood = {
static struct tcp_congestion_ops tcp_westwood __read_mostly = {
.init = tcp_westwood_init,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_reno_cong_avoid,
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_yeah.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ static u32 tcp_yeah_ssthresh(struct sock *sk) {
return tp->snd_cwnd - reduction;
}

static struct tcp_congestion_ops tcp_yeah = {
static struct tcp_congestion_ops tcp_yeah __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_yeah_init,
.ssthresh = tcp_yeah_ssthresh,
Expand Down

0 comments on commit a252beb

Please sign in to comment.