[Click] Question about push and pull packet processing

amaxis99 at yahoo.it amaxis99 at yahoo.it
Mon Jun 16 11:39:51 EDT 2008


Hi,

I have written an element with N inputs and M outputs: actually, it
manages packets using push method and I would like to make it
agnostic, essentially to check if push/pull processing has some
relevant impact on performance. Anyway, this element sends packets on
a predefined output in conjunction with the input on which the packet
is received: the code is something like

void push(int port, Packet* p) {
 int k;
 <...>
 if (port == 0) {
    <some stuff>
    output(1).push(p);
    return;
 }
 if (port == 1) {
    <other stuff>
    output(k).push(p);
    return;
 }
 <...>
 output(0).push(p);
}

My question: is it possible to achive the same behavior using an
agnostic processing, since the simple_action doesn't include the
input/output port number in its arguments?

Thanks

--

Massimiliano


More information about the click mailing list