[12/12] net/tap: fix incorrect rxq errors stat
Checks
Commit Message
Transmit errors must not be reported in q_errors[] which is for
reception.
Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
Cc: stable@dpdk.org
Cc: Keith Wiles <keith.wiles@intel.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/tap/rte_eth_tap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
> On Mar 4, 2019, at 5:18 AM, David Marchand <david.marchand@redhat.com> wrote:
>
> Transmit errors must not be reported in q_errors[] which is for
> reception.
>
> Fixes: 02f96a0a82d1 ("net/tap: add TUN/TAP device PMD")
> Cc: stable@dpdk.org
> Cc: Keith Wiles <keith.wiles@intel.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/tap/rte_eth_tap.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
> index 6f5109f..94c728f 100644
> --- a/drivers/net/tap/rte_eth_tap.c
> +++ b/drivers/net/tap/rte_eth_tap.c
> @@ -968,10 +968,9 @@ struct ipc_queues {
>
> for (i = 0; i < imax; i++) {
> tap_stats->q_opackets[i] = pmd->txq[i].stats.opackets;
> - tap_stats->q_errors[i] = pmd->txq[i].stats.errs;
> tap_stats->q_obytes[i] = pmd->txq[i].stats.obytes;
> tx_total += tap_stats->q_opackets[i];
> - tx_err_total += tap_stats->q_errors[i];
> + tx_err_total += pmd->txq[i].stats.errs;
> tx_bytes_total += tap_stats->q_obytes[i];
> }
>
> --
> 1.8.3.1
>
Acked-by: Keith Wiles <keith.wiles@intel.com>
Regards,
Keith
@@ -968,10 +968,9 @@ struct ipc_queues {
for (i = 0; i < imax; i++) {
tap_stats->q_opackets[i] = pmd->txq[i].stats.opackets;
- tap_stats->q_errors[i] = pmd->txq[i].stats.errs;
tap_stats->q_obytes[i] = pmd->txq[i].stats.obytes;
tx_total += tap_stats->q_opackets[i];
- tx_err_total += tap_stats->q_errors[i];
+ tx_err_total += pmd->txq[i].stats.errs;
tx_bytes_total += tap_stats->q_obytes[i];
}