opnsense-src/sys/dev/xen
Mark Johnston 1f132ff145 xen/netfront: Decouple XENNET tags from mbuf lifetimes
netmap's generic mode tries to improve performance by minimizing mbuf
allocations.  In service of this goal, it maintains an extra reference
to the mbuf and polls the counter to see if the driver has released its
reference by calling m_freem().  As a result, the extref destructor is
not called when expected by the netfront driver, and mbufs tags are not
freed.

Modify the tx path to release its mbuf tags promptly when reclaiming tx
descriptors.  They are drawn from a fixed-size pool, so otherwise are
quickly exhausted when a netfront interface is in netmap generic mode.

Co-authored by:	royger
MFC after:	2 weeks
Fixes:	dabb3db7a8 ("xen/netfront: deal with mbuf data crossing a page boundary")
Sponsored by:	Cloud Software Group
Sponsored by:	Klara, Inc.
Sponsored by:	Zenarmor
2024-08-04 09:34:13 +02:00
..
balloon sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blkback sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
blkfront sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
bus sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
console sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
control xen: improve shutdown hook 2023-12-08 18:02:44 -04:00
cpu sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
debug sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
efi sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
evtchn sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
gntdev gntdev: Handle errors from suword32() in gntdev_alloc_gref() 2024-01-01 19:29:56 -05:00
grant_table sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netback sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
netfront xen/netfront: Decouple XENNET tags from mbuf lifetimes 2024-08-04 09:34:13 +02:00
privcmd sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
timer sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenpci sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
xenstore sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00