1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2015 Intel Corporation
5 #ifndef __INCLUDE_PIPELINE_FLOW_ACTIONS_BE_H__
6 #define __INCLUDE_PIPELINE_FLOW_ACTIONS_BE_H__
10 #include "pipeline_common_be.h"
12 #ifndef PIPELINE_FA_N_TC_MAX
13 #define PIPELINE_FA_N_TC_MAX 4
16 #define PIPELINE_FA_N_DSCP 64
18 struct pipeline_fa_params {
20 uint32_t n_meters_per_flow;
21 uint32_t flow_id_offset;
22 uint32_t ip_hdr_offset;
23 uint32_t color_offset;
24 uint32_t dscp_enabled;
28 pipeline_fa_parse_args(struct pipeline_fa_params *p,
29 struct pipeline_params *params);
31 struct pipeline_fa_policer_action {
33 enum rte_meter_color color;
36 struct pipeline_fa_policer_params {
37 struct pipeline_fa_policer_action action[e_RTE_METER_COLORS];
40 struct pipeline_fa_flow_params {
41 struct rte_meter_trtcm_params m[PIPELINE_FA_N_TC_MAX];
42 struct pipeline_fa_policer_params p[PIPELINE_FA_N_TC_MAX];
47 pipeline_fa_flow_params_set_default(struct pipeline_fa_flow_params *params);
49 struct pipeline_fa_policer_stats {
50 uint64_t n_pkts[e_RTE_METER_COLORS];
54 enum pipeline_fa_msg_req_type {
55 PIPELINE_FA_MSG_REQ_FLOW_CONFIG = 0,
56 PIPELINE_FA_MSG_REQ_FLOW_CONFIG_BULK,
57 PIPELINE_FA_MSG_REQ_DSCP_CONFIG,
58 PIPELINE_FA_MSG_REQ_POLICER_STATS_READ,
65 struct pipeline_fa_flow_config_msg_req {
66 enum pipeline_msg_req_type type;
67 enum pipeline_fa_msg_req_type subtype;
72 uint32_t meter_update_mask;
73 uint32_t policer_update_mask;
75 struct pipeline_fa_flow_params params;
78 struct pipeline_fa_flow_config_msg_rsp {
84 * MSG FLOW CONFIG BULK
86 struct pipeline_fa_flow_config_bulk_msg_req {
87 enum pipeline_msg_req_type type;
88 enum pipeline_fa_msg_req_type subtype;
94 uint32_t meter_update_mask;
95 uint32_t policer_update_mask;
97 struct pipeline_fa_flow_params *params;
100 struct pipeline_fa_flow_config_bulk_msg_rsp {
107 struct pipeline_fa_dscp_config_msg_req {
108 enum pipeline_msg_req_type type;
109 enum pipeline_fa_msg_req_type subtype;
112 uint32_t traffic_class;
113 enum rte_meter_color color;
116 struct pipeline_fa_dscp_config_msg_rsp {
121 * MSG POLICER STATS READ
123 struct pipeline_fa_policer_stats_msg_req {
124 enum pipeline_msg_req_type type;
125 enum pipeline_fa_msg_req_type subtype;
132 struct pipeline_fa_policer_stats_msg_rsp {
134 struct pipeline_fa_policer_stats stats;
137 extern struct pipeline_be_ops pipeline_flow_actions_be_ops;