aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2016-07-07 18:01:32 +0200
committerDavid S. Miller <davem@davemloft.net>2016-07-09 18:05:02 -0400
commit1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b (patch)
treeb5f5b949245c9ff457db3fc5df523a3028351922 /net/core/dev.c
parentMerge branch 'r8152-next' (diff)
downloadlinux-dev-1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b.tar.xz
linux-dev-1db19db7f5ff4ddd3b1b6dd2092a87298ee5bd0b.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index b92d63bfde7a..7894e406c806 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);