Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2014 08:41:22 -0800
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Viktor <vpenkoff@gmail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Receiving jumbo frames
Message-ID:  <20140207164122.GE89104@funkthat.com>
In-Reply-To: <52F49D36.8000103@gmail.com>
References:  <52F49D36.8000103@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Viktor wrote this message on Fri, Feb 07, 2014 at 10:45 +0200:
> Hi, folks! I'm writing an extension functionality to not-yet published 
> network driver.
> I'm receiving the typical ethernet frames without problems. Considering 
> the datasheet of the device,
> I'm capable of receiving jumbo frames. When I try to do that, e.g. to 
> send jumbo frame of 8000 bytes,  I'm receiving only a limited count of 
> them - 105, then the kernel crashes with the following message:
> "panic: vm_fault: fault on nofault entry, addr: cfcec000".

This happens when you access an address in kmem (kernel space) that
no longer has a page mapped...  This is probably due to a pointer
that was previously valid, but then you aren't suppose to have and the
kernel unmapped the page because the subsystem free'd it...

> I have inspected a kernel dump with kgdb and the problem occurs at the 
> function bus_dmamap_sync.

What part of this?  It could be that you are trying to _sync a buffer
that doesn't belong to you anymore...

Are you making sure that you allocate new frames to replace them in the
receive buffer?

> Some background information:
> To enable the jumbo frame, one must set the appropriate register.
> At the software level, a ring buffer with the descriptors is implemented.
> The device, under which the driver runs, is arm-based.
> The freebsd version is 8.0. The device uses SerialDMA queues for 
> transmitting and receiving.
> To receive packets, the CPU must perform the following:
>     1. Prepare a linked list of descriptors
>     2. Configure a given queue with the address of the first descriptor 
> in the list,
>     3. enable SerialDMA;
> 
> With the transmission - I don't have any problems. The logic is the same 
> as by the reception of packets - ring buffer with descriptors.
> 
> Any ideas what can cause this type of crashes?

With out better idea of what the driver is doing, or a line on which
the panic happens, the above is about all I can think of...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140207164122.GE89104>