diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2016-07-07 18:01:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-07-09 18:05:02 -0400 |
commit | 1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b (patch) | |
tree | b5f5b949245c9ff457db3fc5df523a3028351922 /net/core/dev.c | |
parent | 89141e1c61c5390015285ab202a6f2a9a693e754 (diff) | |
download | op-kernel-dev-1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b.zip op-kernel-dev-1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b.tar.gz |
net: tracepoint napi:napi_poll add work and budget
An important information for the napi_poll tracepoint is knowing
the work done (packets processed) by the napi_poll() call. Add
both the work done and budget, as they are related.
Handle trace_napi_poll() param change in dropwatch/drop_monitor
and in python perf script netdev-times.py in backward compat way,
as python fortunately supports optional parameter handling.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b92d63b..7894e40 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4972,7 +4972,7 @@ bool sk_busy_loop(struct sock *sk, int nonblock) if (test_bit(NAPI_STATE_SCHED, &napi->state)) { rc = napi->poll(napi, BUSY_POLL_BUDGET); - trace_napi_poll(napi); + trace_napi_poll(napi, rc, BUSY_POLL_BUDGET); if (rc == BUSY_POLL_BUDGET) { napi_complete_done(napi, rc); napi_schedule(napi); @@ -5128,7 +5128,7 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll) work = 0; if (test_bit(NAPI_STATE_SCHED, &n->state)) { work = n->poll(n, weight); - trace_napi_poll(n); + trace_napi_poll(n, work, weight); } WARN_ON_ONCE(work > weight); |