On Sun, Oct 2, 2016 at 1:55 AM, David Gwynne <[email protected]> wrote:
> i think the change to move tcp timers to timeouts got this bit wrong.
>
> we do want to print the timer if it is pending, it doesnt make sense
> otherwise.
...
> --- trpt.c 27 Aug 2016 01:50:07 -0000 1.33
> +++ trpt.c 2 Oct 2016 08:51:21 -0000
> @@ -401,7 +401,7 @@ tcp_trace(short act, short ostate, struc
> int i;
>
> for (i = 0; i < TCPT_NTIMERS; i++) {
> - if (timeout_pending(&tp->t_timer[i]))
> + if (!timeout_pending(&tp->t_timer[i]))
Reading 14 year old diffs again, eh?
- if (tp->t_timer[i] == 0)
+ if (timeout_pending(&tp->t_timer[i]))
Yeah, that test looks backwards. ok guenther@
That reminds me: I believe this code in trpt.c is dead:
if (req == PRU_SLOWTIMO || req == PRU_FASTTIMO)
printf("<%s>", tcptimers[timer]);
PRU_{SLOW,FAST}TIMO are no longer used in the kernel, so they'll never
appear in trace records.
Philip Guenther