-
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 lwaftr to next #1047
Merge lwaftr to next #1047
Conversation
'lwaftr query' improvements
Use a fixed amount of memory for reassembling IPv6 fragments, on a ctable. It only allocates once, on initialization, and never frees memory. When the backing table is full, it randomly ejects fragments. Tests include out-of-order reassembly. Bounds checking is done to avoid buffer overflows, regardles of input offsets. This includes a to-memory clone for Igalia's struct packet implementation. This allows IPv6 reassembly to avoid a subtle packet corruption bug on implementations where packet.data is an abstraction rather than a raw buffer.
This requires new tests to only be added to one file, rather than two, helping maintainability.
Normalize the vlan and non-vlan test suite
Merge ipv6 hardening
This is ctables-based, and similar to hardened IPv6 reassembly.
Hardened IPv4 reassembly. All tests pass.
Our codebase now relies on vlan tags being stripped/inserted nearer the edges of the app network.
Remove obsolete l2_size approach
This also includes a facility to regenerate test counter files.
Add a flag to allow monitor all packets in on-a-stick mode
This allows more accurate reporting in cases where apps process the packets before the lwaftr can (and after leaving it), including: a) Fragmentation/reassembly b) Control-plane messages, including ARP/NDP/pinging the lwaftr itself
@@ -75,6 +70,32 @@ function PodHashMap.new(key_type, value_type, hash_fn) | |||
return phm | |||
end | |||
|
|||
-- FIXME: There should be a library to help allocate anonymous | |||
-- hugepages, not this code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still true. :-)
(Not a blocker, no action required for this PR).
@@ -70,6 +70,7 @@ end | |||
|
|||
function selftest () | |||
print("selftest: timer") | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a spurious new line. (Not a blocker)
There is a new “nh_fwd” app that seems to be very lwaftr centric, or at least the README is vague to me. Why does it not belong into |
The nh_fwd (next-hop forward) app is part of snabb vmx. It sits outside (around, really) a snabb data plane and forwards control traffic to a virtualized control plane, such as an Ubuntu image or a Juniper vMX switch. That way it learns the next hop and can stamp on the L2 address of where the packets should go next. It is not lwaftr-specific. |
if not args.counter:match(".counter$") then | ||
args.counter = args.counter..".counter" | ||
end | ||
if not shm.exists("/"..S.getpid().."/"..args.counter) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be shm.exists(args.counter)
. SHM paths are no longer resolved based on a changing shm.path
.
I haven't spotted anything else that @eugeneia hasn't. |
This also addresses the review comments from upstream #1047, noting that the shm.exists() API changed.
Merge upstream ingress drop
If we are recording ingress drops to a counter, use the right check for the counter's existence. Addresses snabbco#1047 (review).
The three new commits look ok to me. |
Fix shm.exists() check in ingress drop monitor
Added a couple patches to |
Remove duplicated code in SnabbVMX selftests
LGTM, thanks for all your work on this. |
Originally |
So I made the rookie mistake of just making this a PR from lwaftr instead of branching off lwaftr and PR'ing from that. I will merge 3d33fb6 to wingo-next and pr that to next. |
@dpino thanks for the clarification on that, let's fix the readme issue in a followup |
* Remove the 'lwaftr generator' command * Move the 'packetblaster lwaftr' code from src/apps/ to the command directory * Add docs for using 'packetblaster lwaftr' in place of 'lwaftr generator'
Remove hardcoded constants in nh_fwd
…lename as in the other commands (#514)
Closing this PR as it's already merged and I made the rookie mistake of PRing this from a live branch which continues to get updates and thus false-alarm notifications. Thank you all! |
Merge v2018.04 prerelease from next to lwaftr
This PR merges in the last 5 months or so of lwaftr development to upstream Snabb. It also adds Snabb vMX, the system that joins up a Snabb dataplane to an external virtualized control/management plane, also adding "on-a-stick" operation for the lwaftr in particular but in a way that can apply to any Snabb dataplane.
With a few minor exceptions, this diff includes only changes to
src/apps/lwaftr
,src/programs/snabbvmx
, andsrc/programs/lwaftr
. Review is very welcome on any of it, but I expect that you will want to focus on the non-lwaftr, non-vmx bits.