extending simple_action() to multiple ports
Ian Rose <ianrose <at> eecs.harvard.edu>
2010-05-03 18:37:29 GMT
Howdy -
A few months ago there was an email to the list concerning (in part) the
fact that simple_action always operates on input port 0 (when pulling)
and output port 0 (when pushing):
http://pdos.csail.mit.edu/pipermail/click/2010-March/008810.html
Eddie pointed out that there were very few existing N-to-N elements
where packets entering on port i exit only on port i, and since these
are essentially the only kinds of elements that would benefit from the
proposed change to simple action, the code would be left as-is.
At the time this logic seemed reasonable to me, but now I am beginning
to think that maybe simple_action *should* be changed as proposed
(namely, input and output ports should match). AND a number of existing
elements could be changed to N-to-N in order to make use of this.
For example:
all of the Counter elements can be used to count the sum of multiple
independent packet flows
many of the Timestamp and TCP/IP Measurement elements can be used to
monitor multiple independent packet flows
many modification elements (e.g. RandomBitErrors, EtherEncap,
IPsecEncap, Paint, etc.) can be used to modify multiple packet flows -
although you can of course do this with 1 element per flow, the
advantage to using a single element is that it can simplify code,
(Continue reading)