New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
L2 VPN take 2 #138
Merged
Merged
L2 VPN take 2 #138
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A basic framework for classes with single inheritance is provided in src/lib/lua/class.lua, which is required by core/main.lua by default. The new directory src/lib/lua is intended to be used to store common low-level Lua code. In that spirit, src/strict.lua has been moved there as well.
…to src/core/lib.lua
core.packet.prepend_iovec() adds a buffer to the front of the iovecs core.packet.coalesce() attempts to coalesce all buffers into a single one
The set of classes in src/lib/protocol provide basic mechanisms for parsing, building and manipulating a hierarchy of protocol headers and associated payload contained in a data packet. In particular, it supports * Parsing and in-place manipulation of protocol headers in a received packet * In-place decapsulation by removing leading protocol headers * Adding encapsulation headers to an existing packet * Creation of a new packet
The RawSocket app provided in src/apps/socket can be used to read and write bare packets from regular network devices. It can be used to access NICs for which no native Snabb Switch driver exists. It can also facilitate debugging with, e.g., tcpdump, which is not straight forward to use with the native driver. The app is not recommended for handling traffic with high demands on performance.
RawVhost provides the same functionality as RawSocket but should have better performance. However, performance is actually worse :( It could be worth while to understand why. Or maybe this is not a useful thing at all.
The app provides the bare minimum needed for address resolution of remote hosts on the same subnet. It filters out NS for a single pre-defined IPv6 target address and responds with a NA that provides a pre-defined link-layer address.
A simple string as argument to an app's new() method makes it difficult to implement non-trivial configurations. The downside is that it's harder to detect when the configuration has changed and the app needs to be reconfigured.
The intel10g and vhost drivers don't handle multi-buffer packets on transmit correctly. vhost also ignores iovec.offset.
lukego
added a commit
that referenced
this pull request
Apr 17, 2014
Merged Alex Gall's VPN app and datagram support.
Great! and nicely rebased :-) |
dpino
pushed a commit
to dpino/snabb
that referenced
this pull request
Dec 7, 2015
Backport: IPv6 fragmentation: don't leak memory/packets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request incorporates all changes I've made sine the first request. I have also made more sensible commits this time which hopefully make it easier to understand.
Up front: please let's not waste time again on the
class.lua
thing. I acknowledge that it's controversial. It's still there because Luke asked me to keep it. Whether we need a convention for OOP in this project or not and how it should look like should better be discussed elsewhere. It should have little to no impact on the main purpose of this pull request.The gist of it is to see whether we can have the cake and it, too. I.e. whether we can have higher-level, reusable code for packet handling without dramatic loss of performance. The current code clearly falls short of that. Getting rid of the "NYIs" was fairly easy but the real challenge is to avoid GC. The encapsulation is not that bad (however still not quite acceptable, in particular due to the jitter that it induces in the forwarding path) but the packet matching for decapsulation sucks big time. Let's find out if this can be made to work or whether we need something entirely different.
I have some interesting real-life performance figures to share, but I'll take that to the mailing list.
make test
onchur
fails forcore.lib
andapps.vhost.vhost_user
, but it does so on the master branch as well.I have also included workarounds for bugs related to the transmission of multi-buffer packets. Those are not proposed fixes, of course.