RDMA/mlx5: Add modify_op_stat() support
authorAharon Landau <aharonl@nvidia.com>
Fri, 8 Oct 2021 12:24:38 +0000 (15:24 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 12 Oct 2021 15:48:06 +0000 (12:48 -0300)
commita29b934ceb4c8ad8bf6d0486a8c8ef015af494f4
tree47106ad5e7e628cb09a51b3c43e64965cd921c03
parentffa501ef196312f550818304e1558025a11d3c2f
RDMA/mlx5: Add modify_op_stat() support

Add support for ib callback modify_op_stat() to add or remove an optional
counter. When adding, a steering flow table is created with a rule that
catches and counts all the matching packets. When removing, the table and
flow counter are destroyed.

Link: https://lore.kernel.org/r/20211008122439.166063-13-markzhang@nvidia.com
Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Mark Zhang <markzhang@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/counters.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
include/rdma/ib_verbs.h