nfp: switch to dev_alloc_page()

Use the dev_alloc_page() networking helper to allocate pages
for RX packets.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jakub Kicinski 2017-11-02 01:31:34 -07:00 committed by David S. Miller
parent 43b45245e5
commit 790a399171

View File

@ -1212,7 +1212,7 @@ static void *nfp_net_napi_alloc_one(struct nfp_net_dp *dp, dma_addr_t *dma_addr)
} else {
struct page *page;
page = alloc_page(GFP_ATOMIC | __GFP_COLD);
page = dev_alloc_page();
frag = page ? page_address(page) : NULL;
}
if (!frag) {