diff -r 7189cfe0c605 sys/netinet/khelp/h_ertt.c --- a/sys/netinet/khelp/h_ertt.c Mon Jan 24 19:07:47 2011 +1100 +++ b/sys/netinet/khelp/h_ertt.c Mon Jan 24 23:19:27 2011 +1100 @@ -2,7 +2,7 @@ * Copyright (c) 2009-2010 * Swinburne University of Technology, Melbourne, Australia * Copyright (c) 2010 Lawrence Stewart - * Copyright (c) 2010 The FreeBSD Foundation + * Copyright (c) 2010-2011 The FreeBSD Foundation * All rights reserved. * * This software was developed at the Centre for Advanced Internet @@ -148,7 +148,7 @@ marked_packet_rtt(struct txseginfo *txsi if (mflag & (MULTI_ACK|OLD_TXSI)) { *pmeasurenext = txsi->tx_ts; *pmeasurenext_len = txsi->len; - *prtt_bytes_adjust += *pmeasurenext_len; + *prtt_bytes_adjust += *pmeasurenext_len; } else { if (mflag & FORCED_MEASUREMENT) { e_t->markedpkt_rtt = ticks - *pmeasurenext + 1; @@ -176,7 +176,7 @@ marked_packet_rtt(struct txseginfo *txsi if (tp->t_flags & TF_TSO) { /* Temporarily disable TSO to aid a new measurment. */ tp->t_flags &= ~TF_TSO; - /* Note that I've done it so I can re-enable it later. */ + /* Keep track that we've disabled it. */ e_t->flags |= ERTT_TSO_DISABLED; } } @@ -203,6 +203,9 @@ ertt_packet_measurement_hook(int hhook_t uint32_t measurenext, rts; tcp_seq ack; + KASSERT(ctx_data != NULL, ("%s: ctx_data is NULL!", __func__)); + KASSERT(hdata != NULL, ("%s: hdata is NULL!", __func__)); + e_t = (struct ertt *)hdata; thdp = ctx_data; tp = thdp->tp; @@ -315,7 +318,7 @@ ertt_packet_measurement_hook(int hhook_t if (rts == txsi->tx_ts && TSTMP_LT(to->to_tsval, txsi->rx_ts)) { /* - * Segment received before sent!!! + * Segment received before sent! * Something is wrong with the received * timestamps so increment errors. If * this keeps up we will ignore @@ -433,6 +436,9 @@ ertt_add_tx_segment_info_hook(int hhook_ long len; int tso; + KASSERT(ctx_data != NULL, ("%s: ctx_data is NULL!", __func__)); + KASSERT(hdata != NULL, ("%s: hdata is NULL!", __func__)); + e_t = (struct ertt *)hdata; thdp = ctx_data; tp = thdp->tp; @@ -485,7 +491,7 @@ static int ertt_mod_init(void) { - txseginfo_zone = uma_zcreate("txseginfo", sizeof(struct txseginfo), + txseginfo_zone = uma_zcreate("ertt_txseginfo", sizeof(struct txseginfo), NULL, NULL, NULL, NULL, 0, 0); return (0);