On 2015-01-22 15:40, Mark Kettenis wrote:
Date: Thu, 22 Jan 2015 19:38:42 +0100 (CET)
From: Mark Kettenis <[email protected]>
> Date: Thu, 22 Jan 2015 18:04:44 +0100
> From: Stefan Sperling <[email protected]>
>
> On Thu, Jan 22, 2015 at 11:34:47AM -0500, John Merriam wrote:
> > So, what could be the problem then? Theoretically it did work as of the
> > 1.35 if_bce.c revision which seems to have shipped in OpenBSD 5.0. This
> > message:
> >
> > http://marc.info/?l=openbsd-tech&m=130217668909255
> >
> > seems to verify that it did actually work at one point.
>
> It looks as if some ring descriptor data is still being allocated with
> bus_dmamem_alloc(). That function probably doesn't respect the mapping
> constraints bce(4) hardware requires.
>
> This diff makes bce use the same memory allocation APIs as bwi(4) is
> using. Some bwi devices have the same 1GB problem and I know the bwi
> code works fine with such devices. So perhaps applying the same approach
> to bce will fix your issue.
I'd really prefer it if we'd solve this issue by promoting
_bus_dmamem_alloc_range() to a first class citizen. I'll try to
recover an old diff that did this tonight.
No harm in testing this diff though to verify that it indeed solves
the issue.
So here is the alternative diff. Only amd64/i386 are actually
implemented, but those are the only platforms we support bce(4) on.
Your diff also seems to work and pass the ping -f test with <= 1GB RAM.
I will also test this tonight with 4GB RAM installed in the machine.
Thanks
--
John Merriam