summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2018-04-17 17:08:06 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-04-18 15:48:06 +0300
commit8de0e8ba973f710346f61e52b86df199b20d23b8 (patch)
tree2fb513527b5a538c12c41ceeeeb3a0525d04d03f /samples
parent97c33610acc596f318f3ec8d644ca70aeac30a7f (diff)
downloadlinux-8de0e8ba973f710346f61e52b86df199b20d23b8.tar.xz
samples/bpf: fix xdp_monitor user output for tracepoint exception
The variable rec_i contains an XDP action code not an error. Thus, using err2str() was wrong, it should have been action2str(). Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/xdp_monitor_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdp_monitor_user.c b/samples/bpf/xdp_monitor_user.c
index eec14520d513..894bc64c2cac 100644
--- a/samples/bpf/xdp_monitor_user.c
+++ b/samples/bpf/xdp_monitor_user.c
@@ -330,7 +330,7 @@ static void stats_print(struct stats_record *stats_rec,
pps = calc_pps_u64(r, p, t);
if (pps > 0)
printf(fmt1, "Exception", i,
- 0.0, pps, err2str(rec_i));
+ 0.0, pps, action2str(rec_i));
}
pps = calc_pps_u64(&rec->total, &prev->total, t);
if (pps > 0)