public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr•eu>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Miller <davem@davemloft•net>,
	John Williams <john.williams@petalogix•com>,
	netdev@vger•kernel.org
Subject: Re: ICMP packets - ll_temac with Microblaze
Date: Wed, 21 Dec 2011 11:41:40 +0100	[thread overview]
Message-ID: <4EF1B7E4.4010602@monstr.eu> (raw)
In-Reply-To: <1324463838.2728.24.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

Eric Dumazet wrote:
> Le mercredi 21 décembre 2011 à 11:32 +0100, Michal Simek a écrit :
>> Eric Dumazet wrote:
>>> Le mercredi 21 décembre 2011 à 11:28 +0100, Eric Dumazet a écrit :
>>>> Le mercredi 21 décembre 2011 à 11:11 +0100, Michal Simek a écrit :
>>>>> Hi Eric and David,
>>>>>
>>>>> I have found one problem with ll_temac driver and
>>>>> this commit: net: more accurate skb truesize
>>>>> sha1: 87fb4b7b533073eeeaed0b6bf7c2328995f6c075
>>>>>
>>>>> The problem is only with icmp packets from the target. It is sent and driver receive it
>>>>> but it is not proceed to the application.
>>>>>
>>>>> The problem I see is that kmalloc_node_track_caller allocate
>>>>> specific size and then this size is changed by SKB_WITH_OVERHEAD(ksize(data)).
>>>>> The problem is with netdev_alloc_skb_ip_align which calls __alloc_skb function.
>>>>>
>>>>> Currently driver uses setting for jumbo frames (9k). When I change it to use mtu (1,5k) then
>>>>> everything is ok.
>>>>>
>>>>> Can you give me some hints what can be wrong?
>>>>>
>>>> Is it with SLUB, SLAB or SLOB allocator ?
>>>>
>>>>
>>> (I am referring to commit bc417e30f8d
>>> (net: Add back alignment for size for __alloc_skb)
>> I have seen that commit. Using the latest&greatest version with this patch.
>>
> 
> So after these changes, struct skb_shared_info is located to the very
> end of allocated memory.
> 
> Maybe there is a problem with MTU=9000, since assuming PAGE_SIZE=4096 on
> your machine (is it ?), we have a 16384 bytes block of memory, and
> ~16000 available in skb head, instead of ~9000

yes, page size is 4k.

Here is the log for allocation - origin size for MTU 9000 is 0x2420(9248) and size after
overhead is 0x3f40(16192)

kmalloc_node_track_caller size 00002420, SKB_WITH_OVERHEAD(ksize(data)) 00003f40
skb->head     c7870000
skb->data     c7870000
skb->tail     c7870000
skb->truesize 000040c0
skb->end      c7873f40


Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

  reply	other threads:[~2011-12-21 10:41 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-21 10:11 ICMP packets - ll_temac with Microblaze Michal Simek
2011-12-21 10:28 ` Eric Dumazet
2011-12-21 10:30   ` Michal Simek
2011-12-21 10:30   ` Eric Dumazet
2011-12-21 10:32     ` Michal Simek
2011-12-21 10:37       ` Eric Dumazet
2011-12-21 10:41         ` Michal Simek [this message]
2011-12-21 10:45           ` Eric Dumazet
2011-12-21 10:54             ` Michal Simek
2011-12-21 11:05               ` Eric Dumazet
2011-12-21 11:03             ` Eric Dumazet
2011-12-21 11:10               ` Michal Simek
2011-12-21 11:13                 ` Eric Dumazet
2011-12-21 11:50                   ` Michal Simek
2011-12-21 12:39                     ` Eric Dumazet
2011-12-21 13:28                       ` Michal Simek
2011-12-21 13:40                         ` Eric Dumazet
2011-12-21 14:24                           ` Michal Simek
2011-12-21 15:30                             ` Eric Dumazet
2011-12-21 15:44                               ` Eric Dumazet
2011-12-21 16:01                                 ` Jun Zhao
2011-12-21 16:05                                   ` Eric Dumazet
2011-12-21 16:11                                     ` Jun Zhao
2011-12-21 16:39                                     ` David Laight
2011-12-21 16:50                                       ` Eric Dumazet
2011-12-21 15:59                             ` Eric Dumazet
2011-12-21 17:11                               ` Eric Dumazet
2011-12-21 20:55                                 ` David Miller
2011-12-22  7:49                                   ` Michal Simek
2011-12-22  7:57                                     ` Eric Dumazet
2011-12-22  8:05                                       ` Michal Simek
2011-12-22 10:32 ` Michael Wang
2011-12-22 10:46   ` Eric Dumazet
2011-12-22 13:01     ` Michael Wang
2011-12-22 13:21       ` Eric Dumazet
2011-12-22 13:42         ` Michael Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EF1B7E4.4010602@monstr.eu \
    --to=monstr@monstr$(echo .)eu \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=john.williams@petalogix$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox