lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action
Date
On Mon, 25 Jan 2021 14:38:56 +0200 Oleksandr Mazur wrote:
> +     if (trap_item->action == DEVLINK_TRAP_ACTION_DROP &&
> +         devlink->ops->trap_drop_counter_get) {
> +             err = devlink->ops->trap_drop_counter_get(devlink,
> +                                                       trap_item->trap,
> +                                                       &drops);
> +             if (err)
> +                     return err;
> +     }

> Why only report this counter when action is set to drop?

> Thinking about it again - if the action can be changed wouldn't it
> be best for the user to actually get a "HW condition hit" counter,
> which would increment regardless of SW config (incl. policers)?

> Otherwise if admin logs onto the box and temporarily enables a trap
> for debug this count would disappear.

Okay, so should it become like generic HW counter - trap_hw_counter_get?
\
 
 \ /
  Last update: 2021-01-26 12:36    [W:0.046 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site