summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunil Goutham2015-07-29 15:49:41 +0200
committerDavid S. Miller2015-07-30 08:52:31 +0200
commitf8ce9666fa63da7e5afd9ff6e3221f86555621f3 (patch)
tree7186d08c8ba245538c045b67ca814b5f0d3c9e38
parentnet: thunderx: Fix TSO packet statistic (diff)
downloadkernel-qcow2-linux-f8ce9666fa63da7e5afd9ff6e3221f86555621f3.tar.gz
kernel-qcow2-linux-f8ce9666fa63da7e5afd9ff6e3221f86555621f3.tar.xz
kernel-qcow2-linux-f8ce9666fa63da7e5afd9ff6e3221f86555621f3.zip
net: thunderx: Suppress alloc_pages() failure warnings
Suppressing standard alloc_pages() warnings. Some kernel configs limit alloc size and the network driver may fail. Do not drop a kernel warning in this case, instead just drop a oneliner that the network driver could not be loaded since the buffer could not be allocated. Signed-off-by: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cavium/thunder/nicvf_queues.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 500fdbe08ceb..ca4240aa6d15 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -103,9 +103,11 @@ static inline int nicvf_alloc_rcv_buffer(struct nicvf *nic, gfp_t gfp,
/* Allocate a new page */
if (!nic->rb_page) {
- nic->rb_page = alloc_pages(gfp | __GFP_COMP, order);
+ nic->rb_page = alloc_pages(gfp | __GFP_COMP | __GFP_NOWARN,
+ order);
if (!nic->rb_page) {
- netdev_err(nic->netdev, "Failed to allocate new rcv buffer\n");
+ netdev_err(nic->netdev,
+ "Failed to allocate new rcv buffer\n");
return -ENOMEM;
}
nic->rb_page_offset = 0;