[Click] strange Queue behaviour
Eddie Kohler
kohler at cs.ucla.edu
Fri Oct 8 17:58:43 EDT 2004
Hi Peter!
It turned out this was a bug in user-level ToDevice. Here's the relevant patch:
diff -u -u -w -r1.27 todevice.hh
--- elements/userlevel/todevice.hh 8 Oct 2004 21:25:23 -0000 1.27
+++ elements/userlevel/todevice.hh 8 Oct 2004 21:54:13 -0000
@@ -90,7 +90,7 @@
~ToDevice();
const char *class_name() const { return "ToDevice"; }
- const char *processing() const { return AGNOSTIC; }
+ const char *processing() const { return "a/h"; }
const char *flags() const { return "S2"; }
int configure_phase() const { return FromDevice::CONFIGURE_PHASE_TODEVICE; }
So what was going on, you ask?? In the configuration with a Queue, ToDevice was
operating in "full pull mode" -- rather than the intended input=pull,
output=push -- and Discard (NOT ToDevice) ended up pulling packets off the
queue. They went trhough ToDevice as if ToDevice was a Null element, causing
the "Error on send" printouts; but there hadn't been an Error on send, there'd
been no *attempt* to send!
So, our bug, fixed now in cvs. Thanks for reporting it!
Eddie
Peter De Cleyn wrote:
> Hi all,
>
> While debugging a larger configuration used in userspace, which
> occasionally reported errors when sending packets (packets were
> returned on output 1 of ToDevice whithout further indication of an
> error), I wrote myself the following simple testconfiguration.
>
> out::Queue()->ToDevice(eth1)->Print("Error on send")->Discard;
> arpq::ARPQuerier(192.168.0.1, 00:0E:0C:37:BF:36);
>
> FromDevice("eth1")->class::Classifier(12/0806 20/0001, //arp request
> 12/0806 20/0002, //arp response
> 12/0800, //ip
> -); //other
>
> class[0]->ARPResponder(192.168.0.1 00:0E:0C:37:BF:36)
> ->out;
>
> class[1]->[1]arpq->out;
>
> class[2]->CheckIPHeader(14)->IPPrint("incoming")->Discard();
>
> class[3]->Print("Discard")->Discard();
>
> ICMPPingSource(192.168.0.1, 192.168.0.2, INTERVAL 1)
> ->arpq;
>
> I expected some basic ping behaviour, but the only output I got on screen was:
>
> Error on send: 42 | ffffffff ffff000e 0c37bf36 08060001 08000604 0001000e
> Error on send: 42 | ffffffff ffff000e 0c37bf36 08060001 08000604 0001000e
> ...
>
> Which are actually the ARP requests one would expect to be sent before
> the ICMP messages could be sent.
>
> When I omitted the Queue from the configuration, everything worked fine.
> thus the first line of the configuration became:
>
> out::ToDevice(eth1)->Print("Error on send")->Discard;
>
> As the ToDevice did not provided extra output ( looking into the code
> of ToDevice, I expected some messages), I added my own debug output at
> the beginning of send_packet() and push() and noticed that this was
> printed when I didn't use the Queue, but they didn't appear when using
> it. I tried with Queue, SimpleQueue and MSQueue and click versions
> 1.4.1, 1.4pre1 and 1.3pre1. The configuration was also tested with
> different machines, using different types of NICs.
>
> Could someone point me out what I am missing here?
>
> thanks a lot for helping me out!
>
> Peter
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list