Skip to content

Commit

Permalink
trace: events: neigh_update: print new state in string format
Browse files Browse the repository at this point in the history
Also, extend neigh_state_str to include neigh dummy states
noarp and permanent

Fixes: 9c03b28 ("trace: events: add a few neigh tracepoints")
Signed-off-by: Roopa Prabhu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
roopa-prabhu authored and davem330 committed Feb 24, 2019
1 parent 515d846 commit a75d1d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions include/trace/events/neigh.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
{ NUD_STALE, "stale" }, \
{ NUD_DELAY, "delay" }, \
{ NUD_PROBE, "probe" }, \
{ NUD_FAILED, "failed" })
{ NUD_FAILED, "failed" }, \
{ NUD_NOARP, "noarp" }, \
{ NUD_PERMANENT, "permanent"})

TRACE_EVENT(neigh_update,

Expand Down Expand Up @@ -90,15 +92,15 @@ TRACE_EVENT(neigh_update,
TP_printk("family %d dev %s lladdr %s flags %02x nud_state %s type %02x "
"dead %d refcnt %d primary_key4 %pI4 primary_key6 %pI6c "
"confirmed %lu updated %lu used %lu new_lladdr %s "
"new_state %02x update_flags %02x pid %d",
"new_state %s update_flags %02x pid %d",
__entry->family, __get_str(dev),
__print_hex_str(__entry->lladdr, __entry->lladdr_len),
__entry->flags, neigh_state_str(__entry->nud_state),
__entry->type, __entry->dead, __entry->refcnt,
__entry->primary_key4, __entry->primary_key6,
__entry->confirmed, __entry->updated, __entry->used,
__print_hex_str(__entry->new_lladdr, __entry->lladdr_len),
__entry->new_state,
neigh_state_str(__entry->new_state),
__entry->update_flags, __entry->pid)
);

Expand Down

0 comments on commit a75d1d0

Please sign in to comment.