From 4387e81c94f4702ec2eb2037df2bfa19927309d7 Mon Sep 17 00:00:00 2001 From: Ido Segev Date: Tue, 26 Jan 2021 19:32:22 +0100 Subject: [PATCH] net/ena: flush Rx buffers memory pool cache 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 Reviewed-by: Michal Krawczyk Reviewed-by: Igor Chauskin --- 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 c796af4aa7..dde6e9ce8b 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.20.1