When using a single TC, flow id is same as congestion group id.
However in case of multiple traffic classes, same flow id values
are used within each traffic class, which causes incorrect
traffic behavior e.g. halting of traffic.
This patches changes to use the cgid as the index which works
for single as well as multiple traffic classes.
Fixes:
13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
Cc: stable@dpdk.org
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
DPNI_CP_CONGESTION_GROUP,
DPNI_QUEUE_RX,
dpaa2_q->tc_index,
- flow_id, &taildrop);
+ dpaa2_q->cgid, &taildrop);
} else {
/*enabling per rx queue congestion control */
taildrop.threshold = CONG_THRESHOLD_RX_BYTES_Q;
ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
DPNI_CP_CONGESTION_GROUP, DPNI_QUEUE_RX,
dpaa2_q->tc_index,
- flow_id, &taildrop);
+ dpaa2_q->cgid, &taildrop);
} else {
ret = dpni_set_taildrop(dpni, CMD_PRI_LOW, priv->token,
DPNI_CP_QUEUE, DPNI_QUEUE_RX,