[06/12] net/mlx4: fix incorrect rxq errors stat

Message ID 1551698315-2611-7-git-send-email-david.marchand@redhat.com
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series
  • rxq q_errors[] statistics fixes
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand March 4, 2019, 11:18 a.m.
Transmit errors must not be reported in q_errors[] which is for
reception.

Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
Cc: stable@dpdk.org
Cc: Matan Azrad <matan@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/mlx4/mlx4_ethdev.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Shahaf Shuler March 5, 2019, 8:19 a.m. | #1
Monday, March 4, 2019 1:18 PM, David Marchand:
> Subject: [PATCH 06/12] net/mlx4: fix incorrect rxq errors stat
> 
> Transmit errors must not be reported in q_errors[] which is for reception.
> 
> Fixes: 7fae69eeff13 ("mlx4: new poll mode driver")
> Cc: stable@dpdk.org
> Cc: Matan Azrad <matan@mellanox.com>
> Cc: Shahaf Shuler <shahafs@mellanox.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
>  drivers/net/mlx4/mlx4_ethdev.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/mlx4/mlx4_ethdev.c
> b/drivers/net/mlx4/mlx4_ethdev.c index 4dae67a..41c46d3 100644
> --- a/drivers/net/mlx4/mlx4_ethdev.c
> +++ b/drivers/net/mlx4/mlx4_ethdev.c
> @@ -661,7 +661,6 @@ int mlx4_fw_version_get(struct rte_eth_dev *dev,
> char *fw_ver, size_t fw_size)
>  		if (idx < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
>  			tmp.q_opackets[idx] += txq->stats.opackets;
>  			tmp.q_obytes[idx] += txq->stats.obytes;
> -			tmp.q_errors[idx] += txq->stats.odropped;
>  		}
>  		tmp.opackets += txq->stats.opackets;
>  		tmp.obytes += txq->stats.obytes;

Acked-by: Shahaf Shuler <shahafs@mellanox.com>

> --
> 1.8.3.1

Patch

diff --git a/drivers/net/mlx4/mlx4_ethdev.c b/drivers/net/mlx4/mlx4_ethdev.c
index 4dae67a..41c46d3 100644
--- a/drivers/net/mlx4/mlx4_ethdev.c
+++ b/drivers/net/mlx4/mlx4_ethdev.c
@@ -661,7 +661,6 @@  int mlx4_fw_version_get(struct rte_eth_dev *dev, char *fw_ver, size_t fw_size)
 		if (idx < RTE_ETHDEV_QUEUE_STAT_CNTRS) {
 			tmp.q_opackets[idx] += txq->stats.opackets;
 			tmp.q_obytes[idx] += txq->stats.obytes;
-			tmp.q_errors[idx] += txq->stats.odropped;
 		}
 		tmp.opackets += txq->stats.opackets;
 		tmp.obytes += txq->stats.obytes;