Sometimes, you may wish to run an application by using a dummy interface
that never receives any packets and that discards transmitted packets.
This is possible with non-looping pcap pktio with no input and output
pcaps. So, the pktio would be just "pcap:". However, you cannot have two
pktios named "pcap:" because there is code to check if the pktio is
already opened. Also, the pcap pktio requires that ODP is compiled with
the pcap library, which it may not be.
Also, recently a patch was provided to ODP to allow interruptible sleep
when receiving packets. This, however, does not work with mixed pcap and
socket/netmap pktio types.
To fix these issues, a new "null" pktio is introduced. It is used by
specifying the interface name to be "null:0", "null:1", or similar. All
packets sent to the null pktio are discarded and no packets are
received. The null pktio fully supports the interruptible sleep
infrastructure, meaning applications can have 0% idle CPU load when one
interface is a null interface and another interface is socket or netmap.
Note this patch depends on the genuinesleep patch. So, do not merge this
patch yet! The patch can, however, be reviewed.
Signed-off-by: Juha-Matti Tilli [email protected]

----------------github------------------------
/** Email created from pull request 365 (jmtilli:nullpktio)
 ** https://github.com/Linaro/odp/pull/365
 ** Patch: https://github.com/Linaro/odp/pull/365.patch
 ** Base sha: f1449d2555fbfa3d72aeb79d3ad6d2f199e83731
 ** Merge commit sha: dfd19c141174b2de7b89e7b95ab23b19139afb13
 **/
----------------/github------------------------

----------------checkpatch.pl------------------------
total: 0 errors, 0 warnings, 0 checks, 569 lines checked


to_send-p-000.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 15 lines checked


to_send-p-001.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 310 lines checked


to_send-p-002.patch has no obvious style problems and is ready for submission.
total: 0 errors, 0 warnings, 0 checks, 31 lines checked


to_send-p-003.patch has no obvious style problems and is ready for submission.
----------------/checkpatch.pl------------------------

Reply via email to