[Click] empty queue

Harald Schioeberg harald at net.t-labs.tu-berlin.de
Thu Aug 19 09:31:05 EDT 2010


Hi Panos, 

do you run in CPU-bounded conditions? If click is CPU bound, it will
give strong precedence to egress, meaning that ingress may not see all
the packets that you expect.

Harald

On Wed, 2010-08-18 at 17:52 +0000, Panos Μatzakos wrote: 
> Hello, as i had mentioned in a previous mail i try to implement a mac
>  protocol (802.11 csma/ca) for my thesis and i am using the following
>  flowgraph:
> 
> Timedsource -> Queue -> mysocket -> Discard
> 
> where mysocket is the main element of my router which implements the
>  algorithm of the protocol and sends packets to PHY through sockets.
>  Then, i needed a way to know from "mysocket" when the queue becomes
>  empty because it is of great importance for my protocol. The simplest
>  way that was suggested to me was this:
> 
> mysocket::pull() { 
>   Packet * p = input(0).pull();
>   if(p == NULL){
>       return 0;} 
> 
> } p is NULL exactly if Queue is empty.  Everything seemed to work nice
>  but when i tried to test my protocol in saturation conditions (in
>  which case the queue is always non empty) by securing that the
>  incoming rate of the queue is much higher than the outcoming rate i
>  noticed that the queue got empty sometimes. Specifically i wrote the
>  following code:
> 
> Packet * p = input(0).pull(); 
>     if(p == NULL){
>         cout<<"NULL!!"<<endl;
>         return 0;
>     }
> 
> and noticed that the "NULL!!" message was printed although it
>  shouldn't. One thing that i am not sure about is what happens exactly
>  when the queue holds capacity, which is a case that obviously
>  interests me because as i said my incoming rate is greater than the
>  outcoming rate. In the description of the queue element it says "Drops
>  incoming packets if the queue already holds CAPACITY packets". What i
>  understand from this is that the packets which are dropped are the new
>  ones which are generated from timedsource and not the ones which are
>  already in the queue, so the queue should still remain non empty. So
>  do you have any idea about what happens and my queue still gets empty
>  under these conditions?
> 
> One last thing i need to ask as i want to be sure if i have understood
>  everything right is the following. In my flowgraph the element which
>  initiates the packet flow after the queue element is the Discard
>  element by a pull connection from its input. Is that right?
> 
> 
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click





More information about the click mailing list