[dpdk-dev] [PATCH v2 1/5] net/ena: flush Rx buffers memory pool cache

Michal Krawczyk mk at semihalf.com
Tue Jan 26 19:32:22 CET 2021


From: Ido Segev <idose at amazon.com>

As the refill called as part of ena_start(), we end up the refill
progress with stuck buffers at the caller core cache.

Calling to flush the cache results with invalidate this cache and free
those stuck buffers.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable at dpdk.org

Signed-off-by: Ido Segev <idose at amazon.com>
Reviewed-by: Michal Krawczyk <mk at semihalf.com>
Reviewed-by: Igor Chauskin <igorch at amazon.com>
---
 drivers/net/ena/ena_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index 20ff3653c6..516e244295 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -1246,6 +1246,10 @@ static int ena_queue_start(struct ena_ring *ring)
 		PMD_INIT_LOG(ERR, "Failed to populate rx ring !");
 		return ENA_COM_FAULT;
 	}
+	/* Flush per-core RX buffers pools cache as they can be used on other
+	 * cores as well.
+	 */
+	rte_mempool_cache_flush(NULL, ring->mb_pool);
 
 	return 0;
 }
-- 
2.25.1



More information about the dev mailing list