ng_source is a module for debugging and performance measurement within netgraph.
The current implementation is designed to emit packets to an physical ethernet interface and tries to maximize the hardware throughput. There is already code to limit the packet rate injected (maxpps) further.
The whole code is able to inject any netgraph messages into any netgraph network, despite the dependency to a physical interface prohibits this at the moment.
This patch allows to use the ng_source module to be used in arbitary netgraph network. In order to limit the rate of packets injected, the maxpps part needs to be enforced if there is no assigned ethernet interface available.
I personally use this patch to profile somewhat complex netgraph networks, which terminate in i.e. in eiface nodes.
PR:240530