* [bpf-next PATCH] samples/bpf: fix xdp_monitor user output for tracepoint exception
@ 2018-04-17 14:08 Jesper Dangaard Brouer
2018-04-18 12:48 ` Daniel Borkmann
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Dangaard Brouer @ 2018-04-17 14:08 UTC (permalink / raw)
To: netdev; +Cc: Daniel Borkmann, Alexei Starovoitov, Jesper Dangaard Brouer
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>
---
samples/bpf/xdp_monitor_user.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-18 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-17 14:08 [bpf-next PATCH] samples/bpf: fix xdp_monitor user output for tracepoint exception Jesper Dangaard Brouer
2018-04-18 12:48 ` Daniel Borkmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox