All of lore.kernel.org
 help / color / mirror / Atom feed
* netdev_alloc_skb is failing for 16k length
@ 2019-05-27  6:51 Arun Kumar Neelakantam
  2019-05-27 14:59 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Kumar Neelakantam @ 2019-05-27  6:51 UTC (permalink / raw)
  To: netdev, Bjorn Andersson, Chris Lew

Hi team,

we are using "skb = netdev_alloc_skb(NULL, len);" which is getting 
failed sometimes for len = 16k.

I suspect mostly system memory got fragmented and hence atomic memory 
allocation for 16k is failing, can you please suggest best way to handle 
this failure case.

Thanks

Arun N


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: netdev_alloc_skb is failing for 16k length
  2019-05-27  6:51 netdev_alloc_skb is failing for 16k length Arun Kumar Neelakantam
@ 2019-05-27 14:59 ` Stephen Hemminger
  2019-05-28 10:08   ` Arun Kumar Neelakantam
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Hemminger @ 2019-05-27 14:59 UTC (permalink / raw)
  To: Arun Kumar Neelakantam; +Cc: netdev, Bjorn Andersson, Chris Lew

On Mon, 27 May 2019 12:21:51 +0530
Arun Kumar Neelakantam <aneela@codeaurora.org> wrote:

> Hi team,
> 
> we are using "skb = netdev_alloc_skb(NULL, len);" which is getting 
> failed sometimes for len = 16k.
> 
> I suspect mostly system memory got fragmented and hence atomic memory 
> allocation for 16k is failing, can you please suggest best way to handle 
> this failure case.
> 
> Thanks
> 
> Arun N
> 

If you are handling big frames, then put the data in page size chunks
and use build_skb.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: netdev_alloc_skb is failing for 16k length
  2019-05-27 14:59 ` Stephen Hemminger
@ 2019-05-28 10:08   ` Arun Kumar Neelakantam
  0 siblings, 0 replies; 3+ messages in thread
From: Arun Kumar Neelakantam @ 2019-05-28 10:08 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev, Bjorn Andersson, Chris Lew

On 5/27/2019 8:29 PM, Stephen Hemminger wrote:
> On Mon, 27 May 2019 12:21:51 +0530
> Arun Kumar Neelakantam <aneela@codeaurora.org> wrote:
>
>> Hi team,
>>
>> we are using "skb = netdev_alloc_skb(NULL, len);" which is getting
>> failed sometimes for len = 16k.
>>
>> I suspect mostly system memory got fragmented and hence atomic memory
>> allocation for 16k is failing, can you please suggest best way to handle
>> this failure case.
>>
>> Thanks
>>
>> Arun N
>>
> If you are handling big frames, then put the data in page size chunks
> and use build_skb.

Thank you. Now using alloc_skb_with_frags() with order 0 to allocate the 
memory fragments

and skb_store_bits() to store the data to skb from buffer.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-28 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27  6:51 netdev_alloc_skb is failing for 16k length Arun Kumar Neelakantam
2019-05-27 14:59 ` Stephen Hemminger
2019-05-28 10:08   ` Arun Kumar Neelakantam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.