Skip to content

Commit

Permalink
net/ena: flush Rx buffers memory pool cache
Browse files Browse the repository at this point in the history
[ upstream commit 4387e81 ]

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: 1173fca ("ena: add polling-mode driver")

Signed-off-by: Ido Segev <idose@amazon.com>
Reviewed-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Igor Chauskin <igorch@amazon.com>
  • Loading branch information
segevido authored and cpaelzer committed Feb 3, 2021
1 parent 767ebfd commit 5d475f9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ena/ena_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,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;
}
Expand Down

0 comments on commit 5d475f9

Please sign in to comment.