return -1;
}
hcattr = MLX5_ADDR_OF(query_hca_cap_out, out, capability);
- attr->qos.srtcm_sup =
- MLX5_GET(qos_cap, hcattr, flow_meter_srtcm);
+ attr->qos.flow_meter_old =
+ MLX5_GET(qos_cap, hcattr, flow_meter_old);
attr->qos.log_max_flow_meter =
MLX5_GET(qos_cap, hcattr, log_max_flow_meter);
attr->qos.flow_meter_reg_c_ids =
MLX5_GET(qos_cap, hcattr, flow_meter_reg_id);
- attr->qos.flow_meter_reg_share =
- MLX5_GET(qos_cap, hcattr, flow_meter_reg_share);
+ attr->qos.flow_meter =
+ MLX5_GET(qos_cap, hcattr, flow_meter);
attr->qos.packet_pacing =
MLX5_GET(qos_cap, hcattr, packet_pacing);
attr->qos.wqe_rate_pp =
/* HCA qos attributes. */
struct mlx5_hca_qos_attr {
uint32_t sup:1; /* Whether QOS is supported. */
- uint32_t srtcm_sup:1; /* Whether srTCM mode is supported. */
+ uint32_t flow_meter_old:1; /* Flow meter is supported, old version. */
uint32_t packet_pacing:1; /* Packet pacing is supported. */
uint32_t wqe_rate_pp:1; /* Packet pacing WQE rate mode. */
- uint32_t flow_meter_reg_share:1;
- /* Whether reg_c share is supported. */
+ uint32_t flow_meter:1;
+ /*
+ * Flow meter is supported, updated version.
+ * When flow_meter is 1, it indicates that REG_C sharing is supported.
+ * If flow_meter is 1, flow_meter_old is also 1.
+ * Using older driver versions, flow_meter_old can be 1
+ * while flow_meter is 0.
+ */
uint8_t log_max_flow_meter;
/* Power of the maximum supported meters. */
uint8_t flow_meter_reg_c_ids;
u8 reserved_at_4[0x1];
u8 packet_pacing_burst_bound[0x1];
u8 packet_pacing_typical_size[0x1];
- u8 flow_meter_srtcm[0x1];
+ u8 flow_meter_old[0x1];
u8 reserved_at_8[0x8];
u8 log_max_flow_meter[0x8];
u8 flow_meter_reg_id[0x8];
u8 wqe_rate_pp[0x1];
u8 reserved_at_25[0x7];
- u8 flow_meter_reg_share[0x1];
+ u8 flow_meter[0x1];
u8 reserved_at_2e[0x17];
u8 packet_pacing_max_rate[0x20];
u8 packet_pacing_min_rate[0x20];
}
#if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER)
if (config->hca_attr.qos.sup &&
- config->hca_attr.qos.srtcm_sup &&
+ config->hca_attr.qos.flow_meter_old &&
config->dv_flow_en) {
uint8_t reg_c_mask =
config->hca_attr.qos.flow_meter_reg_c_ids;
- 1 + REG_C_0;
priv->mtr_en = 1;
priv->mtr_reg_share =
- config->hca_attr.qos.flow_meter_reg_share;
+ config->hca_attr.qos.flow_meter;
DRV_LOG(DEBUG, "The REG_C meter uses is %d",
priv->mtr_color_reg);
}
NULL,
"Meter profile already exists.");
if (profile->alg == RTE_MTR_SRTCM_RFC2697) {
- if (priv->config.hca_attr.qos.srtcm_sup) {
+ if (priv->config.hca_attr.qos.flow_meter_old) {
/* Verify support for flow meter parameters. */
if (profile->srtcm_rfc2697.cir > 0 &&
profile->srtcm_rfc2697.cir <= MLX5_SRTCM_CIR_MAX &&
cap->shared_n_flows_per_mtr_max = 4 << 20;
/* 2M flows can share the same meter. */
cap->chaining_n_mtrs_per_flow_max = 1; /* Chaining is not supported. */
- cap->meter_srtcm_rfc2697_n_max = qattr->srtcm_sup ? cap->n_max : 0;
+ cap->meter_srtcm_rfc2697_n_max = qattr->flow_meter_old ? cap->n_max : 0;
cap->meter_rate_max = 1ULL << 40; /* 1 Tera tokens per sec. */
cap->policer_action_drop_supported = 1;
cap->stats_mask = RTE_MTR_STATS_N_BYTES_DROPPED |