-
Notifications
You must be signed in to change notification settings - Fork 298
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
Merge vpn performancev2 #221
Commits on Jun 26, 2014
-
Add capability to recycle objects to class.lua
The creation of instance objects should be avoided in packet processing loops to reduce garbage collection overhead. class.lua now supports a simple mechanism where an app can declare an object to no longer be in use. This object is then put on a list in the corresponding class and will be re-used by the constructor method instead of allocating a new object. The class API has been changed slightly to no longer require the declaration of constructor methods. Any method can act as a constructor or extend the standard constructor by calling the new() method of the super class.
Configuration menu - View commit details
-
Copy full SHA for da22a6f - Browse repository at this point
Copy the full SHA da22a6fView commit details -
Adapt lib/protocol and apps/vpn to the new class.lua semantics
Also includes some minor bug fixes here and there.
Configuration menu - View commit details
-
Copy full SHA for 97241c2 - Browse repository at this point
Copy the full SHA 97241c2View commit details -
The conversion from numeric to printable for ipv6 addresses was seriously broken. The fix includes a redefinition of the source and destination address in the ipv6 header as uint8_t.
Configuration menu - View commit details
-
Copy full SHA for c6da968 - Browse repository at this point
Copy the full SHA c6da968View commit details -
Add a simple interface to libpcap's packet filter
lib/pcap/filter.lua provides a facility to compile an arbitrary libpcap filter expression and apply it to a data packet for efficient classification.
Configuration menu - View commit details
-
Copy full SHA for 0a6c926 - Browse repository at this point
Copy the full SHA 0a6c926View commit details -
Add functionality to the datagram module
The new method parse_match() allows the parsing and matching of a single protocol header without having to allocate a table, which can help to avoid garbage. The new method parse_n() parses exactly n protocol headers without applying any additional checks. Also new is the pop_raw() method that pops a protocol header without parsing it. This requires the application to already know the type and size of the next header.
Configuration menu - View commit details
-
Copy full SHA for 145a937 - Browse repository at this point
Copy the full SHA 145a937View commit details -
Add support for the new pcap filter module to vpws and ns_responder
Both apps use the efficient filter module to avoid garbage during packet classification.
Configuration menu - View commit details
-
Copy full SHA for 26c99eb - Browse repository at this point
Copy the full SHA 26c99ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for ce22d3d - Browse repository at this point
Copy the full SHA ce22d3dView commit details -
Full support for GRE and ICMPv6 checksum
The vpws and ns_responder apps now handle checksums correctly in all cases. The GRE key field is now supported correctly as well.
Configuration menu - View commit details
-
Copy full SHA for 3dff243 - Browse repository at this point
Copy the full SHA 3dff243View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba90499 - Browse repository at this point
Copy the full SHA ba90499View commit details -
Fix initialization bug in buffer.new_buffer()
The origin.type member of a newly allocated buffer needs to be set explicitely after receiving a memory block with undefined contents from malloc(3).
Configuration menu - View commit details
-
Copy full SHA for 18a8155 - Browse repository at this point
Copy the full SHA 18a8155View commit details -
Tunings to reduce garbage and eliminate NYIs
lib/protocol/datagram.lua: pre-allocate the _packet variable upon instantiation as ctype "struct packet *[1]" to avoid boxing. This appears to eliminate the bulk of garbage in the datagram class. lib/protocol/icmp/: pre-define pointer ctypes in various classes to avoid NYIs due to unsupported FastFunc ffi.typeof. lib/protocol/ipv6.lua: pre-allocate a pseudo-header for every ipv6 object to avoid another NYI. lib/protocol/header.lua and all module that touch the _header instance variable: create _header as array of a single pointer to the actual header, just like in datagram.lua. The cast operation in new_from_mem() will update the array rather than create a new boxed pointer.
Configuration menu - View commit details
-
Copy full SHA for 5c4f12c - Browse repository at this point
Copy the full SHA 5c4f12cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 92a5087 - Browse repository at this point
Copy the full SHA 92a5087View commit details
Commits on Jun 27, 2014
-
Use a better way to deal with variable-size protocol headers
A previous commit that reduces garbage in the lib/protocol code broke the handling of variable-sized protocol headers, specifically gre. The gre code and the generic code in lib/protocol/header.lua has bee rewritten to use subclasses in such a case. This makes the code cleaner and allows proper recycling of objects on a per header-type basis.
Configuration menu - View commit details
-
Copy full SHA for 17bf5fc - Browse repository at this point
Copy the full SHA 17bf5fcView commit details
Commits on Jul 2, 2014
-
Configuration menu - View commit details
-
Copy full SHA for a6b0a9b - Browse repository at this point
Copy the full SHA a6b0a9bView commit details -
Replace compile-time '-lpcap' with runtime 'ffi.load("pcap",true)'
Libpcap will be dynamically found and linked at runtime if/when the lib.pcap.filter module is loaded.
Configuration menu - View commit details
-
Copy full SHA for f0edb8c - Browse repository at this point
Copy the full SHA f0edb8cView commit details