Commit 74975d40 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller

[TCP] Congestion control (modulo lp, bic): use BUILD_BUG_ON

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4e9b520
...@@ -358,7 +358,7 @@ static struct tcp_congestion_ops cubictcp = { ...@@ -358,7 +358,7 @@ static struct tcp_congestion_ops cubictcp = {
static int __init cubictcp_register(void) static int __init cubictcp_register(void)
{ {
BUG_ON(sizeof(struct bictcp) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct bictcp) > ICSK_CA_PRIV_SIZE);
/* Precompute a bunch of the scaling factors that are used per-packet /* Precompute a bunch of the scaling factors that are used per-packet
* based on SRTT of 100ms * based on SRTT of 100ms
......
...@@ -189,7 +189,7 @@ static struct tcp_congestion_ops tcp_highspeed = { ...@@ -189,7 +189,7 @@ static struct tcp_congestion_ops tcp_highspeed = {
static int __init hstcp_register(void) static int __init hstcp_register(void)
{ {
BUG_ON(sizeof(struct hstcp) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct hstcp) > ICSK_CA_PRIV_SIZE);
return tcp_register_congestion_control(&tcp_highspeed); return tcp_register_congestion_control(&tcp_highspeed);
} }
......
...@@ -286,7 +286,7 @@ static struct tcp_congestion_ops htcp = { ...@@ -286,7 +286,7 @@ static struct tcp_congestion_ops htcp = {
static int __init htcp_register(void) static int __init htcp_register(void)
{ {
BUG_ON(sizeof(struct htcp) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct htcp) > ICSK_CA_PRIV_SIZE);
BUILD_BUG_ON(BETA_MIN >= BETA_MAX); BUILD_BUG_ON(BETA_MIN >= BETA_MAX);
return tcp_register_congestion_control(&htcp); return tcp_register_congestion_control(&htcp);
} }
......
...@@ -170,7 +170,7 @@ static struct tcp_congestion_ops tcp_hybla = { ...@@ -170,7 +170,7 @@ static struct tcp_congestion_ops tcp_hybla = {
static int __init hybla_register(void) static int __init hybla_register(void)
{ {
BUG_ON(sizeof(struct hybla) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct hybla) > ICSK_CA_PRIV_SIZE);
return tcp_register_congestion_control(&tcp_hybla); return tcp_register_congestion_control(&tcp_hybla);
} }
......
...@@ -370,7 +370,7 @@ static struct tcp_congestion_ops tcp_vegas = { ...@@ -370,7 +370,7 @@ static struct tcp_congestion_ops tcp_vegas = {
static int __init tcp_vegas_register(void) static int __init tcp_vegas_register(void)
{ {
BUG_ON(sizeof(struct vegas) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct vegas) > ICSK_CA_PRIV_SIZE);
tcp_register_congestion_control(&tcp_vegas); tcp_register_congestion_control(&tcp_vegas);
return 0; return 0;
} }
......
...@@ -212,7 +212,7 @@ static struct tcp_congestion_ops tcp_veno = { ...@@ -212,7 +212,7 @@ static struct tcp_congestion_ops tcp_veno = {
static int __init tcp_veno_register(void) static int __init tcp_veno_register(void)
{ {
BUG_ON(sizeof(struct veno) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct veno) > ICSK_CA_PRIV_SIZE);
tcp_register_congestion_control(&tcp_veno); tcp_register_congestion_control(&tcp_veno);
return 0; return 0;
} }
......
...@@ -289,7 +289,7 @@ static struct tcp_congestion_ops tcp_westwood = { ...@@ -289,7 +289,7 @@ static struct tcp_congestion_ops tcp_westwood = {
static int __init tcp_westwood_register(void) static int __init tcp_westwood_register(void)
{ {
BUG_ON(sizeof(struct westwood) > ICSK_CA_PRIV_SIZE); BUILD_BUG_ON(sizeof(struct westwood) > ICSK_CA_PRIV_SIZE);
return tcp_register_congestion_control(&tcp_westwood); return tcp_register_congestion_control(&tcp_westwood);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment