diff mbox series

[1/4] net/ena: flush Rx buffers memory pool cache

Message ID 20210122160501.2273782-2-mk@semihalf.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series net/ena: minor bug fixes and improvements | expand


Context Check Description
ci/checkpatch success coding style OK

Commit Message

Michal Krawczyk Jan. 22, 2021, 4:04 p.m. UTC
From: Ido Segev <idose@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@dpdk.org

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


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;