svn commit: r188111 - in projects/tcp_cc_7.x/sys: . contrib/pf
dev/ath/ath_hal dev/cxgb netinet
Lawrence Stewart
lstewart at FreeBSD.org
Tue Feb 3 17:11:39 PST 2009
Author: lstewart
Date: Wed Feb 4 01:11:37 2009
New Revision: 188111
URL: http://svn.freebsd.org/changeset/base/188111
Log:
Merge r188109 from tcp_cc_8.x
Modified:
projects/tcp_cc_7.x/sys/ (props changed)
projects/tcp_cc_7.x/sys/contrib/pf/ (props changed)
projects/tcp_cc_7.x/sys/dev/ath/ath_hal/ (props changed)
projects/tcp_cc_7.x/sys/dev/cxgb/ (props changed)
projects/tcp_cc_7.x/sys/netinet/cc.c
projects/tcp_cc_7.x/sys/netinet/cc_cubic.c
projects/tcp_cc_7.x/sys/netinet/cc_htcp.c
projects/tcp_cc_7.x/sys/netinet/tcp_input.c
projects/tcp_cc_7.x/sys/netinet/tcp_output.c
projects/tcp_cc_7.x/sys/netinet/tcp_subr.c
projects/tcp_cc_7.x/sys/netinet/tcp_timer.c
projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c
Modified: projects/tcp_cc_7.x/sys/netinet/cc.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/cc.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/cc.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -82,7 +82,7 @@ cc_default_algorithm(SYSCTL_HANDLER_ARGS
{
struct cc_algo *funcs;
- if (!req->newptr)
+ if (req->newptr == NULL)
goto skip;
CC_LIST_RLOCK();
@@ -213,9 +213,9 @@ cc_deregister_algorithm(struct cc_algo *
* using the deregistered algo's functions...
* Not sure how to do that yet!
*/
- if(CC_ALGO(tp)->init)
+ if(CC_ALGO(tp)->init != NULL)
CC_ALGO(tp)->init(tp);
- if (tmpfuncs->deinit)
+ if (tmpfuncs->deinit != NULL)
tmpfuncs->deinit(tp);
}
}
Modified: projects/tcp_cc_7.x/sys/netinet/cc_cubic.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/cc_cubic.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -147,7 +147,7 @@ cubic_init(struct tcpcb *tp)
void
cubic_deinit(struct tcpcb *tp)
{
- if (CC_DATA(tp))
+ if (CC_DATA(tp) != NULL)
free(CC_DATA(tp), M_CUBIC);
}
Modified: projects/tcp_cc_7.x/sys/netinet/cc_htcp.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/cc_htcp.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -214,7 +214,7 @@ htcp_deinit(struct tcpcb *tp)
printf("deinitialising tcp connection with htcp congestion control\n");
#endif
- if (CC_DATA(tp))
+ if (CC_DATA(tp) != NULL)
FREE(CC_DATA(tp), M_HTCP);
}
@@ -491,7 +491,7 @@ htcp_ssthresh_update(struct tcpcb *tp)
static int
htcp_rtt_scaling_handler(SYSCTL_HANDLER_ARGS)
{
- if(!req->newptr)
+ if(req->newptr == NULL)
goto skip;
/* if the value passed in isn't 0 or 1, return an error */
@@ -505,7 +505,7 @@ skip:
static int
htcp_adaptive_backoff_handler(SYSCTL_HANDLER_ARGS)
{
- if(!req->newptr)
+ if(req->newptr == NULL)
goto skip;
/* if the value passed in isn't 0 or 1, return an error */
@@ -520,7 +520,7 @@ skip:
static int
htcp_debug_ticks_handler(SYSCTL_HANDLER_ARGS)
{
- if(!req->newptr)
+ if(req->newptr == NULL)
goto skip;
/* if the value passed in is less than 1 */
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_input.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -1818,7 +1818,7 @@ tcp_do_segment(struct mbuf *m, struct tc
* defined a hook for tasks to run
* before entering FR, call it
*/
- if (CC_ALGO(tp)->pre_fr)
+ if (CC_ALGO(tp)->pre_fr != NULL)
CC_ALGO(tp)->pre_fr(tp, th);
ENTER_FASTRECOVERY(tp);
@@ -1893,7 +1893,7 @@ tcp_do_segment(struct mbuf *m, struct tc
else
tcp_newreno_partial_ack(tp, th);
} else {
- if (CC_ALGO(tp)->post_fr)
+ if (CC_ALGO(tp)->post_fr != NULL)
CC_ALGO(tp)->post_fr(tp, th);
}
}
@@ -1998,7 +1998,7 @@ process_ACK:
* congestion control algorithm in use for this connection.
*/
if (!IN_FASTRECOVERY(tp)) {
- if (CC_ALGO(tp)->ack_received)
+ if (CC_ALGO(tp)->ack_received != NULL)
CC_ALGO(tp)->ack_received(tp, th);
}
SOCKBUF_LOCK(&so->so_snd);
@@ -2889,7 +2889,7 @@ tcp_mss(struct tcpcb *tp, int offer)
tp->snd_bandwidth = metrics.rmx_bandwidth;
/* set the initial cwnd value */
- if (CC_ALGO(tp)->cwnd_init)
+ if (CC_ALGO(tp)->cwnd_init != NULL)
CC_ALGO(tp)->cwnd_init(tp);
else
tp->snd_cwnd = mss;
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_output.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_output.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_output.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -159,7 +159,7 @@ tcp_output(struct tcpcb *tp)
idle = (tp->t_flags & TF_LASTIDLE) || (tp->snd_max == tp->snd_una);
if (idle && (ticks - tp->t_rcvtime) >= tp->t_rxtcur) {
/* reset cwnd after a period of idleness */
- if (CC_ALGO(tp)->after_idle)
+ if (CC_ALGO(tp)->after_idle != NULL)
CC_ALGO(tp)->after_idle(tp);
}
tp->t_flags &= ~TF_LASTIDLE;
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_subr.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_subr.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -777,7 +777,7 @@ tcp_discardcb(struct tcpcb *tp)
tcp_free_sackholes(tp);
/* Allow the cc algorithm in use for this cb to clean up after itself */
- if (CC_ALGO(tp)->deinit)
+ if (CC_ALGO(tp)->deinit != NULL)
CC_ALGO(tp)->deinit(tp);
CC_ALGO(tp) = NULL;
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_timer.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_timer.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -519,7 +519,7 @@ tcp_timer_rexmt(void * xtp)
*/
tp->t_rtttime = 0;
- if (CC_ALGO(tp)->after_timeout)
+ if (CC_ALGO(tp)->after_timeout != NULL)
CC_ALGO(tp)->after_timeout(tp);
tp->t_dupacks = 0;
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Wed Feb 4 01:02:56 2009 (r188110)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_usrreq.c Wed Feb 4 01:11:37 2009 (r188111)
@@ -1400,7 +1400,7 @@ tcp_ctloutput(struct socket *so, struct
* so it's safe to do these things
* without ordering concerns
*/
- if (CC_ALGO(tp)->deinit)
+ if (CC_ALGO(tp)->deinit != NULL)
CC_ALGO(tp)->deinit(tp);
CC_ALGO(tp) = cc_algo;
/*
More information about the svn-src-projects
mailing list