| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement multiqueue (max 2 tx/rx queues) for the 82574L chipset.
Change default tuning parameters to handle this new configuration if
EM_MULTIQUEUE is set in the kernel configuration. Off by default.
See r283959 changelog for the scope of these changes.
Relnotes: Yes
Sponsored by: Limelight Networks
Notes:
svn path=/stable/10/; revision=284522
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a netmap process terminates without the full set of buffers it
was granted via rings and ni_bufs_list_head represented in those rings
and lists (e.g., via SIGKILL), those buffers are no longer available
for subsequent users for the lifetime of the system. To mitigate this
resource leak, reset the allocator state when the last ref to that
allocator is released.
Note that this only recovers leaked resources for an allocator when
there are no longer any users of that allocator, so there remain
circumstances in which leaked allocator resources may not ever be
recovered - consider a set of multiple netmap processes that are all
using the same allocator (say, the global allocator) where members of
that set may be killed and restarted over time but at any given point
there is one member of that set running.
Notes:
svn path=/stable/10/; revision=283343
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r275358:
Start process of removing the use of the deprecated "M_FLOWID" flag
from the FreeBSD network code. The flag is still kept around in the
"sys/mbuf.h" header file, but does no longer have any users. Instead
the "m_pkthdr.rsstype" field in the mbuf structure is now used to
decide the meaning of the "m_pkthdr.flowid" field. To modify the
"m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
macros as defined in the "sys/mbuf.h" header file.
This patch introduces new behaviour in the transmit direction.
Previously network drivers checked if "M_FLOWID" was set in "m_flags"
before using the "m_pkthdr.flowid" field. This check has now now been
replaced by checking if "M_HASHTYPE_GET(m)" is different from
"M_HASHTYPE_NONE". In the future more hashtypes will be added, for
example hashtypes for hardware dedicated flows.
"M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
valid and has no particular type. This change removes the need for an
"if" statement in TCP transmit code checking for the presence of a
valid flowid value. The "if" statement mentioned above is now a direct
variable assignment which is then later checked by the respective
network drivers like before.
r275483:
Remove M_FLOWID from SCTP code.
r276982:
Remove no longer used "M_FLOWID" flag from mbuf.h and update the netisr
manpage.
Note: The FreeBSD version has been bumped.
Reviewed by: hps, tuexen
Sponsored by: Limelight Networks
Notes:
svn path=/stable/10/; revision=281955
|
| |
|
|
|
|
|
| |
netmap: improve the netmap attach message on FreeBSD.
Notes:
svn path=/stable/10/; revision=281706
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
svn 275358 (M_FLOWID deprecation, only a couple of lines)
which cannot be merged.
if_lem_netmap.h, if_re_netmap.h:
- use the same (commented out) function to update the stat counters
as in HEAD. This is a no-op here
netmap.c
- merge 274459 (support for private knote lock)
and minor changes on nm_config and comments
netmap_freebsd.c
- merge 274459 (support for private knote lock)
- merge 274354 (initialize color if passed as argument)
netmap_generic.c
- fix a comment
netmap_kern.h
- revise the lock macros, using sx locks;
merge 274459 (private knote lock)
netmap_monitor.c
- use full memory barriers
netmap_pipe.c
- use full memory barriers, use length from the correct queue
(mostly cosmetic, since the queues typically have the same size)
Notes:
svn path=/stable/10/; revision=278779
|
| |
|
|
|
|
|
|
| |
fix a panic when passing ifioctl from a netmap file descriptor to
the underlying device. This needs to be merged to 10.1
Notes:
svn path=/stable/10/; revision=272604
|
| |
|
|
|
|
|
| |
Change netmap's global lock to sx instead of a mutex.
Notes:
svn path=/stable/10/; revision=270298
|
| |
|
|
|
|
|
| |
(vtnet and cxgbe not merged yet because we need some other mfc first)
Notes:
svn path=/stable/10/; revision=270252
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes from Fanco Ficthner on transparent mode
* The way rings are updated changed with the last API bump.
Also sync ->head when moving slots in netmap_sw_to_nic().
* Remove a crashing selrecord() call.
* Unclog the logic surrounding netmap_rxsync_from_host().
* Add timestamping to RX host ring.
* Remove a couple of obsolete comments.
Submitted by: Franco Fichtner
MFC after: 3 days
Sponsored by: Packetwerk
Notes:
svn path=/stable/10/; revision=267334
|
| |
|
|
|
|
|
|
|
|
|
| |
change the netmap mbuf destructor so the same code works also on FreeBSD 9.
For head and 10 this change has no effect, but on stable/9 it would cause
panics when using emulated netmap on top of a standard device driver.
MFC after: 3 days
Notes:
svn path=/stable/10/; revision=267333
|
| |
|
|
|
|
|
|
|
|
| |
- fix handling of tx mbufs in emulated netmap mode;
- introduce mbq_lock() and mbq_unlock()
- rate limit some error messages
- many whitespace and comment fixes
Notes:
svn path=/stable/10/; revision=267282
|
| |
|
|
| |
Notes:
svn path=/stable/10/; revision=262214
|
| |
|
|
| |
Notes:
svn path=/stable/10/; revision=262152
|
| |
|
|
|
|
|
|
| |
(enhanced VALE switch, netmap pipes, emulated netmap mode).
See details in the log for svn 261909.
Notes:
svn path=/stable/10/; revision=262151
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- This version has support for the new Intel Avoton systems,
including 2.5Gb support, further it now has IPv6/TSO6 support as
well. Shared code has been updated where necessary as well. Thanks
to my new assistant Eric Joyner for doing the transmit path changes
to bring in the IPv6/TSO6 support. Thanks to Gleb for catching the
one bug and change needed in NETMAP.
Approved by: re
Notes:
svn path=/head/; revision=256200
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
from each batch flowing on the VALE switch
- feature: add glue for 'indirect' buffers on the sender side:
if a slot has NS_INDIRECT set, the netmap buffer contains pointer(s)
to the actual userspace buffers, which are accessed with copyin().
The feature is not finalised yet, as it will likely need to deal
with some iovec variant for proper scatter/gather support.
This will save one copy for clients (e.g. qemu) that cannot
use the netmap buffer directly.
A curiosity: on amd64 copyin() appears to be 10-15% faster than pkt_copy()
or bcopy() at least for sizes of 256 and greater.
Notes:
svn path=/head/; revision=251425
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- the VALE switch now support up to 254 destinations per switch,
unicast or broadcast (multicast goes to all ports).
- we can attach hw interfaces and the host stack to a VALE switch,
which means we will be able to use it more or less as a native bridge
(minor tweaks still necessary).
A 'vale-ctl' program is supplied in tools/tools/netmap
to attach/detach ports the switch, and list current configuration.
- the lookup function in the VALE switch can be reassigned to
something else, similar to the pf hooks. This will enable
attaching the firewall, or other processing functions (e.g. in-kernel
openvswitch) directly on the netmap port.
The internal API used by device drivers does not change.
Userspace applications should be recompiled because we
bump NETMAP_API as we now use some fields in the struct nmreq
that were previously ignored -- otherwise, data structures
are the same.
Manpages will be committed separately.
Notes:
svn path=/head/; revision=251139
|
| |
|
|
| |
Notes:
svn path=/head/; revision=250441
|
| |
|
|
| |
Notes:
svn path=/head/; revision=250184
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- netmap_rx_irq()/netmap_tx_irq() can now be called by FreeBSD drivers
hiding the logic for handling NIC interrupts in netmap mode.
This also simplifies the case of NICs attached to VALE switches.
Individual drivers will be updated with separate commits.
- use the same refcount() API for FreeBSD and linux
- plus some comments, typos and formatting fixes
Portions contributed by Michio Honda
Notes:
svn path=/head/; revision=250107
|
| |
|
|
| |
Notes:
svn path=/head/; revision=250054
|
| |
|
|
|
|
|
| |
remove $Id$ lines, and add blank lines around some #if / #elif /#endif
Notes:
svn path=/head/; revision=250052
|
| |
|
|
| |
Notes:
svn path=/head/; revision=250049
|
| |
|
|
|
|
|
|
| |
- remove vestiges of the old memory allocator
- clean up some comments
Notes:
svn path=/head/; revision=249659
|
| |
|
|
|
|
|
| |
Submitted by: Hugh Nhan
Notes:
svn path=/head/; revision=249504
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.
The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
- VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
- VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
- VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
- VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
(in order to avoid visibility of implementation details)
- The read-mode operations are added:
VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
sys/mutex.h in consumers directly to cater its inlining functions
using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
the compat layer because the name clash between FreeBSD and solaris
versions must be avoided.
At this purpose zfs redefines the vm_object locking functions
directly, isolating the FreeBSD components in specific compat stubs.
The KPI results heavilly broken by this commit. Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).
Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: pjd (ZFS specific review)
Discussed with: alc
Tested by: pho
Notes:
svn path=/head/; revision=248084
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By setting dev.netmap.fwd=1 (or enabling the feature with a per-ring flag),
packets are forwarded between the NIC and the host stack unless the
netmap client clears the NS_FORWARD flag on the individual descriptors.
This feature greatly simplifies applications where some traffic
(think of ARP, control traffic, ssh sessions...) must be processed
by the host stack, whereas the bulk is handled by the netmap process
which simply (un)marks packets that should not be forwarded.
The default is chosen so that now a netmap receiver operates
in a mode very similar to bpf.
Of course there is no free lunch: traffic to/from the host stack
still operates at OS speed (or less, as there is one extra copy in
one direction).
HOWEVER, since traffic goes to the user process before being
reinjected, and reinjection occurs in a user context, you get some
form of livelock protection for free.
Notes:
svn path=/head/; revision=245836
|
| |
|
|
|
|
|
|
| |
add infrastracture to adapt to changes in number of queues
and buffers at runtime
Notes:
svn path=/head/; revision=245835
|
| |
|
|
| |
Notes:
svn path=/head/; revision=245581
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
two upcoming features:
semi-transparent mode:
when a device is opened in this mode, the
user program will be able to mark slots that must be forwarded
to the "other" side (i.e. from NIC to host stack, or viceversa),
and the forwarding will occur automatically at the next netmap syscall.
This saves the need to open another file descriptor and do
the forwarding manually.
direct-forwarding mode:
when operating with a VALE port, the user can specify in the slot
the actual destination port, overriding the forwarding decision
made by a lookup of the destination MAC. This can be useful to
implement packet dispatchers.
No API changes will be introduced.
No new functionality in this patch yet.
Notes:
svn path=/head/; revision=245579
|
| |
|
|
| |
Notes:
svn path=/head/; revision=245570
|
| |
|
|
|
|
|
|
|
|
|
|
| |
previous names, 'ptag' and 'pmap' -- p stands for packet.
This change reduces the difference between the code in stable/9
and head, and also helps using the same ixgbe_netmap.h on both branches.
Approved by: Jack Vogel
Notes:
svn path=/head/; revision=244514
|
| |
|
|
|
|
|
| |
This removes the header split and supporting code from the driver.
Notes:
svn path=/head/; revision=243714
|
| |
|
|
|
|
|
|
| |
The check for a NULL return was already in place so I assume this was just
an oversight.
Notes:
svn path=/head/; revision=241750
|
| |
|
|
| |
Notes:
svn path=/head/; revision=241723
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
A uint32_t is always >= 0.
Sponsored by: ADARA Networks
Notes:
svn path=/head/; revision=241643
|
| |
|
|
| |
Notes:
svn path=/head/; revision=239242
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Move destruction of per-ring locks to netmap_dtor_locked to mirror the
initialization that happens in NIOCREGIF. Otherwise unloading a netmap-
capable interface that was never put into netmap mode would try to
mtx_destroy an uninitialized mutex, and panic.
- Destroy core_lock in netmap_detach, mirroring init in netmap_attach.
- Also comment out the knlist_destroy for now as there is currently no
knlist_init.
Sponsored by: ADARA Networks
Reviewed by: luigi@
Notes:
svn path=/head/; revision=239149
|
| |
|
|
| |
Notes:
svn path=/head/; revision=239141
|
| |
|
|
| |
Notes:
svn path=/head/; revision=239140
|
| |
|
|
|
|
|
|
| |
Unfortunately the original drivers still have a lot of
sign conversion/comparison warnings.
Notes:
svn path=/head/; revision=238985
|
| |
|
|
|
|
|
|
| |
rename linux functions to avoid confusion;
fix error reporting on linux
Notes:
svn path=/head/; revision=238982
|
| |
|
|
| |
Notes:
svn path=/head/; revision=238937
|
| |
|
|
|
|
|
| |
- more portable annotations for unused arguments;
Notes:
svn path=/head/; revision=238912
|
| |
|
|
|
|
|
|
| |
merge in the remaining part of the linux-specific glue so i do not need
to maintain two different distributions.
Notes:
svn path=/head/; revision=238837
|
| |
|
|
| |
Notes:
svn path=/head/; revision=238831
|
| |
|
|
| |
Notes:
svn path=/head/; revision=238818
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
has been MFC'ed.
Notes:
svn path=/head/; revision=235562
|