mbox series

[pull,request,net-next,00/14] mlx5 devlink trap support

Message ID 20210126232419.175836-1-saeedm@nvidia.com
Headers show
Series mlx5 devlink trap support | expand

Message

Saeed Mahameed Jan. 26, 2021, 11:24 p.m. UTC
Hi Jakub, Dave,

This series adds devlink trap support to mlx5 driver.
For more information please see tag log below.

Please pull and let me know if there is any problem.

Thanks,
Saeed.

---
The following changes since commit 02c26940908fd31bb112e9742adedfb06eca19e1:

  nfc: fix typo (2021-01-25 19:35:26 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-updates-2021-01-26

for you to fetch changes up to 243898b5d77445555e8de350269fd879f2283208:

  net/mlx5e: Enable traps according to link state (2021-01-26 14:22:09 -0800)

----------------------------------------------------------------
mlx5-updates-2021-01-26

mlx5 devlink traps support:

Add support for devlink traps [1] reporting in mlx5,
mlx5 will also report/trap packets filtered due to dest mac steering miss

The first patch in the series defines the new DMAC trap type in devlink
for this purpose.

Other patches in the series are mlx5 only and they gradually traps support.
Supported traps:

DMAC: Drops due to destination MAC not configured in the MAC table
VLAN: Drops due to vlan not configured in the vlan table

Design note:
devlink instance is managed by the low level mlx5 core layer, mlx5 core will
serve as an abstraction layer for trap reporting, since we might have multiple
mlx5 interfaces who might want to report traps on the same device.

----------------------------------------------------------------
Aya Levin (14):
      devlink: Add DMAC filter generic packet trap
      net/mlx5: Add support for devlink traps in mlx5 core driver
      net/mlx5: Register to devlink ingress VLAN filter trap
      net/mlx5: Register to devlink DMAC filter trap
      net/mlx5: Rename events notifier header
      net/mlx5: Notify on trap action by blocking event
      net/mlx5e: Optimize promiscuous mode
      net/mlx5e: Add flow steering VLAN trap rule
      net/mlx5e: Add flow steering DMAC trap rule
      net/mlx5e: Expose RX dma info helpers
      net/mlx5e: Add trap entity to ETH driver
      net/mlx5e: Add listener to trap event
      net/mlx5e: Add listener to DMAC filter trap event
      net/mlx5e: Enable traps according to link state

 Documentation/networking/devlink/devlink-trap.rst |   5 +
 drivers/net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
 drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 188 +++++++++
 drivers/net/ethernet/mellanox/mlx5/core/devlink.h |  18 +
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  10 +
 drivers/net/ethernet/mellanox/mlx5/core/en/fs.h   |  16 +-
 drivers/net/ethernet/mellanox/mlx5/core/en/trap.c | 457 ++++++++++++++++++++++
 drivers/net/ethernet/mellanox/mlx5/core/en/trap.h |  37 ++
 drivers/net/ethernet/mellanox/mlx5/core/en_fs.c   | 212 ++++++++--
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |  52 ++-
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c   |  46 +++
 drivers/net/ethernet/mellanox/mlx5/core/events.c  |  47 ++-
 drivers/net/ethernet/mellanox/mlx5/core/fs_core.c |   4 +-
 drivers/net/ethernet/mellanox/mlx5/core/main.c    |   2 +
 include/linux/mlx5/device.h                       |   9 +
 include/linux/mlx5/driver.h                       |  16 +
 include/net/devlink.h                             |   3 +
 net/core/devlink.c                                |   1 +
 18 files changed, 1076 insertions(+), 49 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/trap.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/en/trap.h

Comments

Jakub Kicinski Jan. 28, 2021, 3:54 a.m. UTC | #1
On Tue, 26 Jan 2021 15:24:06 -0800 Saeed Mahameed wrote:
> From: Aya Levin <ayal@nvidia.com>

> 

> Add packet trap that can report packets that were dropped due to

> destination MAC filtering.

> 

> Signed-off-by: Aya Levin <ayal@nvidia.com>

> Reviewed-by: Ido Schimmel <idosch@nvidia.com>

> Reviewed-by: Moshe Shemesh <moshe@nvidia.com>

> Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>

> ---

>  Documentation/networking/devlink/devlink-trap.rst | 5 +++++

>  include/net/devlink.h                             | 3 +++

>  net/core/devlink.c                                | 1 +

>  3 files changed, 9 insertions(+)

> 

> diff --git a/Documentation/networking/devlink/devlink-trap.rst b/Documentation/networking/devlink/devlink-trap.rst

> index d875f3e1e9cf..1dd86976ecf8 100644

> --- a/Documentation/networking/devlink/devlink-trap.rst

> +++ b/Documentation/networking/devlink/devlink-trap.rst

> @@ -480,6 +480,11 @@ be added to the following table:

>       - ``drop``

>       - Traps packets that the device decided to drop in case they hit a

>         blackhole nexthop

> +   * - ``dmac_filter``

> +     - ``drop``

> +     - Traps incoming packets that the device decided to drop in case


s/in case/because/

> +       the destination MAC is not configured in the MAC table


... and the interface is not in promiscuous mode

> +


Double new line

>  Driver-specific Packet Traps

>  ============================


Fix that up and applied from the list.
Saeed Mahameed Jan. 28, 2021, 8:19 a.m. UTC | #2
On Wed, 2021-01-27 at 19:54 -0800, Jakub Kicinski wrote:
> On Tue, 26 Jan 2021 15:24:06 -0800 Saeed Mahameed wrote:

> > From: Aya Levin <ayal@nvidia.com>

> > 

> > Add packet trap that can report packets that were dropped due to

> > destination MAC filtering.

> > 

> > Signed-off-by: Aya Levin <ayal@nvidia.com>

> > Reviewed-by: Ido Schimmel <idosch@nvidia.com>

> > Reviewed-by: Moshe Shemesh <moshe@nvidia.com>

> > Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

> > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>

> > ---

> >  Documentation/networking/devlink/devlink-trap.rst | 5 +++++

> >  include/net/devlink.h                             | 3 +++

> >  net/core/devlink.c                                | 1 +

> >  3 files changed, 9 insertions(+)

> > 

> > diff --git a/Documentation/networking/devlink/devlink-trap.rst

> > b/Documentation/networking/devlink/devlink-trap.rst

> > index d875f3e1e9cf..1dd86976ecf8 100644

> > --- a/Documentation/networking/devlink/devlink-trap.rst

> > +++ b/Documentation/networking/devlink/devlink-trap.rst

> > @@ -480,6 +480,11 @@ be added to the following table:

> >       - ``drop``

> >       - Traps packets that the device decided to drop in case they

> > hit a

> >         blackhole nexthop

> > +   * - ``dmac_filter``

> > +     - ``drop``

> > +     - Traps incoming packets that the device decided to drop in

> > case

> 

> s/in case/because/

> 

> > +       the destination MAC is not configured in the MAC table

> 

> ... and the interface is not in promiscuous mode

> 


Makes sense ! 

> > +

> 

> Double new line

> 

> >  Driver-specific Packet Traps

> >  ============================

> 

> Fix that up and applied from the list.


Thanks,
I can stop sending pull requests and siwtch to normal patchsets 
if this will be more convenient to you/

to me is just converting the cover letter :)..
Jakub Kicinski Jan. 28, 2021, 4:38 p.m. UTC | #3
On Thu, 28 Jan 2021 00:19:48 -0800 Saeed Mahameed wrote:
> On Wed, 2021-01-27 at 19:54 -0800, Jakub Kicinski wrote:

> > On Tue, 26 Jan 2021 15:24:06 -0800 Saeed Mahameed wrote:  

> > > From: Aya Levin <ayal@nvidia.com>

> > > 

> > > Add packet trap that can report packets that were dropped due to

> > > destination MAC filtering.

> > > 

> > > Signed-off-by: Aya Levin <ayal@nvidia.com>

> > > Reviewed-by: Ido Schimmel <idosch@nvidia.com>

> > > Reviewed-by: Moshe Shemesh <moshe@nvidia.com>

> > > Reviewed-by: Tariq Toukan <tariqt@nvidia.com>

> > > Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

> > > Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>

> > 

> > s/in case/because/

> >   

> > > +       the destination MAC is not configured in the MAC table  

> > 

> > ... and the interface is not in promiscuous mode

> >   

> 

> Makes sense ! 

> 

> > > +  

> > 

> > Double new line

> >   

> > >  Driver-specific Packet Traps

> > >  ============================  

> > 

> > Fix that up and applied from the list.  

> 

> Thanks,

> I can stop sending pull requests and siwtch to normal patchsets 

> if this will be more convenient to you/

> 

> to me is just converting the cover letter :).. 


No preference on my side, as long as the patches are on the ML it's just
the matter of remembering which parameters to pass to my scripts :)