lkml.org 
[lkml]   [2014]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: skbuff truesize incorrect.
    From
    Date
    On Thu, 2014-05-22 at 20:07 +0100, Jim Baxter wrote:

    >
    > I have been investigating a network issue with bursts of network traffic
    > over USB CDC-NCM, the issue is that the kernel is dropping packets
    > because sk_rcvqueues_full() returns true due to skb2->truesize is always
    > 32960 instead of SKB_TRUESIZE(skb2->len) which is about 1800.
    >
    > The code I am trying to fix is this code below, it is splitting a set of
    > multiple network packets compressed into a single 16k packet into
    > individual skb's and sending them up the network stack.

    if skb are allocated with 16k = 16384 bytes, adding the struct
    skb_shared_info overhead and rounding up to power of two gives 32768
    bytes.

    Chances to be able to allocate 32KB contiguous memory are slim after a
    while.

    I would set rx_max (rx_urb_size) to SKB_MAX_HEAD(0) so that you do not
    use high order allocations.

    What is the exact 'overhead' using ~4K instead of 16K exactly on this
    hardware ?





    \
     
     \ /
      Last update: 2014-05-22 23:41    [W:6.447 / U:0.064 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site