diff mbox series

[v4,8/9] net/dpaa2: fix cong group id for multiple tcs

Message ID 20200507104645.31990-9-hemant.agrawal@nxp.com
State Superseded
Headers show
Series NXP DPAAx fixes and enhancements | expand

Commit Message

Hemant Agrawal May 7, 2020, 10:46 a.m. UTC
From: Jun Yang <jun.yang@nxp.com>


Flow id will not work when used with multiple traffic
classes. The CGID shall be provided in the INDEX field.

Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")
Cc: stable@dpdk.org

Signed-off-by: Jun Yang <jun.yang@nxp.com>

---
 drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.17.1

Comments

Ferruh Yigit May 7, 2020, 2:33 p.m. UTC | #1
On 5/7/2020 11:46 AM, Hemant Agrawal wrote:
> From: Jun Yang <jun.yang@nxp.com>

> 

> Flow id will not work when used with multiple traffic

> classes. The CGID shall be provided in the INDEX field.


Can you please add more detail, same also asked in prev version [1]. Btw what
does "flow id won't work" mean, and what is cong or cgid?

Thanks.

[1]

Can you please provide more information in commit log, why this change is done,
is it to fix something, if so what is broken with original code, why using "cong
group id" helps instead of using "flow_id" etc..


> 

> Fixes: 13b856ac02a8 ("net/dpaa2: support taildrop on frame count basis")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Jun Yang <jun.yang@nxp.com>

> ---

>  drivers/net/dpaa2/dpaa2_ethdev.c | 4 ++--

>  1 file changed, 2 insertions(+), 2 deletions(-)

> 

> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c

> index fd766a2184..1bab3b064c 100644

> --- a/drivers/net/dpaa2/dpaa2_ethdev.c

> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c

> @@ -676,7 +676,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,

>  						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;

> @@ -703,7 +703,7 @@ dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,

>  			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,

>
diff mbox series

Patch

diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index fd766a2184..1bab3b064c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -676,7 +676,7 @@  dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 						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;
@@ -703,7 +703,7 @@  dpaa2_dev_rx_queue_setup(struct rte_eth_dev *dev,
 			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,