Skip to content

Commit f8ce966

Browse files
Sunil Gouthamdavem330
authored andcommitted
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 <[email protected]> Signed-off-by: Aleksey Makarov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2cb468e commit f8ce966

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/net/ethernet/cavium/thunder/nicvf_queues.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,11 @@ static inline int nicvf_alloc_rcv_buffer(struct nicvf *nic, gfp_t gfp,
103103

104104
/* Allocate a new page */
105105
if (!nic->rb_page) {
106-
nic->rb_page = alloc_pages(gfp | __GFP_COMP, order);
106+
nic->rb_page = alloc_pages(gfp | __GFP_COMP | __GFP_NOWARN,
107+
order);
107108
if (!nic->rb_page) {
108-
netdev_err(nic->netdev, "Failed to allocate new rcv buffer\n");
109+
netdev_err(nic->netdev,
110+
"Failed to allocate new rcv buffer\n");
109111
return -ENOMEM;
110112
}
111113
nic->rb_page_offset = 0;

0 commit comments

Comments
 (0)