Receiving jumbo frames

John-Mark Gurney jmg at funkthat.com
Fri Feb 7 16:41:29 UTC 2014


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."


More information about the freebsd-drivers mailing list