[02/21] net/ena: add assertion on Tx info mbuf
Checks
Commit Message
To make sure there is no outstanding mbuf in the reused Tx queue (due to
unproper cleanup, or some invalid logic on Tx path), the assertion was
added on the Tx path.
As it's being compiled out in the release version, it won't affect
the IO path performance.
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Dawid Gorecki <dgr@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
---
drivers/net/ena/ena_ethdev.c | 1 +
1 file changed, 1 insertion(+)
@@ -2661,6 +2661,7 @@ static int ena_xmit_mbuf(struct ena_ring *tx_ring, struct rte_mbuf *mbuf)
req_id = tx_ring->empty_tx_reqs[next_to_use];
tx_info = &tx_ring->tx_buffer_info[req_id];
tx_info->num_of_bufs = 0;
+ RTE_ASSERT(tx_info->mbuf == NULL);
ena_tx_map_mbuf(tx_ring, tx_info, mbuf, &push_header, &header_len);