* [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops
@ 2014-02-12 13:35 Stanislav Fomichev
2014-02-12 15:42 ` Yuchung Cheng
2014-02-13 23:22 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Fomichev @ 2014-02-12 13:35 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber, edumazet, ncardwell, ycheng
Cc: netdev
Commit 684bad110757 "tcp: use PRR to reduce cwin in CWR state" removed all
calls to min_cwnd, so we can safely remove it.
Also, remove tcp_reno_min_cwnd because it was only used for min_cwnd.
Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
---
Documentation/networking/tcp.txt | 2 +-
include/net/tcp.h | 3 ---
net/ipv4/tcp_cong.c | 10 ----------
net/ipv4/tcp_highspeed.c | 1 -
net/ipv4/tcp_hybla.c | 1 -
net/ipv4/tcp_illinois.c | 1 -
net/ipv4/tcp_lp.c | 1 -
net/ipv4/tcp_scalable.c | 1 -
net/ipv4/tcp_vegas.c | 1 -
net/ipv4/tcp_westwood.c | 1 -
net/ipv4/tcp_yeah.c | 1 -
11 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/Documentation/networking/tcp.txt b/Documentation/networking/tcp.txt
index 7d11bb5dc30a..bdc4c0db51e1 100644
--- a/Documentation/networking/tcp.txt
+++ b/Documentation/networking/tcp.txt
@@ -30,7 +30,7 @@ A congestion control mechanism can be registered through functions in
tcp_cong.c. The functions used by the congestion control mechanism are
registered via passing a tcp_congestion_ops struct to
tcp_register_congestion_control. As a minimum name, ssthresh,
-cong_avoid, min_cwnd must be valid.
+cong_avoid must be valid.
Private data for a congestion control mechanism is stored in tp->ca_priv.
tcp_ca(tp) returns a pointer to this space. This is preallocated space - it
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 70e55d200610..8ccc431f7269 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -793,8 +793,6 @@ struct tcp_congestion_ops {
/* return slow start threshold (required) */
u32 (*ssthresh)(struct sock *sk);
- /* lower bound for congestion window (optional) */
- u32 (*min_cwnd)(const struct sock *sk);
/* do new cwnd calculation (required) */
void (*cong_avoid)(struct sock *sk, u32 ack, u32 acked, u32 in_flight);
/* call before changing ca_state (optional) */
@@ -829,7 +827,6 @@ void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w);
extern struct tcp_congestion_ops tcp_init_congestion_ops;
u32 tcp_reno_ssthresh(struct sock *sk);
void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked, u32 in_flight);
-u32 tcp_reno_min_cwnd(const struct sock *sk);
extern struct tcp_congestion_ops tcp_reno;
static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state)
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index ad37bf18ae4b..f49351edf97d 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -362,21 +362,12 @@ u32 tcp_reno_ssthresh(struct sock *sk)
}
EXPORT_SYMBOL_GPL(tcp_reno_ssthresh);
-/* Lower bound on congestion window with halving. */
-u32 tcp_reno_min_cwnd(const struct sock *sk)
-{
- const struct tcp_sock *tp = tcp_sk(sk);
- return tp->snd_ssthresh/2;
-}
-EXPORT_SYMBOL_GPL(tcp_reno_min_cwnd);
-
struct tcp_congestion_ops tcp_reno = {
.flags = TCP_CONG_NON_RESTRICTED,
.name = "reno",
.owner = THIS_MODULE,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_reno_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
};
/* Initial congestion control used (until SYN)
@@ -388,6 +379,5 @@ struct tcp_congestion_ops tcp_init_congestion_ops = {
.owner = THIS_MODULE,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_reno_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
};
EXPORT_SYMBOL_GPL(tcp_init_congestion_ops);
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c
index 8ed9305dfdf4..8b9e7bad77c0 100644
--- a/net/ipv4/tcp_highspeed.c
+++ b/net/ipv4/tcp_highspeed.c
@@ -162,7 +162,6 @@ static struct tcp_congestion_ops tcp_highspeed __read_mostly = {
.init = hstcp_init,
.ssthresh = hstcp_ssthresh,
.cong_avoid = hstcp_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
.owner = THIS_MODULE,
.name = "highspeed"
diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
index 478fe82611bf..2a1a9e2a4e51 100644
--- a/net/ipv4/tcp_hybla.c
+++ b/net/ipv4/tcp_hybla.c
@@ -166,7 +166,6 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 acked,
static struct tcp_congestion_ops tcp_hybla __read_mostly = {
.init = hybla_init,
.ssthresh = tcp_reno_ssthresh,
- .min_cwnd = tcp_reno_min_cwnd,
.cong_avoid = hybla_cong_avoid,
.set_state = hybla_state,
diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
index 8a520996f3d2..560d9879b89c 100644
--- a/net/ipv4/tcp_illinois.c
+++ b/net/ipv4/tcp_illinois.c
@@ -329,7 +329,6 @@ static struct tcp_congestion_ops tcp_illinois __read_mostly = {
.flags = TCP_CONG_RTT_STAMP,
.init = tcp_illinois_init,
.ssthresh = tcp_illinois_ssthresh,
- .min_cwnd = tcp_reno_min_cwnd,
.cong_avoid = tcp_illinois_cong_avoid,
.set_state = tcp_illinois_state,
.get_info = tcp_illinois_info,
diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
index 991d62a2f9bb..503798f2fcd6 100644
--- a/net/ipv4/tcp_lp.c
+++ b/net/ipv4/tcp_lp.c
@@ -319,7 +319,6 @@ static struct tcp_congestion_ops tcp_lp __read_mostly = {
.init = tcp_lp_init,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_lp_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
.pkts_acked = tcp_lp_pkts_acked,
.owner = THIS_MODULE,
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c
index 19ea6c2951f3..0ac50836da4d 100644
--- a/net/ipv4/tcp_scalable.c
+++ b/net/ipv4/tcp_scalable.c
@@ -39,7 +39,6 @@ static u32 tcp_scalable_ssthresh(struct sock *sk)
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,
.owner = THIS_MODULE,
.name = "scalable",
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 06cae62bf208..a022c17c9cf1 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -310,7 +310,6 @@ static struct tcp_congestion_ops tcp_vegas __read_mostly = {
.init = tcp_vegas_init,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_vegas_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
.pkts_acked = tcp_vegas_pkts_acked,
.set_state = tcp_vegas_state,
.cwnd_event = tcp_vegas_cwnd_event,
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 76a1e23259e1..b94a04ae2ed5 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -276,7 +276,6 @@ static struct tcp_congestion_ops tcp_westwood __read_mostly = {
.init = tcp_westwood_init,
.ssthresh = tcp_reno_ssthresh,
.cong_avoid = tcp_reno_cong_avoid,
- .min_cwnd = tcp_westwood_bw_rttmin,
.cwnd_event = tcp_westwood_event,
.get_info = tcp_westwood_info,
.pkts_acked = tcp_westwood_pkts_acked,
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index a347a078ee07..5d2d15c5295f 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -231,7 +231,6 @@ static struct tcp_congestion_ops tcp_yeah __read_mostly = {
.init = tcp_yeah_init,
.ssthresh = tcp_yeah_ssthresh,
.cong_avoid = tcp_yeah_cong_avoid,
- .min_cwnd = tcp_reno_min_cwnd,
.set_state = tcp_vegas_state,
.cwnd_event = tcp_vegas_cwnd_event,
.get_info = tcp_vegas_get_info,
--
1.8.3.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops
2014-02-12 13:35 [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops Stanislav Fomichev
@ 2014-02-12 15:42 ` Yuchung Cheng
2014-02-13 23:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Yuchung Cheng @ 2014-02-12 15:42 UTC (permalink / raw)
To: Stanislav Fomichev
Cc: David Miller, kuznet, jmorris, yoshfuji, kaber, Eric Dumazet,
Neal Cardwell, netdev
On Wed, Feb 12, 2014 at 5:35 AM, Stanislav Fomichev
<stfomichev@yandex-team.ru> wrote:
> Commit 684bad110757 "tcp: use PRR to reduce cwin in CWR state" removed all
> calls to min_cwnd, so we can safely remove it.
> Also, remove tcp_reno_min_cwnd because it was only used for min_cwnd.
>
> Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
Acked-by: Yuchung Cheng <ycheng@google.com>
> ---
> Documentation/networking/tcp.txt | 2 +-
> include/net/tcp.h | 3 ---
> net/ipv4/tcp_cong.c | 10 ----------
> net/ipv4/tcp_highspeed.c | 1 -
> net/ipv4/tcp_hybla.c | 1 -
> net/ipv4/tcp_illinois.c | 1 -
> net/ipv4/tcp_lp.c | 1 -
> net/ipv4/tcp_scalable.c | 1 -
> net/ipv4/tcp_vegas.c | 1 -
> net/ipv4/tcp_westwood.c | 1 -
> net/ipv4/tcp_yeah.c | 1 -
> 11 files changed, 1 insertion(+), 22 deletions(-)
>
> diff --git a/Documentation/networking/tcp.txt b/Documentation/networking/tcp.txt
> index 7d11bb5dc30a..bdc4c0db51e1 100644
> --- a/Documentation/networking/tcp.txt
> +++ b/Documentation/networking/tcp.txt
> @@ -30,7 +30,7 @@ A congestion control mechanism can be registered through functions in
> tcp_cong.c. The functions used by the congestion control mechanism are
> registered via passing a tcp_congestion_ops struct to
> tcp_register_congestion_control. As a minimum name, ssthresh,
> -cong_avoid, min_cwnd must be valid.
> +cong_avoid must be valid.
>
> Private data for a congestion control mechanism is stored in tp->ca_priv.
> tcp_ca(tp) returns a pointer to this space. This is preallocated space - it
> diff --git a/include/net/tcp.h b/include/net/tcp.h
> index 70e55d200610..8ccc431f7269 100644
> --- a/include/net/tcp.h
> +++ b/include/net/tcp.h
> @@ -793,8 +793,6 @@ struct tcp_congestion_ops {
>
> /* return slow start threshold (required) */
> u32 (*ssthresh)(struct sock *sk);
> - /* lower bound for congestion window (optional) */
> - u32 (*min_cwnd)(const struct sock *sk);
> /* do new cwnd calculation (required) */
> void (*cong_avoid)(struct sock *sk, u32 ack, u32 acked, u32 in_flight);
> /* call before changing ca_state (optional) */
> @@ -829,7 +827,6 @@ void tcp_cong_avoid_ai(struct tcp_sock *tp, u32 w);
> extern struct tcp_congestion_ops tcp_init_congestion_ops;
> u32 tcp_reno_ssthresh(struct sock *sk);
> void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 acked, u32 in_flight);
> -u32 tcp_reno_min_cwnd(const struct sock *sk);
> extern struct tcp_congestion_ops tcp_reno;
>
> static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state)
> diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
> index ad37bf18ae4b..f49351edf97d 100644
> --- a/net/ipv4/tcp_cong.c
> +++ b/net/ipv4/tcp_cong.c
> @@ -362,21 +362,12 @@ u32 tcp_reno_ssthresh(struct sock *sk)
> }
> EXPORT_SYMBOL_GPL(tcp_reno_ssthresh);
>
> -/* Lower bound on congestion window with halving. */
> -u32 tcp_reno_min_cwnd(const struct sock *sk)
> -{
> - const struct tcp_sock *tp = tcp_sk(sk);
> - return tp->snd_ssthresh/2;
> -}
> -EXPORT_SYMBOL_GPL(tcp_reno_min_cwnd);
> -
> struct tcp_congestion_ops tcp_reno = {
> .flags = TCP_CONG_NON_RESTRICTED,
> .name = "reno",
> .owner = THIS_MODULE,
> .ssthresh = tcp_reno_ssthresh,
> .cong_avoid = tcp_reno_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
> };
>
> /* Initial congestion control used (until SYN)
> @@ -388,6 +379,5 @@ struct tcp_congestion_ops tcp_init_congestion_ops = {
> .owner = THIS_MODULE,
> .ssthresh = tcp_reno_ssthresh,
> .cong_avoid = tcp_reno_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
> };
> EXPORT_SYMBOL_GPL(tcp_init_congestion_ops);
> diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c
> index 8ed9305dfdf4..8b9e7bad77c0 100644
> --- a/net/ipv4/tcp_highspeed.c
> +++ b/net/ipv4/tcp_highspeed.c
> @@ -162,7 +162,6 @@ static struct tcp_congestion_ops tcp_highspeed __read_mostly = {
> .init = hstcp_init,
> .ssthresh = hstcp_ssthresh,
> .cong_avoid = hstcp_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
>
> .owner = THIS_MODULE,
> .name = "highspeed"
> diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
> index 478fe82611bf..2a1a9e2a4e51 100644
> --- a/net/ipv4/tcp_hybla.c
> +++ b/net/ipv4/tcp_hybla.c
> @@ -166,7 +166,6 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 acked,
> static struct tcp_congestion_ops tcp_hybla __read_mostly = {
> .init = hybla_init,
> .ssthresh = tcp_reno_ssthresh,
> - .min_cwnd = tcp_reno_min_cwnd,
> .cong_avoid = hybla_cong_avoid,
> .set_state = hybla_state,
>
> diff --git a/net/ipv4/tcp_illinois.c b/net/ipv4/tcp_illinois.c
> index 8a520996f3d2..560d9879b89c 100644
> --- a/net/ipv4/tcp_illinois.c
> +++ b/net/ipv4/tcp_illinois.c
> @@ -329,7 +329,6 @@ static struct tcp_congestion_ops tcp_illinois __read_mostly = {
> .flags = TCP_CONG_RTT_STAMP,
> .init = tcp_illinois_init,
> .ssthresh = tcp_illinois_ssthresh,
> - .min_cwnd = tcp_reno_min_cwnd,
> .cong_avoid = tcp_illinois_cong_avoid,
> .set_state = tcp_illinois_state,
> .get_info = tcp_illinois_info,
> diff --git a/net/ipv4/tcp_lp.c b/net/ipv4/tcp_lp.c
> index 991d62a2f9bb..503798f2fcd6 100644
> --- a/net/ipv4/tcp_lp.c
> +++ b/net/ipv4/tcp_lp.c
> @@ -319,7 +319,6 @@ static struct tcp_congestion_ops tcp_lp __read_mostly = {
> .init = tcp_lp_init,
> .ssthresh = tcp_reno_ssthresh,
> .cong_avoid = tcp_lp_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
> .pkts_acked = tcp_lp_pkts_acked,
>
> .owner = THIS_MODULE,
> diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c
> index 19ea6c2951f3..0ac50836da4d 100644
> --- a/net/ipv4/tcp_scalable.c
> +++ b/net/ipv4/tcp_scalable.c
> @@ -39,7 +39,6 @@ static u32 tcp_scalable_ssthresh(struct sock *sk)
> 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,
>
> .owner = THIS_MODULE,
> .name = "scalable",
> diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
> index 06cae62bf208..a022c17c9cf1 100644
> --- a/net/ipv4/tcp_vegas.c
> +++ b/net/ipv4/tcp_vegas.c
> @@ -310,7 +310,6 @@ static struct tcp_congestion_ops tcp_vegas __read_mostly = {
> .init = tcp_vegas_init,
> .ssthresh = tcp_reno_ssthresh,
> .cong_avoid = tcp_vegas_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
> .pkts_acked = tcp_vegas_pkts_acked,
> .set_state = tcp_vegas_state,
> .cwnd_event = tcp_vegas_cwnd_event,
> diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
> index 76a1e23259e1..b94a04ae2ed5 100644
> --- a/net/ipv4/tcp_westwood.c
> +++ b/net/ipv4/tcp_westwood.c
> @@ -276,7 +276,6 @@ static struct tcp_congestion_ops tcp_westwood __read_mostly = {
> .init = tcp_westwood_init,
> .ssthresh = tcp_reno_ssthresh,
> .cong_avoid = tcp_reno_cong_avoid,
> - .min_cwnd = tcp_westwood_bw_rttmin,
> .cwnd_event = tcp_westwood_event,
> .get_info = tcp_westwood_info,
> .pkts_acked = tcp_westwood_pkts_acked,
> diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
> index a347a078ee07..5d2d15c5295f 100644
> --- a/net/ipv4/tcp_yeah.c
> +++ b/net/ipv4/tcp_yeah.c
> @@ -231,7 +231,6 @@ static struct tcp_congestion_ops tcp_yeah __read_mostly = {
> .init = tcp_yeah_init,
> .ssthresh = tcp_yeah_ssthresh,
> .cong_avoid = tcp_yeah_cong_avoid,
> - .min_cwnd = tcp_reno_min_cwnd,
> .set_state = tcp_vegas_state,
> .cwnd_event = tcp_vegas_cwnd_event,
> .get_info = tcp_vegas_get_info,
> --
> 1.8.3.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops
2014-02-12 13:35 [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops Stanislav Fomichev
2014-02-12 15:42 ` Yuchung Cheng
@ 2014-02-13 23:22 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-02-13 23:22 UTC (permalink / raw)
To: stfomichev
Cc: kuznet, jmorris, yoshfuji, kaber, edumazet, ncardwell, ycheng, netdev
From: Stanislav Fomichev <stfomichev@yandex-team.ru>
Date: Wed, 12 Feb 2014 17:35:21 +0400
> Commit 684bad110757 "tcp: use PRR to reduce cwin in CWR state" removed all
> calls to min_cwnd, so we can safely remove it.
> Also, remove tcp_reno_min_cwnd because it was only used for min_cwnd.
>
> Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-13 23:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 13:35 [PATCH] [CLEANUP] tcp: remove unused min_cwnd member of tcp_congestion_ops Stanislav Fomichev
2014-02-12 15:42 ` Yuchung Cheng
2014-02-13 23:22 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.