[v2,7/9] net/memif: do not count unsent packets as errors
Checks
Commit Message
n_err reflects the number of packets that the driver did not manage to
send.
This is a temporary situation, those packets are not freed and the
application can still retry to send them later.
Hence, we can't count them as transmit failed.
Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changelog since v1:
- dropped the n_err counter entirely as nothing reports it
---
drivers/net/memif/rte_eth_memif.c | 7 -------
drivers/net/memif/rte_eth_memif.h | 1 -
2 files changed, 8 deletions(-)
Comments
On 7/26/2019 11:21 AM, David Marchand wrote:
> n_err reflects the number of packets that the driver did not manage to
> send.
> This is a temporary situation, those packets are not freed and the
> application can still retry to send them later.
> Hence, we can't count them as transmit failed.
>
> Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
@@ -479,7 +479,6 @@ no_free_slots:
}
}
- mq->n_err += nb_pkts - n_tx_pkts;
mq->n_pkts += n_tx_pkts;
return n_tx_pkts;
}
@@ -857,7 +856,6 @@ memif_tx_queue_setup(struct rte_eth_dev *dev,
(pmd->role == MEMIF_ROLE_SLAVE) ? MEMIF_RING_S2M : MEMIF_RING_M2S;
mq->n_pkts = 0;
mq->n_bytes = 0;
- mq->n_err = 0;
mq->intr_handle.fd = -1;
mq->intr_handle.type = RTE_INTR_HANDLE_EXT;
dev->data->tx_queues[qid] = mq;
@@ -886,7 +884,6 @@ memif_rx_queue_setup(struct rte_eth_dev *dev,
mq->type = (pmd->role == MEMIF_ROLE_SLAVE) ? MEMIF_RING_M2S : MEMIF_RING_S2M;
mq->n_pkts = 0;
mq->n_bytes = 0;
- mq->n_err = 0;
mq->intr_handle.fd = -1;
mq->intr_handle.type = RTE_INTR_HANDLE_EXT;
mq->mempool = mb_pool;
@@ -938,7 +935,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->ibytes = 0;
stats->opackets = 0;
stats->obytes = 0;
- stats->oerrors = 0;
tmp = (pmd->role == MEMIF_ROLE_SLAVE) ? pmd->run.num_s2m_rings :
pmd->run.num_m2s_rings;
@@ -966,7 +962,6 @@ memif_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
stats->q_obytes[i] = mq->n_bytes;
stats->opackets += mq->n_pkts;
stats->obytes += mq->n_bytes;
- stats->oerrors += mq->n_err;
}
return 0;
}
@@ -983,14 +978,12 @@ memif_stats_reset(struct rte_eth_dev *dev)
dev->data->rx_queues[i];
mq->n_pkts = 0;
mq->n_bytes = 0;
- mq->n_err = 0;
}
for (i = 0; i < pmd->run.num_m2s_rings; i++) {
mq = (pmd->role == MEMIF_ROLE_SLAVE) ? dev->data->rx_queues[i] :
dev->data->tx_queues[i];
mq->n_pkts = 0;
mq->n_bytes = 0;
- mq->n_err = 0;
}
}
@@ -66,7 +66,6 @@ struct memif_queue {
/* rx/tx info */
uint64_t n_pkts; /**< number of rx/tx packets */
uint64_t n_bytes; /**< number of rx/tx bytes */
- uint64_t n_err; /**< number of tx errors */
memif_ring_t *ring; /**< pointer to ring */