net/ena: flush Rx buffers memory pool cache
authorIdo Segev <idose@amazon.com>
Tue, 26 Jan 2021 18:32:22 +0000 (19:32 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 29 Jan 2021 17:16:12 +0000 (18:16 +0100)
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

index c796af4..dde6e9c 100644 (file)
@@ -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;
 }