[Click] Thank you ------- small bug--? in SimpleQueue element
Yuliang Li,
Electrical & Electronic Engineering
Yuliang.Li at bristol.ac.uk
Sun Nov 6 11:54:42 EST 2005
Dear Eddie:
Thank you very much for your mail again.
Now things became really clear to me. I didn't do the research carefully
for the Discard element.
Thank you and appreciate for all your work in Click.
Yuliang
--On 06 November 2005 08:18 -0800 Eddie Kohler <kohler at cs.ucla.edu> wrote:
> Yuliang,
>
> Thanks for sending the configuration. But do not send Word files to me
> or this list in future. Plaintext would have been much better.
>
> Your code is still wrong. It is not correct. It is a bad idea,
> completely erroneous, and horribly, tragically wrong. It will cause any
> Queue to drop *all future packets* after receiving CAPACITY packets, no
> matter how many packets are drained from the queue. That is wrong wrong
> wrong wrong wrong. Just trying to be clear :)
>
> I think you're missing the fact that the Discard element in this
> configuration is active. That is, it is actively trying to empty the
> queue. Do you understand about push and pull? (If not, it is explained
> in our papers.) Discard is actively trying to empty the queue by removing
> packets from the queue's head. It throws away any packets that it pulls.
> That is why your first configuration has no drops; the Queue never gets a
> chance to drop them, because the Discard drops them first.
>
> Here are two things to try.
>
> RatedSource(DATASIZE 1000, RATE 4294967295) -> Print(OK) ->
> SimpleQueue(2) -> Print(ABOUT TO DROP) -> Discard;
>
> RatedSource(DATASIZE 1000, RATE 4294967295) -> Print(OK) ->
> SimpleQueue(2) -> Idle;
>
> Eddie
>
>
> Yuliang Li, Electrical & Electronic Engineering wrote:
>> 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
>> *****************************************************************
>>
*****************************************************************
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
*****************************************************************
More information about the click
mailing list