diff --git a/qdf/linux/src/i_qdf_nbuf.h b/qdf/linux/src/i_qdf_nbuf.h index ee065f1606..442d372784 100644 --- a/qdf/linux/src/i_qdf_nbuf.h +++ b/qdf/linux/src/i_qdf_nbuf.h @@ -360,6 +360,9 @@ __qdf_nbuf_t __qdf_nbuf_alloc_ppe_ds(__qdf_device_t osdev, size_t size, * unaligned will result in an unaligned address. * It will call into kernel page fragment APIs, long time keeping for scattered * allocations should be considered for avoidance. + * This also brings in more probability of page frag allocation failures during + * low memory situation. In case of page frag allocation failure, fallback to + * non-frag slab allocations. * * Return: nbuf or %NULL if no memory */ diff --git a/qdf/linux/src/qdf_nbuf.c b/qdf/linux/src/qdf_nbuf.c index 29ba4477f9..4d21c366cf 100644 --- a/qdf/linux/src/qdf_nbuf.c +++ b/qdf/linux/src/qdf_nbuf.c @@ -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;