| #
8241616d
|
| 19-Oct-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
This is an import of code, mostly from Giuseppe Lettieri, that revises the netmap memory allocator so that the various parameters (number and size of buffers, rings, descriptors) can be modified at r
This is an import of code, mostly from Giuseppe Lettieri, that revises the netmap memory allocator so that the various parameters (number and size of buffers, rings, descriptors) can be modified at runtime through sysctl variables. The changes become effective when no netmap clients are active.
The API is mostly unchanged, although the NIOCUNREGIF ioctl now does not bring the interface back to normal mode: and you need to close the file descriptor for that. This change was necessary to track who is using the mapped region, and since it is a simplification of the API there was no incentive in trying to preserve NIOCUNREGIF. We will remove the ioctl from the kernel next time we need a real API change (and version bump).
Among other things, buffer allocation when opening devices is now much faster: it used to take O(N^2) time, now it is linear.
Submitted by: Giuseppe Lettieri
show more ...
|
| #
4cf8455f
|
| 17-Oct-2012 |
Ed Maste <emaste@FreeBSD.org> |
Avoid panic when a netmap instance cannot obtain memory.
A uint32_t is always >= 0.
Sponsored by: ADARA Networks
|
| #
e11b6fa3
|
| 03-Aug-2012 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r233826 through r239010.
|
| #
0b8ed8e0
|
| 30-Jul-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
- move the inclusion of netmap headers to the common part of the code; - more portable annotations for unused arguments;
|
| #
f196ce38
|
| 26-Jul-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
Add support for VALE bridges to the netmap core, see
http://info.iet.unipi.it/~luigi/vale/
VALE lets you dynamically instantiate multiple software bridges that talk the netmap API (and are *ext
Add support for VALE bridges to the netmap core, see
http://info.iet.unipi.it/~luigi/vale/
VALE lets you dynamically instantiate multiple software bridges that talk the netmap API (and are *extremely* fast), so you can test netmap applications without the need for high end hardware.
This is particularly useful as I am completing a netmap-aware version of ipfw, and VALE provides an excellent testing platform.
Also, I also have netmap backends for qemu mostly ready for commit to the port, and this too will let you interconnect virtual machines at high speed without fiddling with bridges, tap or other slow solutions.
The API for applications is unchanged, so you can use the code in tools/tools/netmap (which i will update soon) on the VALE ports.
This commit also syncs the code with the one in my internal repository, so you will see some conditional code for other platforms. The code should run mostly unmodified on stable/9 so people interested in trying it can just copy sys/dev/netmap/ and sys/net/netmap*.h from HEAD
VALE is joint work with my colleague Giuseppe Lettieri, and is partly supported by the EU Projects CHANGE and OPENLAB
show more ...
|
| #
6a068746
|
| 15-May-2012 |
Alexander Motin <mav@FreeBSD.org> |
MFC
|
| #
3d328873
|
| 30-Apr-2012 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r233826 through r234834.
|
| #
38f1b189
|
| 26-Apr-2012 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r234692
sys/amd64/include/cpufunc.h sys/amd64/include/fpu.h sys/amd64/amd64/fpu.c sys/amd64/vmm/vmm.c
- Add API to allow vmm FPU state init/save/restore.
FP stuff discussed with: kib
|
| #
b1123b01
|
| 14-Apr-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
i prefer this fix for the -Wformat warning (just one cast, all the other variables are already correct for %x). My previous attempt put the cast in the wrong place.
|
| #
92083c91
|
| 14-Apr-2012 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Make compile on 64bit somehow for now after a first try at r234242 on maybe 32bit?
|
| #
ce2cb792
|
| 13-Apr-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
fix build with -Wformat -Wmissing-prototypes
|
| #
ccdc3305
|
| 13-Apr-2012 |
Luigi Rizzo <luigi@FreeBSD.org> |
add the new memory allocator for netmap, which allocates memory in small clusters instead of one big contiguous chunk. This was already enabled in the previous commit.
|
| #
c694122f
|
| 14-Dec-2025 |
Mark Johnston <markj@FreeBSD.org> |
netmap: Let memory allocator parameters be settable via loader.conf
This is useful when dev.netmap.port_numa_affinity is set to 1. When interfaces attach, they get a memory allocator that is copied
netmap: Let memory allocator parameters be settable via loader.conf
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
show more ...
|
| #
1bae9dc5
|
| 14-Oct-2024 |
Mark Johnston <markj@FreeBSD.org> |
netmap: Make memory pools NUMA-aware
Each netmap adapter associated with a physical adapter is attached to a netmap memory pool. contigmalloc() is used to allocate physically contiguous memory for
netmap: Make memory pools NUMA-aware
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
show more ...
|
| #
1ae4951b
|
| 19-Sep-2024 |
Mark Johnston <markj@FreeBSD.org> |
netmap: Make the memory ops function pointer table const
No functional change intended.
Reviewed by: vmaffione MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.fr
netmap: Make the memory ops function pointer table const
No functional change intended.
Reviewed by: vmaffione MFC after: 2 weeks Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D46664
show more ...
|
| #
d1bdc282
|
| 23-Jul-2024 |
Bjoern A. Zeeb <bz@FreeBSD.org> |
Deprecate contigfree(9) in favour of free(9)
As of 9e6544dd6e02c46b805d11ab925c4f3b18ad7a4b contigfree(9) is no longer needed and should not be used anymore. We leave a wrapper for 3rd party code i
Deprecate contigfree(9) in favour of free(9)
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
show more ...
|
| #
685dc743
|
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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
show more ...
|
| #
e330262f
|
| 12-Jan-2023 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Mechanically convert netmap(4) to IfAPI
Reviewed by: vmaffione, zlei Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D37814
|
| #
09a18933
|
| 06-Mar-2022 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: fix refcount bug in netmap allocator
Symptom: when a single extmem memory region is provided to netmap multiple times, for multiple interfaces, the memory region is never released by netmap
netmap: fix refcount bug in netmap allocator
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
show more ...
|
| #
3e3314a8
|
| 26-Sep-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: fix uint32_t overflow in pool size calculation
MFC after: 1 week
|
| #
98399ab0
|
| 22-Aug-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: import changes from upstream
- make sure rings are disabled during resets - introduce netmap_update_hostrings_mode(), with support for multiple host rings - always initialize ni_bufs_h
netmap: import changes from upstream
- make sure rings are disabled during resets - introduce netmap_update_hostrings_mode(), with support for multiple host rings - always initialize ni_bufs_head in netmap_if ni_bufs_head was not properly initialized when no external buffers were requestedx and contained the ni_bufs_head from the last request. This was causing spurious buffer frees when alternating between apps that used external buffers and apps that did not use them. - check na validitity under lock on detach - netmap_mem: fix leak on error path - nm_dispatch: fix compilation on Raspberry Pi
MFC after: 2 weeks
show more ...
|
| #
70275a67
|
| 11-Apr-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: don't use linux type struct device *
Such type cannot be used in code that is in common between FreeBSD and Linux. Use the FreeBSD type instead.
MFC after: 3 days Reported by: markj Differe
netmap: don't use linux type struct device *
Such type cannot be used in code that is in common between FreeBSD and Linux. Use the FreeBSD type instead.
MFC after: 3 days Reported by: markj Differential Revision: https://reviews.freebsd.org/D29677
show more ...
|
| #
45c67e8f
|
| 02-Apr-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: several typo fixes
No functional changes intended.
|
| #
a6d768d8
|
| 29-Mar-2021 |
Vincenzo Maffione <vmaffione@FreeBSD.org> |
netmap: add kernel support for the "offsets" feature
This feature enables applications to ask netmap to transmit or receive packets starting at a user-specified offset from the beginning of the netm
netmap: add kernel support for the "offsets" feature
This feature enables applications to ask netmap to transmit or receive packets starting at a user-specified offset from the beginning of the netmap buffer. This is meant to ease those packet manipulation operations such as pushing or popping packet headers, that may be useful to implement software switches, routers and other packet processors. To use the feature, drivers (e.g., iflib, vtnet, etc.) must have explicit support. This change does not add support for any driver, but introduces the necessary kernel changes. However, offsets support is already included for VALE ports and pipes.
show more ...
|