Re: [RFC v5 net-next] net: core: devlink: add 'dropped' stats field for traps

From: Ido Schimmel
Date: Sat Feb 06 2021 - 09:59:47 EST


On Thu, Feb 04, 2021 at 01:41:22PM +0200, Oleksandr Mazur wrote:
> Whenever query statistics is issued for trap, devlink subsystem
> would also fill-in statistics 'dropped' field. This field indicates
> the number of packets HW dropped and failed to report to the device driver,
> and thus - to the devlink subsystem itself.
> In case if device driver didn't register callback for hard drop
> statistics querying, 'dropped' field will be omitted and not filled.
> Add trap_drop_counter_get callback implementation to the netdevsim.
> Add new test cases for netdevsim, to test both the callback
> functionality, as well as drop statistics alteration check.
>
> Signed-off-by: Oleksandr Mazur <oleksandr.mazur@xxxxxxxxxxx>

Code looks fine to me, but for non-RFC submission (with actual hw
implementation), you probably want to split it into three patches:
devlink, netdevsim, selftest.