Skip to content

Conversation

@pallas
Copy link
Collaborator

@pallas pallas commented Nov 15, 2018

Another useful debugging tool

Derrick Pallas 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 <[email protected]>
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 <[email protected]>
@tbarbette tbarbette self-assigned this Dec 3, 2018
@tbarbette tbarbette added the wait-for-op Additional information from the OP are needed label Dec 29, 2018
@tbarbette
Copy link
Owner

I'm waiting for your first pull requests to get in before fixing this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wait-for-op Additional information from the OP are needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants