Subject: Re: zero length mbufs
To: Jason Thorpe <thorpej@shagadelic.org>
From: Neil Ludban <nludban@ydi.com>
List: tech-net
Date: 11/24/2004 13:15:00
Jason Thorpe wrote:
>
> On Nov 24, 2004, at 7:54 AM, Neil Ludban wrote:
>
>> I'm working on a new network driver under NetBSD/powerpc 2.0_RC3,
>> and discovered that the hardware goes off into an unexpected state
>> when it gets a DMA entry with length zero. It's easily reproduced
>> with ping requests (see below), and goes away with a 2-line
>> workaround in _bus_dmamap_load_mbuf. Does anybody have an opinion
>> as to the severity of this: can it be silently ignored as expected
>> mbuf behaviour, print a warning, or panic?
>
>
> I think it's probably reasonable to put the check into the bus_dma
> functions. While annoying, a zero-length mbuf is perfectly valid, so
> it's probably best to just program defensively in the bus_dma back-ends.
>
> Please file a PR about the problem, and I will be happy to make the
> necessary modifications to the extant bus_dma back-ends.
>
> -- Jason R. Thorpe <thorpej@shagadelic.org>
>
Here it is:
> Thank you very much for your problem report.
> It has the internal identification `kern/28411'.
> The individual assigned to look at your
> report is: kern-bug-people.
>
>
>>Category: kern
>>Responsible: kern-bug-people
>>Synopsis: bus_dmamap_load_mbuf may create zero length DMA segments
>>Arrival-Date: Wed Nov 24 18:09:01 +0000 2004
-Neil