Download raw body.
bounce buffer mbuf defrag
On Wed, 28 Aug 2024, Alexander Bluhm wrote:
> In my tests I have seen packet drops vio_encap() when using bounce
> buffers. Some mbufs seem to be too fragmented for the pre allocated
> bounce buffer pages. Calling m_defrag() fixes the problem.
>
> ok?
ok sf@
>
> bluhm
>
> Index: arch/amd64/amd64/bus_dma.c
> ===================================================================
> RCS file: /data/mirror/openbsd/cvs/src/sys/arch/amd64/amd64/bus_dma.c,v
> diff -u -p -r1.57 bus_dma.c
> --- arch/amd64/amd64/bus_dma.c 22 Aug 2024 11:36:24 -0000 1.57
> +++ arch/amd64/amd64/bus_dma.c 27 Aug 2024 20:48:12 -0000
> @@ -726,7 +726,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t,
>
> if (use_bounce_buffer) {
> if (page >= map->_dm_npages)
> - return (ENOMEM);
> + return (EFBIG);
>
> off = vaddr & PAGE_MASK;
> pg = map->_dm_pages[page];
>
>
bounce buffer mbuf defrag