KernelTun: Use IFF_NO_PI on Linux, remove LINUX_ETHERTAP mode #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a commit from kohler/click#397 rebased on FastClick element (after introduction of batching and multi-threading).
This commit adds flag IFF_NO_PI to tun/tap interface settings on Linux.
It flag changes frame format in order not to include protocol
information header. That is, with this flag, frames received/send from
tun/tap fd consist solely of raw underlying protocol (Ethernet/IP)
frames.
Protocol information header is not used by the element in any way, but
its presence adds a requirement for pulling packet data on receive and
pushing it before writing packet to the fd. Such a push becomes an
expensive push when there is is no enough headroom in packet, for
example when using native netmap buffers which do not have headroom.
Adding IFF_NO_PI flag eliminates the need for pulling and pushing
packet data completely.
Moreover, this commit removes support for LINUX_ETHERTAP mode. Ethertap
driver was removed from the kernel more than 15 years ago. Removal of
this mode significantly simplifies the logic within the element.