On Tue, Sep 02, 2025 at 11:59:52AM +0200, Mark Kettenis wrote:
> Unfortunately you can put qwx(4) in systems that have memory above the
> 36-bit address boundary.  Any x86 system with 64GB will have that, and
> even with less memory we can't be sure.  So using BUS_DMA_64BIT for
> the DMA memory allocation isn't safe.
> 
> However for you should be able to use bus_dmamem_alloc_range() with
> the appropriate upper limit for those allocations where the hardware
> is happy with a 36-bit limit.

Implementing this only for amd64 won't help x13s users. 
Would we make this decision on a per-arch basis, or somehow else?

> > I recall patrick@ clamping this driver for 4GB early on to fix some
> > problem related to loading the firmware. This was done before qwx even
> > provided a working network interface. So perhaps using 64-bit DMA for
> > packets is fine even on arm64?
> 
> That doesn't really help us since mbufs are always allocated below
> 4GB.

This is not about mbufs themselves, it is about descriptor rings.

The driver can either create these rings on demand when the AP indicates
that it will send us packets for a specific TID, or pre-allocate 16 rings
(TID 0 - 15) even if most of those rings won't ever be used.

Perhaps pre-allocation is the better strategy in this case?

Reply via email to