aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/netmap/netmap_mem2.c
Commit message (Collapse)AuthorAgeFilesLines
* another minor bugfix in the memory allocator, this time in the free routine.Luigi Rizzo2013-05-101-1/+1
| | | | Notes: svn path=/head/; revision=250441
* remove trailing whitespaceLuigi Rizzo2013-05-021-4/+4
| | | | Notes: svn path=/head/; revision=250184
* whitespace - document alternative locking under linuxLuigi Rizzo2013-04-291-0/+2
| | | | Notes: svn path=/head/; revision=250054
* whitespace changes:Luigi Rizzo2013-04-291-1/+0
| | | | | | | remove $Id$ lines, and add blank lines around some #if / #elif /#endif Notes: svn path=/head/; revision=250052
* mostly whitespace changes:Luigi Rizzo2013-04-191-28/+27
| | | | | | | | - remove vestiges of the old memory allocator - clean up some comments Notes: svn path=/head/; revision=249659
* fix a bug in the computation of the userspace offset for a give netmap buffer.Luigi Rizzo2013-04-151-1/+1
| | | | | | | Submitted by: Hugh Nhan Notes: svn path=/head/; revision=249504
* control some debugging messages with dev.netmap.verboseLuigi Rizzo2013-01-231-11/+34
| | | | | | | | add infrastracture to adapt to changes in number of queues and buffers at runtime Notes: svn path=/head/; revision=245835
* Use M_NOWAIT when calling malloc with a lock held.Ed Maste2012-10-191-2/+2
| | | | | | | | The check for a NULL return was already in place so I assume this was just an oversight. Notes: svn path=/head/; revision=241750
* This is an import of code, mostly from Giuseppe Lettieri,Luigi Rizzo2012-10-191-193/+422
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Avoid panic when a netmap instance cannot obtain memory.Ed Maste2012-10-171-1/+2
| | | | | | | | | A uint32_t is always >= 0. Sponsored by: ADARA Networks Notes: svn path=/head/; revision=241643
* - move the inclusion of netmap headers to the common part of the code;Luigi Rizzo2012-07-301-2/+3
| | | | | | | - more portable annotations for unused arguments; Notes: svn path=/head/; revision=238912
* Add support for VALE bridges to the netmap core, seeLuigi Rizzo2012-07-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=238812
* i prefer this fix for the -Wformat warning (just one cast,Luigi Rizzo2012-04-141-5/+3
| | | | | | | | all the other variables are already correct for %x). My previous attempt put the cast in the wrong place. Notes: svn path=/head/; revision=234290
* Make compile on 64bit somehow for now after a first try at r234242 onBjoern A. Zeeb2012-04-141-3/+5
| | | | | | | maybe 32bit? Notes: svn path=/head/; revision=234283
* fix build with -Wformat -Wmissing-prototypesLuigi Rizzo2012-04-131-2/+2
| | | | Notes: svn path=/head/; revision=234242
* add the new memory allocator for netmap, which allocates memoryLuigi Rizzo2012-04-131-0/+720
in small clusters instead of one big contiguous chunk. This was already enabled in the previous commit. Notes: svn path=/head/; revision=234228