Make packets fail#144
Open
pallas wants to merge 2 commits into
Open
Conversation
added 2 commits
November 15, 2018 11:05
This option forces expensive Packet operations to reallocate by taking a clone prior to checking shared and then killing the clone later. This is controlled by --enable-force-expensive / CLICK_FORCE_EXPENSIVE and allows one to debug issues where a caller assumes that the returned SKB is the same as the original SKB. Signed-off-by: Derrick Pallas <pallas@meraki.com>
This change adds--enable-flaky-packets, which causes Packet methods that might allocate to fail 10% of the time. This includes Packet::make, Packet::clone, and Packet::expensive_uniqueify. Because Packet::put & Packet::push use uniqueify to allocate, it covers those expensive operations as well but only in the case that there is not enough headroom/tailroom in the packet to complete without allocating. This avoids false positives, e.g. when the caller knows that the opearation must succeed because Packet::make was invoked with sufficient headroom/tailroom. With valgrind-helper, this option is useful for finding callers that do not deal with allocation failure correctly. *** NB: test-click will fail all over the place, since this change eats SKBs Change-Id: Id36175436ae7006b54c3590878988ec0a94f5166 Signed-off-by: Derrick Pallas <pallas@meraki.com>
Owner
|
I'm waiting for your first pull requests to get in before fixing this ;) |
b9c1853 to
b9f3521
Compare
This file contains hidden or 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
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.
Another useful debugging tool