qcacmn: Fallback to 4k slab allocation on page_frag alloc fail

In low memory conditions 32K page frag allocations via
qdf_nbuf_frag_alloc will fail, fallback and try 4k slab allocations.

Change-Id: I3c9b08af8b1cc3aa881a91338a88b736589fb4dd
CRs-Fixed: 3571487
This commit is contained in:
Prakash Manjunathappa
2023-07-27 23:19:45 -07:00
committed by Rahul Choudhary
parent 41a1814948
commit a57c1c99b5
2 changed files with 7 additions and 0 deletions

View File

@@ -647,7 +647,11 @@ struct sk_buff *__qdf_nbuf_frag_alloc(qdf_device_t osdev, size_t size,
}
skb = __netdev_alloc_skb(NULL, size, flags);
if (skb)
goto skb_alloc;
/* 32k page frag alloc failed, try page slab allocation */
skb = alloc_skb(size, flags);
if (skb)
goto skb_alloc;