[PATCH net-next RFC v2 repost 2/3] devlink: Add devlink traps

2020-09-22 Thread Aya Levin
There are some cases where we would like to trap dropped packets only for a single port on a device without affecting the others. For that purpose: - Add trap lists and trap ops to devlink_port - Add corresponding trap API to manage traps - Add matching netlink commands Signed-off-by: Aya Levin

[PATCH net-next RFC v2 repost 3/3] net/mlx5e: Add devlink

2020-09-22 Thread Aya Levin
From: Aya Levin Register MTU error trap to allow visibility of oversize packets. Display a naive use of devlink trap in devlink port context. Signed-off-by: Aya Levin --- Changelog: v1->v2: -Minor changes in trap's definition -Adjustments to trap API and ops drivers/net/ethernet/

[PATCH net-next RFC v2 repost 1/3] devlink: Wrap trap related

2020-09-22 Thread Aya Levin
Bundle the trap related lists: trap_list, trap_group_list and trap_policer_list in a dedicated struct. This will be handy in the coming patches in the set introducing traps in devlink port context. With trap_lists, code reuse is much simpler. Signed-off-by: Aya Levin --- Changelog: v1->v2: Pa

[PATCH net-next RFC v2 repost 0/3] Add devlink traps in

2020-09-22 Thread Aya Levin
djustments to trap API and ops Aya Levin (3): devlink: Wrap trap related lists a trap_lists struct devlink: Add devlink traps under devlink_ports context net/mlx5e: Add devlink trap to catch oversize packets drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/

[PATCH net-next RFC v2 1/3] devlink: Wrap trap related lists a trap_lists struct

2020-09-17 Thread Aya Levin
Bundle the trap related lists: trap_list, trap_group_list and trap_policer_list in a dedicated struct. This will be handy in the coming patches in the set introducing traps in devlink port context. With trap_lists, code reuse is much simpler. Signed-off-by: Aya Levin --- Changelog: v1->v2: Pa

[PATCH net-next RFC v2 0/3] Add devlink traps in devlink port context

2020-09-17 Thread Aya Levin
djustments to trap API and ops Aya Levin (3): devlink: Wrap trap related lists a trap_lists struct devlink: Add devlink traps under devlink_ports context net/mlx5e: Add devlink trap to catch oversize packets drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/

[PATCH net-next RFC v2 3/3] net/mlx5e: Add devlink trap to catch oversize packets

2020-09-17 Thread Aya Levin
From: Aya Levin Register MTU error trap to allow visibility of oversize packets. Display a naive use of devlink trap in devlink port context. Signed-off-by: Aya Levin --- Changelog: v1->v2: -Minor changes in trap's definition -Adjustments to trap API and ops drivers/net/ethernet/

[PATCH net-next RFC v2 2/3] devlink: Add devlink traps under devlink_ports context

2020-09-17 Thread Aya Levin
There are some cases where we would like to trap dropped packets only for a single port on a device without affecting the others. For that purpose: - Add trap lists and trap ops to devlink_port - Add corresponding trap API to manage traps - Add matching netlink commands Signed-off-by: Aya Levin

Re: [PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context

2020-09-09 Thread Aya Levin
On 9/8/2020 5:04 PM, Jiri Pirko wrote: Sun, Sep 06, 2020 at 05:44:28PM CEST, ido...@idosch.org wrote: On Wed, Sep 02, 2020 at 06:32:12PM +0300, Aya Levin wrote: [...] I understand how this struct allows you to re-use a lot of code between per-device and per-port traps, but it's m

Re: [PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context

2020-09-07 Thread Aya Levin
On 9/6/2020 6:44 PM, Ido Schimmel wrote: On Wed, Sep 02, 2020 at 06:32:12PM +0300, Aya Levin wrote: There are some cases where we would like to trap dropped packets only for a single port on a device without affecting the others. For that purpose trap_mngr was added to devlink_port and

Re: [PATCH net-next RFC v1 3/4] devlink: Add hierarchy between traps in device level and port level

2020-09-07 Thread Aya Levin
On 9/6/2020 6:58 PM, Ido Schimmel wrote: On Wed, Sep 02, 2020 at 06:32:13PM +0300, Aya Levin wrote: Managing large scale port's traps may be complicated. This patch introduces a shortcut: when setting a trap on a device and this trap is not registered on this device, the action will

[PATCH net-next RFC v1 2/4] devlink: Add devlink traps under devlink_ports context

2020-09-02 Thread Aya Levin
There are some cases where we would like to trap dropped packets only for a single port on a device without affecting the others. For that purpose trap_mngr was added to devlink_port and corresponding Trap API with devlink_port were added too. Signed-off-by: Aya Levin --- drivers/net/ethernet

[PATCH net-next RFC v1 3/4] devlink: Add hierarchy between traps in device level and port level

2020-09-02 Thread Aya Levin
Managing large scale port's traps may be complicated. This patch introduces a shortcut: when setting a trap on a device and this trap is not registered on this device, the action will take place on all related ports that did register this trap. Signed-off-by: Aya Levin --- net/core/devl

[PATCH net-next RFC v1 4/4] net/mlx5e: Add devlink trap to catch oversize packets

2020-09-02 Thread Aya Levin
Register MTU error trap to allow visibility of oversize packets. Display a naive use of devlink trap in devlink port context. Signed-off-by: Aya Levin --- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet

[PATCH net-next RFC v1 1/4] devlink: Wrap trap related lists and ops in trap_mngr

2020-09-02 Thread Aya Levin
simpler. Signed-off-by: Aya Levin --- drivers/net/ethernet/mellanox/mlxsw/core.c | 4 + include/net/devlink.h | 59 --- net/core/devlink.c | 255 + 3 files changed, 188 insertions(+), 130 deletions(-) diff --git a/drivers

[PATCH net-next RFC v1 0/4] Add devlink traps in devlink port context

2020-09-02 Thread Aya Levin
registered this trap. Patch 4: Display a use in devlink traps in port context in mlx5 ethernet driver. Aya Levin (4): devlink: Wrap trap related lists and ops in trap_mngr devlink: Add devlink traps under devlink_ports context devlink: Add hiererchy between traps in device level and port level net

[net] devlink: Add method for time-stamp on reporter's dump

2019-08-22 Thread Aya Levin
When setting the dump's time-stamp, use ktime_get_real in addition to jiffies. This simplifies the user space implementation and bypasses some inconsistent behavior with translating jiffies to current time. Fixes: c8e1da0bf923 ("devlink: Add health report functionality") Signed-of