Thread (8 messages) flat view 8 messages, 4 authors, 2021-01-26

Re: [PATCH net-next] net: core: devlink: add new trap action HARD_DROP

From: Oleksandr Mazur <hidden>
Date: 2021-01-22 08:32:13
Also in: lkml

From: Ido Schimmel <redacted>
Sent: Thursday, January 21, 2021 2:21 PM
To: Oleksandr Mazur <redacted>
Cc: netdev@vger.kernel.org <redacted>; jiri@nvidia.com <redacted>; davem@davemloft.net <davem@davemloft.net>; linux-kernel@vger.kernel.org <redacted>; kuba@kernel.org <kuba@kernel.org>
Subject: Re: [PATCH net-next] net: core: devlink: add new trap action HARD_DROP 
 
On Thu, Jan 21, 2021 at 01:29:37PM +0200, Oleksandr Mazur wrote:
quoted
Add new trap action HARD_DROP, which can be used by the
drivers to register traps, where it's impossible to get
packet reported to the devlink subsystem by the device
driver, because it's impossible to retrieve dropped packet
from the device itself.
In order to use this action, driver must also register
additional devlink operation - callback that is used
to retrieve number of packets that have been dropped by
the device.
Are these global statistics about number of packets the hardware dropped
for a specific reason or are these per-port statistics?
Global statistics. Basically, it’s the DROP action, with the only difference that device might be unable to post the packet to the devlink subsystem.
Also, as this is an action, it could also be altered: e.g. changed to ‘mirror’ or else.
Anyway, this patch really needs to be marked as "RFC" since we cannot
add infrastructure without anyone using it.
Will do.
Also, should I make a V2 patch, that will already hold the RFC tag and the changes (which include the commentaries fixes)?
Additionally, the documentation
(Documentation/networking/devlink/devlink-trap.rst) needs to be updated,
netdevsim needs to be patched and the test over netdevsim
(tools/testing/selftests/drivers/net/netdevsim/devlink_trap.sh) needs to
be extended to cover the new functionality.
Okay. Will do.
quoted
@@ -9876,6 +9915,9 @@ void devlink_trap_report(struct devlink *devlink, struct sk_buff *skb,
 {
       struct devlink_trap_item *trap_item = trap_ctx;

+     if (trap_item->action == DEVLINK_TRAP_ACTION_HARD_DROP)
+             return;
How can this happen?
My bad. Will get removed in V2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help