Skip to content

Commit

Permalink
samples/bpf: fix xdp_monitor user output for tracepoint exception
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Dangaard Brouer authored and Daniel Borkmann committed Apr 18, 2018
1 parent 97c3361 commit 8de0e8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/bpf/xdp_monitor_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8de0e8b

Please sign in to comment.