summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_prm.h
diff options
context:
space:
mode:
authorSuanming Mou <suanmingm@mellanox.com>2019-11-08 05:49:12 +0200
committerFerruh Yigit <ferruh.yigit@intel.com>2019-11-11 14:23:02 +0100
commit46a5e6bc6a85d7e5103e59509096964cbf637d83 (patch)
treed079a1d928dc16f8023d2e37b7a79c67295dda37 /drivers/net/mlx5/mlx5_prm.h
parente0583a52b2e0e6bb34ed464a9ba344dfc05f9485 (diff)
downloaddpdk-46a5e6bc6a85d7e5103e59509096964cbf637d83.zip
dpdk-46a5e6bc6a85d7e5103e59509096964cbf637d83.tar.gz
dpdk-46a5e6bc6a85d7e5103e59509096964cbf637d83.tar.xz
net/mlx5: prepare meter flow tables
This commit prepare the meter table and suffix table. A flow with meter will be split to three flows. The three flows are created on differnet tables. The packets transfer between the flows on the tables as below: Prefix flow -> Meter flow -> Suffix flow Prefix flow does the user defined match and the meter action. The meter action colors the packet and set its destination to meter table to be processed by the meter flow. The meter flow judges if the packet can be passed or not. If packet can be passed, it will be transferred to the suffix table. The suffix flow on the suffix table will apply the left user defined actions to the packet. The ingress egress and transfer all have the independent meter and suffix tables. Signed-off-by: Suanming Mou <suanmingm@mellanox.com> Acked-by: Matan Azrad <matan@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_prm.h')
-rw-r--r--drivers/net/mlx5/mlx5_prm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
index 3ebf191..ebedc90 100644
--- a/drivers/net/mlx5/mlx5_prm.h
+++ b/drivers/net/mlx5/mlx5_prm.h
@@ -1768,6 +1768,14 @@ struct mlx5_mini_cqe8 {
uint32_t byte_cnt;
};
+/* srTCM PRM flow meter parameters. */
+enum {
+ MLX5_FLOW_COLOR_RED = 0,
+ MLX5_FLOW_COLOR_YELLOW,
+ MLX5_FLOW_COLOR_GREEN,
+ MLX5_FLOW_COLOR_UNDEFINED,
+};
+
/* Maximum value of srTCM metering parameters. */
#define MLX5_SRTCM_CBS_MAX (0xFF * (1ULL << 0x1F))
#define MLX5_SRTCM_CIR_MAX (8 * (1ULL << 30) * 0xFF)