* [PATCH] (1/3) tcp - choose congestion algorithm at initialization
@ 2004-09-27 18:18 Stephen Hemminger
2004-09-27 19:16 ` David S. Miller
2004-09-27 22:07 ` Herbert Xu
0 siblings, 2 replies; 8+ messages in thread
From: Stephen Hemminger @ 2004-09-27 18:18 UTC (permalink / raw)
To: David Miller; +Cc: netdev
The choice of congestion algorithm needs to be made when connection
is setup to avoid problems when the sysctl values change later and the
necessary data hasn't been collected.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Nru a/include/linux/tcp.h b/include/linux/tcp.h
--- a/include/linux/tcp.h 2004-09-27 10:56:46 -07:00
+++ b/include/linux/tcp.h 2004-09-27 10:56:46 -07:00
@@ -205,6 +205,13 @@
__u32 val;
} tcp_pcount_t;
+enum tcp_congestion_algo {
+ TCP_RENO=0,
+ TCP_VEGAS,
+ TCP_WESTWOOD,
+ TCP_BIC,
+};
+
struct tcp_opt {
int tcp_header_len; /* Bytes of tcp header to send */
@@ -265,7 +272,7 @@
__u8 frto_counter; /* Number of new acks after RTO */
__u32 frto_highmark; /* snd_nxt when RTO occurred */
- __u8 unused_pad;
+ __u8 adv_cong; /* Using Vegas, Westwood, or BIC */
__u8 defer_accept; /* User waits for some data after accept() */
/* one byte hole, try to pack */
@@ -412,7 +419,6 @@
__u32 beg_snd_nxt; /* right edge during last RTT */
__u32 beg_snd_una; /* left edge during last RTT */
__u32 beg_snd_cwnd; /* saves the size of the cwnd */
- __u8 do_vegas; /* do vegas for this connection */
__u8 doing_vegas_now;/* if true, do vegas for this RTT */
__u16 cntRTT; /* # of RTTs measured within last RTT */
__u32 minRTT; /* min of RTTs measured within last RTT (in usec) */
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h 2004-09-27 10:56:46 -07:00
+++ b/include/net/tcp.h 2004-09-27 10:56:46 -07:00
@@ -1271,6 +1271,13 @@
tcp_get_pcount(&tp->retrans_out));
}
+/*
+ * Which congestion algorithim is in use on the connection.
+ */
+#define tcp_is_vegas(__tp) ((__tp)->adv_cong == TCP_VEGAS)
+#define tcp_is_westwood(__tp) ((__tp)->adv_cong == TCP_WESTWOOD)
+#define tcp_is_bic(__tp) ((__tp)->adv_cong == TCP_BIC)
+
/* Recalculate snd_ssthresh, we want to set it to:
*
* Reno:
@@ -1283,7 +1290,7 @@
*/
static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
{
- if (sysctl_tcp_bic) {
+ if (tcp_is_bic(tp)) {
if (sysctl_tcp_bic_fast_convergence &&
tp->snd_cwnd < tp->bictcp.last_max_cwnd)
tp->bictcp.last_max_cwnd
@@ -1302,11 +1309,6 @@
/* Stop taking Vegas samples for now. */
#define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0)
-
-/* Is this TCP connection using Vegas (regardless of whether it is taking
- * Vegas measurements at the current time)?
- */
-#define tcp_is_vegas(__tp) ((__tp)->vegas.do_vegas)
static inline void tcp_vegas_enable(struct tcp_opt *tp)
{
@@ -1340,7 +1342,7 @@
/* Should we be taking Vegas samples right now? */
#define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now)
-extern void tcp_vegas_init(struct tcp_opt *tp);
+extern void tcp_ca_init(struct tcp_opt *tp);
static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state)
{
@@ -2024,7 +2026,7 @@
static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(tp))
tp->westwood.rtt = rtt_seq;
}
@@ -2033,13 +2035,13 @@
static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(tcp_sk(sk)))
__tcp_westwood_fast_bw(sk, skb);
}
static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(tcp_sk(sk)))
__tcp_westwood_slow_bw(sk, skb);
}
@@ -2052,14 +2054,14 @@
static inline __u32 tcp_westwood_bw_rttmin(const struct tcp_opt *tp)
{
- return sysctl_tcp_westwood ? __tcp_westwood_bw_rttmin(tp) : 0;
+ return tcp_is_westwood(tp) ? __tcp_westwood_bw_rttmin(tp) : 0;
}
static inline int tcp_westwood_ssthresh(struct tcp_opt *tp)
{
__u32 ssthresh = 0;
- if (sysctl_tcp_westwood) {
+ if (tcp_is_westwood(tp)) {
ssthresh = __tcp_westwood_bw_rttmin(tp);
if (ssthresh)
tp->snd_ssthresh = ssthresh;
@@ -2072,7 +2074,7 @@
{
__u32 cwnd = 0;
- if (sysctl_tcp_westwood) {
+ if (tcp_is_westwood(tp)) {
cwnd = __tcp_westwood_bw_rttmin(tp);
if (cwnd)
tp->snd_cwnd = cwnd;
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c 2004-09-27 10:56:46 -07:00
+++ b/net/ipv4/tcp_input.c 2004-09-27 10:56:46 -07:00
@@ -555,17 +555,20 @@
tcp_grow_window(sk, tp, skb);
}
-/* Set up a new TCP connection, depending on whether it should be
- * using Vegas or not.
- */
-void tcp_vegas_init(struct tcp_opt *tp)
+/* When starting a new connection, pin down the current choice of
+ * congestion algorithm.
+ */
+void tcp_ca_init(struct tcp_opt *tp)
{
- if (sysctl_tcp_vegas_cong_avoid) {
- tp->vegas.do_vegas = 1;
+ if (sysctl_tcp_westwood)
+ tp->adv_cong = TCP_WESTWOOD;
+ else if (sysctl_tcp_bic)
+ tp->adv_cong = TCP_BIC;
+ else if (sysctl_tcp_vegas_cong_avoid) {
+ tp->adv_cong = TCP_VEGAS;
tp->vegas.baseRTT = 0x7fffffff;
tcp_vegas_enable(tp);
- } else
- tcp_vegas_disable(tp);
+ }
}
/* Do RTT sampling needed for Vegas.
@@ -2039,7 +2042,7 @@
static inline __u32 bictcp_cwnd(struct tcp_opt *tp)
{
/* orignal Reno behaviour */
- if (!sysctl_tcp_bic)
+ if (!tcp_is_bic(tp))
return tp->snd_cwnd;
if (tp->bictcp.last_cwnd == tp->snd_cwnd &&
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
--- a/net/ipv4/tcp_minisocks.c 2004-09-27 10:56:46 -07:00
+++ b/net/ipv4/tcp_minisocks.c 2004-09-27 10:56:46 -07:00
@@ -841,7 +841,8 @@
if (newtp->ecn_flags&TCP_ECN_OK)
newsk->sk_no_largesend = 1;
- tcp_vegas_init(newtp);
+ tcp_ca_init(newtp);
+
TCP_INC_STATS_BH(TCP_MIB_PASSIVEOPENS);
}
return newsk;
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c 2004-09-27 10:56:46 -07:00
+++ b/net/ipv4/tcp_output.c 2004-09-27 10:56:46 -07:00
@@ -1359,7 +1359,7 @@
tp->window_clamp = dst_metric(dst, RTAX_WINDOW);
tp->advmss = dst_metric(dst, RTAX_ADVMSS);
tcp_initialize_rcv_mss(sk);
- tcp_vegas_init(tp);
+ tcp_ca_init(tp);
tcp_select_initial_window(tcp_full_space(sk),
tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0),
@@ -1411,7 +1411,7 @@
TCP_SKB_CB(buff)->end_seq = tp->write_seq;
tp->snd_nxt = tp->write_seq;
tp->pushed_seq = tp->write_seq;
- tcp_vegas_init(tp);
+ tcp_ca_init(tp);
/* Send it off. */
TCP_SKB_CB(buff)->when = tcp_time_stamp;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-27 18:18 [PATCH] (1/3) tcp - choose congestion algorithm at initialization Stephen Hemminger
@ 2004-09-27 19:16 ` David S. Miller
2004-10-01 22:55 ` Stephen Hemminger
2004-10-04 12:42 ` Angelo Dell'Aera
2004-09-27 22:07 ` Herbert Xu
1 sibling, 2 replies; 8+ messages in thread
From: David S. Miller @ 2004-09-27 19:16 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
On Mon, 27 Sep 2004 11:18:34 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> The choice of congestion algorithm needs to be made when connection
> is setup to avoid problems when the sysctl values change later and the
> necessary data hasn't been collected.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Looks great, applied.
We'll need 2.4.x versions of this stuff, could you cook
those up for me?
Thanks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-27 18:18 [PATCH] (1/3) tcp - choose congestion algorithm at initialization Stephen Hemminger
2004-09-27 19:16 ` David S. Miller
@ 2004-09-27 22:07 ` Herbert Xu
2004-09-28 5:58 ` David S. Miller
1 sibling, 1 reply; 8+ messages in thread
From: Herbert Xu @ 2004-09-27 22:07 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, netdev
Stephen Hemminger <shemminger@osdl.org> wrote:
> The choice of congestion algorithm needs to be made when connection
> is setup to avoid problems when the sysctl values change later and the
> necessary data hasn't been collected.
Could this be chosen by a setsockopt as well?
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-27 22:07 ` Herbert Xu
@ 2004-09-28 5:58 ` David S. Miller
2004-09-28 16:08 ` Stephen Hemminger
0 siblings, 1 reply; 8+ messages in thread
From: David S. Miller @ 2004-09-28 5:58 UTC (permalink / raw)
To: Herbert Xu; +Cc: shemminger, davem, netdev
On Tue, 28 Sep 2004 08:07:36 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Stephen Hemminger <shemminger@osdl.org> wrote:
> > The choice of congestion algorithm needs to be made when connection
> > is setup to avoid problems when the sysctl values change later and the
> > necessary data hasn't been collected.
>
> Could this be chosen by a setsockopt as well?
If we export such things with a user visible
interface, that makes it harder to rip out the
congestion control algorithm later. Such an
action is very likely so...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-28 5:58 ` David S. Miller
@ 2004-09-28 16:08 ` Stephen Hemminger
0 siblings, 0 replies; 8+ messages in thread
From: Stephen Hemminger @ 2004-09-28 16:08 UTC (permalink / raw)
To: David S. Miller; +Cc: Herbert Xu, davem, netdev
On Mon, 2004-09-27 at 22:58 -0700, David S. Miller wrote:
> On Tue, 28 Sep 2004 08:07:36 +1000
> Herbert Xu <herbert@gondor.apana.org.au> wrote:
>
> > Stephen Hemminger <shemminger@osdl.org> wrote:
> > > The choice of congestion algorithm needs to be made when connection
> > > is setup to avoid problems when the sysctl values change later and the
> > > necessary data hasn't been collected.
> >
> > Could this be chosen by a setsockopt as well?
>
> If we export such things with a user visible
> interface, that makes it harder to rip out the
> congestion control algorithm later. Such an
> action is very likely so...
The current set of algorithm's is because we haven't found the right
one. If it turns out there are multiple algortihm's that make sense to
support long term, then the choice should be done in as route hints
not as part of the user API.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-27 19:16 ` David S. Miller
@ 2004-10-01 22:55 ` Stephen Hemminger
2004-10-03 21:52 ` David S. Miller
2004-10-04 12:42 ` Angelo Dell'Aera
1 sibling, 1 reply; 8+ messages in thread
From: Stephen Hemminger @ 2004-10-01 22:55 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Here is the 2.4 version of the change to store congest algorithm
per socket.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
diff -Nru a/include/net/sock.h b/include/net/sock.h
--- a/include/net/sock.h 2004-10-01 15:51:48 -07:00
+++ b/include/net/sock.h 2004-10-01 15:51:48 -07:00
@@ -256,6 +256,13 @@
__u32 end_seq;
};
+enum tcp_congestion_algo {
+ TCP_RENO=0,
+ TCP_VEGAS,
+ TCP_WESTWOOD,
+ TCP_BIC,
+};
+
struct tcp_opt {
int tcp_header_len; /* Bytes of tcp header to send */
@@ -428,7 +435,8 @@
unsigned int keepalive_intvl; /* time interval between keep alive probes */
int linger2;
- int frto_counter; /* Number of new acks after RTO */
+ __u8 adv_cong; /* Using Vegas, Westwood, or BIC */
+ __u8 frto_counter; /* Number of new acks after RTO */
__u32 frto_highmark; /* snd_nxt when RTO occurred */
unsigned long last_synq_overflow;
@@ -465,7 +473,6 @@
__u32 beg_snd_nxt; /* right edge during last RTT */
__u32 beg_snd_una; /* left edge during last RTT */
__u32 beg_snd_cwnd; /* saves the size of the cwnd */
- __u8 do_vegas; /* do vegas for this connection */
__u8 doing_vegas_now;/* if true, do vegas for this RTT */
__u16 cntRTT; /* # of RTTs measured within last RTT */
__u32 minRTT; /* min of RTTs measured within last RTT (in usec) */
diff -Nru a/include/net/tcp.h b/include/net/tcp.h
--- a/include/net/tcp.h 2004-10-01 15:51:48 -07:00
+++ b/include/net/tcp.h 2004-10-01 15:51:48 -07:00
@@ -1110,6 +1110,13 @@
return tp->packets_out - tp->left_out + tp->retrans_out;
}
+/*
+ * Which congestion algorithim is in use on the connection.
+ */
+#define tcp_is_vegas(__tp) ((__tp)->adv_cong == TCP_VEGAS)
+#define tcp_is_westwood(__tp) ((__tp)->adv_cong == TCP_WESTWOOD)
+#define tcp_is_bic(__tp) ((__tp)->adv_cong == TCP_BIC)
+
/* Recalculate snd_ssthresh, we want to set it to:
*
* Reno:
@@ -1122,7 +1129,7 @@
*/
static inline __u32 tcp_recalc_ssthresh(struct tcp_opt *tp)
{
- if (sysctl_tcp_bic) {
+ if (tcp_is_bic(tp)) {
if (sysctl_tcp_bic_fast_convergence &&
tp->snd_cwnd < tp->bictcp.last_max_cwnd)
tp->bictcp.last_max_cwnd
@@ -1141,11 +1148,6 @@
/* Stop taking Vegas samples for now. */
#define tcp_vegas_disable(__tp) ((__tp)->vegas.doing_vegas_now = 0)
-
-/* Is this TCP connection using Vegas (regardless of whether it is taking
- * Vegas measurements at the current time)?
- */
-#define tcp_is_vegas(__tp) ((__tp)->vegas.do_vegas)
static inline void tcp_vegas_enable(struct tcp_opt *tp)
{
@@ -1179,7 +1181,7 @@
/* Should we be taking Vegas samples right now? */
#define tcp_vegas_enabled(__tp) ((__tp)->vegas.doing_vegas_now)
-extern void tcp_vegas_init(struct tcp_opt *tp);
+extern void tcp_ca_init(struct tcp_opt *tp);
static inline void tcp_set_ca_state(struct tcp_opt *tp, u8 ca_state)
{
@@ -1978,7 +1980,7 @@
static inline void tcp_westwood_update_rtt(struct tcp_opt *tp, __u32 rtt_seq)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(tp))
tp->westwood.rtt = rtt_seq;
}
@@ -2015,13 +2017,13 @@
static inline void tcp_westwood_fast_bw(struct sock *sk, struct sk_buff *skb)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(&(sk->tp_pinfo.af_tcp)))
__tcp_westwood_fast_bw(sk, skb);
}
static inline void tcp_westwood_slow_bw(struct sock *sk, struct sk_buff *skb)
{
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(&(sk->tp_pinfo.af_tcp)))
__tcp_westwood_slow_bw(sk, skb);
}
@@ -2035,7 +2037,7 @@
{
__u32 ret = 0;
- if (sysctl_tcp_westwood)
+ if (tcp_is_westwood(tp))
ret = (__u32) (max(__tcp_westwood_bw_rttmin(tp), 2U));
return ret;
@@ -2046,7 +2048,7 @@
int ret = 0;
__u32 ssthresh;
- if (sysctl_tcp_westwood) {
+ if (tcp_is_westwood(tp)) {
if (!(ssthresh = tcp_westwood_bw_rttmin(tp)))
return ret;
@@ -2062,7 +2064,7 @@
int ret = 0;
__u32 cwnd;
- if (sysctl_tcp_westwood) {
+ if (tcp_is_westwood(tp)) {
if (!(cwnd = tcp_westwood_bw_rttmin(tp)))
return ret;
@@ -2077,7 +2079,7 @@
{
int ret = 0;
- if (sysctl_tcp_westwood) {
+ if (tcp_is_westwood(tp)) {
if (tcp_westwood_cwnd(tp)) {
tp->snd_ssthresh = tp->snd_cwnd;
ret = 1;
diff -Nru a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
--- a/net/ipv4/tcp_input.c 2004-10-01 15:51:48 -07:00
+++ b/net/ipv4/tcp_input.c 2004-10-01 15:51:48 -07:00
@@ -549,17 +549,20 @@
tcp_grow_window(sk, tp, skb);
}
-/* Set up a new TCP connection, depending on whether it should be
- * using Vegas or not.
- */
-void tcp_vegas_init(struct tcp_opt *tp)
+/* When starting a new connection, pin down the current choice of
+ * congestion algorithm.
+ */
+void tcp_ca_init(struct tcp_opt *tp)
{
- if (sysctl_tcp_vegas_cong_avoid) {
- tp->vegas.do_vegas = 1;
+ if (sysctl_tcp_westwood)
+ tp->adv_cong = TCP_WESTWOOD;
+ else if (sysctl_tcp_bic)
+ tp->adv_cong = TCP_BIC;
+ else if (sysctl_tcp_vegas_cong_avoid) {
+ tp->adv_cong = TCP_VEGAS;
tp->vegas.baseRTT = 0x7fffffff;
tcp_vegas_enable(tp);
- } else
- tcp_vegas_disable(tp);
+ }
}
/* Do RTT sampling needed for Vegas.
@@ -2007,7 +2010,7 @@
static inline __u32 bictcp_cwnd(struct tcp_opt *tp)
{
/* orignal Reno behaviour */
- if (!sysctl_tcp_bic)
+ if (!tcp_is_bic(tp))
return tp->snd_cwnd;
if (tp->bictcp.last_cwnd == tp->snd_cwnd &&
diff -Nru a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
--- a/net/ipv4/tcp_minisocks.c 2004-10-01 15:51:48 -07:00
+++ b/net/ipv4/tcp_minisocks.c 2004-10-01 15:51:48 -07:00
@@ -788,7 +788,7 @@
newtp->mss_clamp = req->mss;
TCP_ECN_openreq_child(newtp, req);
- tcp_vegas_init(newtp);
+ tcp_ca_init(newtp);
TCP_INC_STATS_BH(TcpPassiveOpens);
}
return newsk;
diff -Nru a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
--- a/net/ipv4/tcp_output.c 2004-10-01 15:51:48 -07:00
+++ b/net/ipv4/tcp_output.c 2004-10-01 15:51:48 -07:00
@@ -1197,7 +1197,7 @@
tp->window_clamp = dst->window;
tp->advmss = dst->advmss;
tcp_initialize_rcv_mss(sk);
- tcp_vegas_init(tp);
+ tcp_ca_init(tp);
tcp_select_initial_window(tcp_full_space(sk),
tp->advmss - (tp->ts_recent_stamp ? tp->tcp_header_len - sizeof(struct tcphdr) : 0),
@@ -1248,7 +1248,7 @@
TCP_SKB_CB(buff)->end_seq = tp->write_seq;
tp->snd_nxt = tp->write_seq;
tp->pushed_seq = tp->write_seq;
- tcp_vegas_init(tp);
+ tcp_ca_init(tp);
/* Send it off. */
TCP_SKB_CB(buff)->when = tcp_time_stamp;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-10-01 22:55 ` Stephen Hemminger
@ 2004-10-03 21:52 ` David S. Miller
0 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2004-10-03 21:52 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
On Fri, 1 Oct 2004 15:55:54 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:
> Here is the 2.4 version of the change to store congest algorithm
> per socket.
>
> Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Applied, thanks for following up on this Stephen.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] (1/3) tcp - choose congestion algorithm at initialization
2004-09-27 19:16 ` David S. Miller
2004-10-01 22:55 ` Stephen Hemminger
@ 2004-10-04 12:42 ` Angelo Dell'Aera
1 sibling, 0 replies; 8+ messages in thread
From: Angelo Dell'Aera @ 2004-10-04 12:42 UTC (permalink / raw)
To: David S. Miller; +Cc: shemminger, netdev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 27 Sep 2004 12:16:10 -0700
"David S. Miller" <davem@redhat.com> wrote:
>> The choice of congestion algorithm needs to be made when connection
>> is setup to avoid problems when the sysctl values change later and the
>> necessary data hasn't been collected.
>Looks great, applied.
I completely agree with you. Really a cool work. Just a proposal now. If
the choice is made when the connection is established we do not need a
struct for every supported congestion control algorithm in the struct
tcp_opt any more. We could use for example a generic void * and then refer
it properly after Stephen's controls such as tcp_is_vegas(), tcp_is_bic(),
etc. This should slim the struct tcp_opt because if a connection is using
Westwood its tcpbic and vegas structs will never be used. Moreover, I think
it would make the code more readable.
Regards.
- --
Angelo Dell'Aera 'buffer'
Antifork Research, Inc. http://buffer.antifork.org
Metro Olografix
PGP information in e-mail header
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFBYUU4pONIzxnBXKIRArT5AJ0Ztak7xFH9DIEd24kRxCvMMxHrBACghKmE
e0CHh6gMpJaW02Y5HVA6u78=
=av9u
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-04 12:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 18:18 [PATCH] (1/3) tcp - choose congestion algorithm at initialization Stephen Hemminger
2004-09-27 19:16 ` David S. Miller
2004-10-01 22:55 ` Stephen Hemminger
2004-10-03 21:52 ` David S. Miller
2004-10-04 12:42 ` Angelo Dell'Aera
2004-09-27 22:07 ` Herbert Xu
2004-09-28 5:58 ` David S. Miller
2004-09-28 16:08 ` Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).