OSDN Git Service

net: core: devlink: add dropped stats traps field
authorOleksandr Mazur <oleksandr.mazur@plvision.eu>
Mon, 14 Jun 2021 13:01:12 +0000 (16:01 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Jun 2021 20:04:25 +0000 (13:04 -0700)
commitddee9dbc3d7aec1cd9fdcc671db2dd0016fd0f3d
tree96530a832ce468547c348bc9f8dfa3a04a441a0b
parentea99750e401972c896d2212ea9244d903b8fbf73
net: core: devlink: add dropped stats traps field

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.

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
net/core/devlink.c