Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-02-01 Thread Ido Schimmel
I missed this patch. Please Cc me on future versions given I commented on previous versions. On Mon, Jan 25, 2021 at 02:38:56PM +0200, Oleksandr Mazur wrote: > Whenever query statistics is issued for trap with DROP action, > devlink subsystem would also fill-in statistics 'dropped' field. > In cas

Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-02-01 Thread Oleksandr Mazur
On Fri, 29 Jan 2021 11:15:43 + Oleksandr Mazur wrote: > > >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 ad

Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-01-29 Thread Jakub Kicinski
On Fri, 29 Jan 2021 11:15:43 + Oleksandr Mazur wrote: > > 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 lo

[RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-01-26 Thread Oleksandr Mazur
Whenever query statistics is issued for trap with DROP action, devlink subsystem would also fill-in statistics 'dropped' field. In case if device driver did't register callback for hard drop statistics querying, 'dropped' field will be omitted and not filled. Add trap_drop_counter_get callback impl

Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-01-26 Thread Oleksandr Mazur
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

Re: [RFC v3 net-next] net: core: devlink: add 'dropped' stats field for DROP trap action

2021-01-25 Thread Jakub Kicinski
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