netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* skbuff truesize incorrect.
@ 2014-05-22 19:07 Jim Baxter
  2014-05-22 19:21 ` David Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Jim Baxter @ 2014-05-22 19:07 UTC (permalink / raw)
  To: linux-usb, linux-kernel, netdev@vger.kernel.org
  Cc: David S. Miller, kamal, Ben Hutchings, edumazet, mszeredi, fw

Hi, I was hoping you can help me with some questions.

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.

    skb2 = skb_clone(skb, GFP_ATOMIC);
    if (skb2 == NULL)
        goto err;

    if (!skb_pull(skb2, index)) {
        ret = -EOVERFLOW;
        goto err;
    }

    skb_trim(skb2, dg_len - crc_len);

My questions are:

1) Which buffer size does truesize represent, is it the total buffer or
just the data related to the relevant skb?

2) If truesize is for the skb it is contained within should it be
updated during the call to skb_trim?

3) Why does the truesize default to 32960?


Thank you for any help,
Jim Baxter.

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

end of thread, other threads:[~2014-05-27 15:52 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-22 19:07 skbuff truesize incorrect Jim Baxter
2014-05-22 19:21 ` David Miller
2014-05-22 20:21   ` Jim Baxter
     [not found]     ` <537E5C63.7080607-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org>
2014-05-22 20:30       ` Eric Dumazet
2014-05-22 20:58     ` David Miller
2014-05-23  9:21       ` Jim Baxter
2014-05-23  9:27         ` David Laight
2014-05-23 16:46         ` David Miller
2014-05-22 19:25 ` Vlad Yasevich
2014-05-22 19:39   ` Jim Baxter
2014-05-22 19:59     ` Eric Dumazet
2014-05-22 20:21       ` Jim Baxter
2014-05-22 20:58 ` Eric Dumazet
2014-05-22 21:03   ` Eric Dumazet
2014-05-22 21:10     ` David Miller
2014-05-23  7:07       ` Bjørn Mork
2014-05-23  8:58         ` Jim Baxter
2014-05-23  9:33           ` Bjørn Mork
2014-05-23 14:00             ` Eric Dumazet
2014-05-23 15:44             ` Rick Jones
2014-05-23 16:00               ` Eric Dumazet
2014-05-23  8:52   ` David Laight
2014-05-23  9:48     ` Bjørn Mork
2014-05-23 10:45       ` David Laight
2014-05-23 11:13         ` Jim Baxter
2014-05-23 13:47           ` Eric Dumazet
2014-05-23 15:00             ` Jim Baxter
2014-05-23 15:30             ` David Laight
2014-05-23 15:41               ` Eric Dumazet
2014-05-23 20:18     ` David Miller
2014-05-27 15:23       ` David Laight
     [not found]         ` <063D6719AE5E284EB5DD2968C1650D6D1724E565-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-05-27 15:52           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).