NBA
NBA copied to clipboard
General improvements for Click compatibility
For our Retro-Click project, this issue collects commits related to general improvements for Click compatibility.
Examples:
-
Uniquefying / cloning of packets:
There are several core use cases of cloning packets and pushing them to multiple output elements, such as TCP/IP fragmenter and switching logic.
However, the current NBA only allows pushing to only one element by returning the output port index, because it is easier to batch by storing those return values in a single array and we have targeted only a "receive-process-and-forward" type of workloads.
Let's make a design to allow cloning packets and passing them to multiple different elements. -
Output port selection in elements
NBA has used return values to determine the output port selection for each packet in an element.
Change it to Click-like
output(n).push(pkt);
.
Packet::uniqueify() seems to be implemented to maintain compatibility with Click, however it simply returns nullptr. I think it should behave same as Packet::clone(), so elements following Click's convention can run in NBA.
Please check codes here.
@protos37: It's just not done yet. :)
@protos37: And now you have write access to this repository. Feel free to make branches and PRs.