path: root/sbin/etherswitchcfg/ifmedia.c
diff options
authorLuigi Rizzo <luigi@FreeBSD.org>2012-10-19 04:13:12 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2012-10-19 04:13:12 +0000
commit8241616dc534f6cf0c95abe6b61bc2bb0378fc91 (patch)
tree632c02c59edef4fb4a1c88fed6f4b6ae6cd4ca89 /sbin/etherswitchcfg/ifmedia.c
parent48f219c0da6130689b15635f7c601479595e1962 (diff)
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
Notes: svn path=/head/; revision=241719
Diffstat (limited to 'sbin/etherswitchcfg/ifmedia.c')
0 files changed, 0 insertions, 0 deletions