Skip to content
Commit b07a2d97 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

net: skb: plumb napi state thru skb freeing paths



We maintain a NAPI-local cache of skbs which is fed by napi_consume_skb().
Going forward we will also try to cache head and data pages.
Plumb the "are we in a normal NAPI context" information thru
deeper into the freeing path, up to skb_release_data() and
skb_free_head()/skb_pp_recycle(). The "not normal NAPI context"
comes from netpoll which passes budget of 0 to try to reap
the Tx completions but not perform any Rx.

Use "bool napi_safe" rather than bare "int budget",
the further we get from NAPI the more confusing the budget
argument may seem (particularly whether 0 or MAX is the
correct value to pass in when not in NAPI).

Reviewed-by: default avatarTariq Toukan <tariqt@nvidia.com>
Tested-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c11d2e71
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment