Re: dummynet log messages after recent update

From: Chuck Swiger <cswiger_at_mac.com>
Date: Fri, 13 Nov 2009 11:40:44 -0800
Hi, Ben--

On Nov 13, 2009, at 10:43 AM, Ben Kelly wrote:
> I recently upgraded my firewall from a soekris net4501 to a  
> net5501.  As part of this process I update my freebsd sources to  
> CURRENT as of 11/13/2009 1300 GMT.  Once the new box was up and  
> running I noticed some odd output in the logs:
>
>  Nov 13 18:30:19 gate kernel: dummynet: OUCH! pipe should have been  
> idle!
>  Nov 13 18:30:34 gate last message repeated 15 times

The message is coming from netinet/ip_dummynet.c:

                 /*
                  * Look at eligibility. A flow is not eligibile if  
S>V (when
                  * this happens, it means that there is some other  
flow already
                  * scheduled for the same pipe, so the scheduler_heap  
cannot be
                  * empty). If the flow is not eligible we just store  
it in the
                  * not_eligible_heap. Otherwise, we store in the  
scheduler_heap
                  * and possibly invoke ready_event_wfq() right now if  
there is
                  * leftover credit.
                  * Note that for all flows in scheduler_heap (SCH),  
S_i <= V,
                  * and for all flows in not_eligible_heap (NEH), S_i  
 > V.
                  * So when we need to compute max(V, min(S_i)) forall  
i in
                  * SCH+NEH, we only need to look into NEH.
                  */
                 if (DN_KEY_GT(q->S, pipe->V)) {         /* Not  
eligible. */
                         if (pipe->scheduler_heap.elements == 0)
                                 printf("dummynet: ++ ouch! not  
eligible but empty scheduler!\n");
                         heap_insert(&(pipe->not_eligible_heap), q->S,  
q);
                 } else {
                         heap_insert(&(pipe->scheduler_heap), q->F, q);
                         if (pipe->numbytes >= 0) {       /* Pipe is  
idle. */
                                 if (pipe->scheduler_heap.elements != 1)
                                         printf("dummynet: OUCH! pipe  
should have been idle!\n");
                                 DPRINTF(("dummynet: waking up pipe %d  
at %d\n",
                                     pipe->pipe_nr, (int)(q->F >>  
MY_M)));
                                 pipe->sched_time = curr_time;
                                 ready_event_wfq(pipe, &head, &tail);
                         }
                 }

I'm not entirely sure of logic in the /* Pipe is idle. */ test is  
right-- if pipe->numbytes == 0, I'd agree the pipe is idle, but if you  
have some bytes of traffic in the pipe, the the assumption that the  
current packet is the only traffic doesn't seem to make sense.  But,  
I'm not the author of the code....  :-)

Regards,
-- 
-Chuck
Received on Fri Nov 13 2009 - 18:40:57 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:58 UTC