opnsense-src/sys/arm64/broadcom
Mitchell Horne 8daa609450 if_genet: don't load DMA mapping when tx_queue is full
gen_encap() always calls bus_dmamap_load_mbuf_sg() into 'map' (which is
the current tx_queue). If the tx_queue is full, it will load with a
'map' that already has a currently active mapping. This violates the
busdma(9) KPI.

Checking for a full queue and returning ENOBUFS will allow
gen_start_locked() to set the IFF_DRV_OACTIVE faster without having to
needlessly check if the mbuf will fit (it won't).

PR:		256482
Reviewed by:	mhorne
MFC after:	1 week
Submitted by:	ghuckriede@blackberry.com

(cherry picked from commit a35f66510917f5ac21c11e9642174cda7718fbc6)
2024-07-04 10:31:54 -03:00
..
brcmmdio sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
genet if_genet: don't load DMA mapping when tx_queue is full 2024-07-04 10:31:54 -03:00