<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/netmap/netmap_mem2.c, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=main</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2026-08-07T16:30:24Z</updated>
<entry>
<title>netmap: Handle overflow when computing ring sizes</title>
<updated>2026-08-07T16:30:24Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-08-07T14:47:13Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=319414a926af1515e2572f89f0636e5505e762d5'/>
<id>urn:sha1:319414a926af1515e2572f89f0636e5505e762d5</id>
<content type='text'>
PR:		297300
Reported by:	Robert Morris
Reported by:	syzkaller
Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D58678
</content>
</entry>
<entry>
<title>netmap: Let memory allocator parameters be settable via loader.conf</title>
<updated>2025-12-14T15:47:48Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-12-14T15:47:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c694122f3cfb7d52b882fa79086d49f45a2c7fd2'/>
<id>urn:sha1:c694122f3cfb7d52b882fa79086d49f45a2c7fd2</id>
<content type='text'>
This is useful when dev.netmap.port_numa_affinity is set to 1.  When
interfaces attach, they get a memory allocator that is copied from
nm_mem.  Parameters in nm_mem can be set using sysctls, but this happens
after their values are copied.

To work around this, we can make it possible to set these memory
parameters as tunables.

Reviewed by:	vmaffione
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54178
</content>
</entry>
<entry>
<title>netmap: Make memory pools NUMA-aware</title>
<updated>2024-10-14T13:33:33Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-10-14T13:30:09Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1bae9dc584272dd75dc4e04cb5d73be0e9fb562a'/>
<id>urn:sha1:1bae9dc584272dd75dc4e04cb5d73be0e9fb562a</id>
<content type='text'>
Each netmap adapter associated with a physical adapter is attached to a
netmap memory pool.  contigmalloc() is used to allocate physically
contiguous memory for the pool, but ideally we would ensure that all
such memory is allocated from the NUMA domain local to the adapter.

Augment netmap's memory pools with a NUMA domain ID, similar to how
IOMMU groups are handled in the Linux port.  That is, when attaching to
a physical adapter, ensure that the associated memory pools are local to
the adapter's associated memory domain, creating new pools as needed.

Some types of ifnets do not have any defined NUMA affinity; in this case
the domain ID in question is the sentinel value -1.

Add a sysctl, dev.netmap.port_numa_affinity, which can be used to enable
the new behaviour.  Keep it disabled by now to avoid surprises in case
netmap applications are relying on zero-copy optimizations to forward
packets between ports belonging to different NUMA domains.

Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46666
</content>
</entry>
<entry>
<title>netmap: Make the memory ops function pointer table const</title>
<updated>2024-09-19T09:56:30Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2024-09-19T09:56:30Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1ae4951ba7bb203d9a29892792960f0869759d35'/>
<id>urn:sha1:1ae4951ba7bb203d9a29892792960f0869759d35</id>
<content type='text'>
No functional change intended.

Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D46664
</content>
</entry>
<entry>
<title>Deprecate contigfree(9) in favour of free(9)</title>
<updated>2024-07-26T10:45:01Z</updated>
<author>
<name>Bjoern A. Zeeb</name>
<email>bz@FreeBSD.org</email>
</author>
<published>2024-07-23T19:21:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d1bdc2821fcd416ab9b238580386eb605a6128d0'/>
<id>urn:sha1:d1bdc2821fcd416ab9b238580386eb605a6128d0</id>
<content type='text'>
As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer
needed and should not be used anymore.  We leave a wrapper for 3rd party
code in at least 15.x but remove (almost) all other cases from the tree.

This leaves one use of contigfree(9) untouched; that was the original
trigger for 9e6544dd6e02 and is handled in D45813 (to be committed
seperately later).

Sponsored by:	The FreeBSD Foundation
Reviewed by:	markj, kib
Tested by:	pho (10h stress test run)
Differential Revision: https://reviews.freebsd.org/D46099
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>urn:sha1:685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>urn:sha1:4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>Mechanically convert netmap(4) to IfAPI</title>
<updated>2023-02-14T15:21:19Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2023-01-12T18:38:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e330262f34fc179ce920c16bb28ba8a1c4a73aff'/>
<id>urn:sha1:e330262f34fc179ce920c16bb28ba8a1c4a73aff</id>
<content type='text'>
Reviewed by:	vmaffione, zlei
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37814
</content>
</entry>
<entry>
<title>netmap: fix refcount bug in netmap allocator</title>
<updated>2022-03-06T16:39:16Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2022-03-06T16:39:16Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=09a1893398fdcd1d000dae1cb3fd5239c0bfb360'/>
<id>urn:sha1:09a1893398fdcd1d000dae1cb3fd5239c0bfb360</id>
<content type='text'>
Symptom: when a single extmem memory region is provided to netmap
multiple times, for multiple interfaces, the memory region is
never released by netmap once all the existing file descriptors
are closed.

Fix the relevant condition in netmap_mem_drop(): release the memory
when the last user of netmap_adapter is gone, rather then when
the last user of netmap_mem_d is gone.

MFC after:	2 weeks
</content>
</entry>
<entry>
<title>netmap: fix uint32_t overflow in pool size calculation</title>
<updated>2021-09-26T13:56:33Z</updated>
<author>
<name>Vincenzo Maffione</name>
<email>vmaffione@FreeBSD.org</email>
</author>
<published>2021-09-26T13:56:33Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3e3314a8b7e3dd8d19a209ee2988f724e138a0ae'/>
<id>urn:sha1:3e3314a8b7e3dd8d19a209ee2988f724e138a0ae</id>
<content type='text'>
MFC after:	1 week
</content>
</entry>
</feed>
