diff -r 2d224f2aec43 sys/netinet/cc.h --- a/sys/netinet/cc.h Mon Jan 31 17:59:03 2011 +1100 +++ b/sys/netinet/cc.h Mon Jan 31 19:29:10 2011 +1100 @@ -101,10 +101,11 @@ struct cc_var { * bits (0x01000000 - 0x80000000) are reserved for CC algos to declare their own * congestion signal types. */ -#define CC_ECN 0x000001/* ECN marked packet received. */ -#define CC_RTO 0x000002/* RTO fired. */ -#define CC_RTO_ERR 0x000004/* RTO fired in error. */ -#define CC_NDUPACK 0x000008/* Threshold of dupack's reached. */ +#define CC_SIGPRIVMASK 0xFF000000 /* Mask to check if sig is private. */ +#define CC_ECN 0x00000001 /* ECN marked packet received. */ +#define CC_RTO 0x00000002 /* RTO fired. */ +#define CC_RTO_ERR 0x00000004 /* RTO fired in error. */ +#define CC_NDUPACK 0x00000008 /* Threshold of dupack's reached. */ /* * Structure to hold data and function pointers that together represent a diff -r 2d224f2aec43 sys/netinet/cc/cc_newreno.c --- a/sys/netinet/cc/cc_newreno.c Mon Jan 31 17:59:03 2011 +1100 +++ b/sys/netinet/cc/cc_newreno.c Mon Jan 31 19:29:10 2011 +1100 @@ -182,6 +182,9 @@ newreno_cong_signal(struct cc_var *ccv, { u_int win; + KASSERT((type & CC_SIGPRIVMASK) == 0, + ("%s: congestion signal type 0x%x is private!\n", __func__, type)); + win = max(CCV(ccv, snd_cwnd) / 2 / CCV(ccv, t_maxseg), 2) * CCV(ccv, t_maxseg);