[0/2] fix incorrect register usage in meter

Message ID 1579759262-189720-1-git-send-email-suanmingm@mellanox.com (mailing list archive)


Suanming Mou Jan. 23, 2020, 6:01 a.m. UTC
  Flow with meter will split to three subflows, the prefix subflow with
meter action do the color, the meter subflow  filter the packets, the
suffix subflow do all the left actions for packets pass the filter.
Both the color and the subflow match between prefix and suffix use the
register to store the tag.

For some of the NICs with meter color register share capability, it
only uses 8 LSB of the register for color, the left 24 MSB can be used
for flow id match between meter prefix subflow and suffix subflow.

Currently, one entire register is allocated for flow matching which
causes the NICs with limited registers don't have enough register for
other matching.

Add the meter color share capability checking to fix lacking of
registers issue.

Suanming Mou (2):
  net/mlx5: support maximum id in id allocate
  net/mlx5: fix incorrect register usage in meter

 drivers/net/mlx5/mlx5.c           | 19 +++++++++++----
 drivers/net/mlx5/mlx5.h           |  4 ++++
 drivers/net/mlx5/mlx5_devx_cmds.c |  2 ++
 drivers/net/mlx5/mlx5_flow.c      | 49 ++++++++++++++++++++++++---------------
 drivers/net/mlx5/mlx5_flow.h      |  2 +-
 drivers/net/mlx5/mlx5_flow_dv.c   |  4 ++--
 drivers/net/mlx5/mlx5_prm.h       |  7 +++++-
 7 files changed, 60 insertions(+), 27 deletions(-)