]> git.baikalelectronics.ru Git - kernel.git/commit
thunderx: enable page recycling for non-XDP case
authorDean Nelson <dnelson@redhat.com>
Tue, 26 Mar 2019 15:53:19 +0000 (11:53 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Mar 2019 05:52:28 +0000 (22:52 -0700)
commit4cff769bf091b849faa6c68f145cef73c33471ca
tree990b9fb47a41c71e703c050dca65eca6da04f1bf
parenta6b180af5e8094ae5af7e8545e91fc489b35dd08
thunderx: enable page recycling for non-XDP case

Commit 63d9ab85bf8754348715 ("net: thunderx: Optimize page recycling for XDP")
added code to nicvf_alloc_page() that inadvertently disables receive buffer
page recycling for the non-XDP case by always NULL'ng the page pointer.

This patch corrects two if-conditionals to allow for the recycling of non-XDP
mode pages by only setting the page pointer to NULL when the page is not ready
for recycling.

Fixes: 63d9ab85bf87 ("net: thunderx: Optimize page recycling for XDP")
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nicvf_queues.c