lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 22 Jan 2021 08:30:13 +0000
From:   Oleksandr Mazur <oleksandr.mazur@...ision.eu>
To:     Ido Schimmel <idosch@...sch.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "jiri@...dia.com" <jiri@...dia.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kuba@...nel.org" <kuba@...nel.org>
Subject: Re: [PATCH net-next] net: core: devlink: add new trap action
 HARD_DROP

From: Ido Schimmel <idosch@...sch.org>
Sent: Thursday, January 21, 2021 2:21 PM
To: Oleksandr Mazur <oleksandr.mazur@...ision.eu>
Cc: netdev@...r.kernel.org <netdev@...r.kernel.org>; jiri@...dia.com <jiri@...dia.com>; davem@...emloft.net <davem@...emloft.net>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>; kuba@...nel.org <kuba@...nel.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:
>> 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.

>> @@ -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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ