Re: [PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-15 Thread David Miller
From: Jonathan Lemon Date: Tue, 13 Aug 2019 10:45:09 -0700 > __page_pool_get_cached() will return NULL when the ring is > empty, even if there are pages present in the lookaside cache. > > It is also possible to refill the cache, and then return a > NULL page. > > Restructure the logic so elimi

Re: [PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-14 Thread Ilias Apalodimas
Hi Jonathan, Thanks! On Tue, Aug 13, 2019 at 10:45:09AM -0700, Jonathan Lemon wrote: > __page_pool_get_cached() will return NULL when the ring is > empty, even if there are pages present in the lookaside cache. > > It is also possible to refill the cache, and then return a > NULL page. > > Rest

Re: [PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-14 Thread Jesper Dangaard Brouer
On Tue, 13 Aug 2019 10:45:09 -0700 Jonathan Lemon wrote: > __page_pool_get_cached() will return NULL when the ring is > empty, even if there are pages present in the lookaside cache. > > It is also possible to refill the cache, and then return a > NULL page. > > Restructure the logic so elimina

[PATCH net-next] page_pool: fix logic in __page_pool_get_cached

2019-08-13 Thread Jonathan Lemon
__page_pool_get_cached() will return NULL when the ring is empty, even if there are pages present in the lookaside cache. It is also possible to refill the cache, and then return a NULL page. Restructure the logic so eliminate both cases. Signed-off-by: Jonathan Lemon --- net/core/page_pool.c