[Click] Re: small bug--? in SimpleQueue element
Yuliang Li,
Electrical & Electronic Engineering
Yuliang.Li at bristol.ac.uk
Sun Nov 6 08:10:55 EST 2005
Dear Eddie:
Sorry for my last unclear mail. Comparing next and _capacity is what I have
changed. The original is the next comparing with _head.
A more clear specification has been attached with this mail.
Thank you again.
--On 04 November 2005 10:31 -0800 Eddie Kohler <kohler at cs.ucla.edu> wrote:
> Hi Yuliang,
>
> I don't understand the problem you're referring to, but your fix is
> certainly wrong. Click's queues store packets in a circular array;
> comparing next and _capacity is correct.
>
> Eddie
>
>
> Yuliang Li, Electrical & Electronic Engineering wrote:
>> Dear Eddie:
>> Thank you very much for your Click. It is really interesting and
>> powerful.
>>
>> My name is Yuliang Li. I am a third year PhD student from the University
>> of Bristol, UK. I am using Click to do some implementation in the area
>> of Congestion Control.
>>
>> I found a small problem when I am using the SimpleQueue element. It
>> never gives me the number of packets which have been dropped at whatever
>> the source rate is. So I changed the 'push' function, to let 'next'
>> comparing with the '_capacity' (originally comparing with '_head'). It
>> seems this is more reasonable.
>>
>>
>> void
>> SimpleQueue::push(int, Packet *p)
>> {
>> // If you change this code, also change NotifierQueue::push().
>> int next = next_i(_tail);
>>
>> // should this stuff be in SimpleQueue::enq?
>> if (next != _capacity) {
>> _q[_tail] = p;
>> _tail = next;
>>
>> int s = size();
>> if (s > _highwater_length)
>> _highwater_length = s;
>>
>> } else {
>> // if (!(_drops % 100))
>> if (_drops == 0)
>> click_chatter("%{element}: overflow", this);
>> _drops++;
>> p->kill();
>> }
>> }
>>
>> Do you think is this a small bug in the program? Or are their any
>> special meaning for using '_head'.
>>
>> Thank you very much
>>
>>
>>
>> *****************************************************************
>> Yuliang Li PhD student
>> Wireless and Networks Research Laboratory
>> Department of Electrical and Electronic Engineering
>> University of Bristol Bristol BS8 1UB
>> United Kingdom Tel: +44 117 3315059
>> Email: Yuliang.Li at bristol.ac.uk
>> *****************************************************************
>>
>>
>
*****************************************************************
Yuliang Li PhD student
Wireless and Networks Research Laboratory
Department of Electrical and Electronic Engineering
University of Bristol Bristol BS8 1UB
United Kingdom Tel: +44 117 3315059
Email: Yuliang.Li at bristol.ac.uk
*****************************************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimpleQueueTest.doc
Type: application/msword
Size: 34816 bytes
Desc: not available
Url : https://amsterdam.lcs.mit.edu/pipermail/click/attachments/20051106/a16ac1ab/SimpleQueueTest-0001.doc
More information about the click
mailing list