History log of /freebsd-13.1/sys/dev/netmap/netmap.c (Results 51 – 75 of 108)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 89cc2556 06-Jun-2014 Luigi Rizzo <[email protected]>

align comments with the ones in our development trunk


# 441ab64f 06-Jun-2014 Luigi Rizzo <[email protected]>

prevent a panic when the netdev/ifp is not set in attach
(internal c63a7b85)

MFC after: 3 days


# dc8a95e6 06-Jun-2014 Andrey Zonov <[email protected]>

Use mtx_lock_spin/mtx_unlock_spin primitives on spin lock

Reviewed by: luigi
MFC after: 1 week


# 43ed1d3c 05-Jun-2014 Luigi Rizzo <[email protected]>

whitespace change: remove trailing whitespace


# 89e3fd52 18-Feb-2014 Luigi Rizzo <[email protected]>

two small changes:
- intercept FIONBIO and FIOASYNC ioctls on netmap file descriptors.
libpcap calls them to set non blocking I/O on the file descriptor,
for netmap this is a no-op because there

two small changes:
- intercept FIONBIO and FIOASYNC ioctls on netmap file descriptors.
libpcap calls them to set non blocking I/O on the file descriptor,
for netmap this is a no-op because there is no read/write,
but not intercepting would cause fcntl() to return -1
- rate limit and put under netmap.verbose some messages that occur
when threads use concurrently the same file descriptor.

show more ...


# f0ea3689 15-Feb-2014 Luigi Rizzo <[email protected]>

This new version of netmap brings you the following:

- netmap pipes, providing bidirectional blocking I/O while moving
100+ Mpps between processes using shared memory channels
(no mistake: over

This new version of netmap brings you the following:

- netmap pipes, providing bidirectional blocking I/O while moving
100+ Mpps between processes using shared memory channels
(no mistake: over one hundred million. But mind you, i said
*moving* not *processing*);

- kqueue support (BHyVe needs it);

- improved user library. Just the interface name lets you select a NIC,
host port, VALE switch port, netmap pipe, and individual queues.
The upcoming netmap-enabled libpcap will use this feature.

- optional extra buffers associated to netmap ports, for applications
that need to buffer data yet don't want to make copies.

- segmentation offloading for the VALE switch, useful between VMs.

and a number of bug fixes and performance improvements.

My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial
amount of work on these features so we owe them a big thanks.

There are some external repositories that can be of interest:

https://code.google.com/p/netmap
our public repository for netmap/VALE code, including
linux versions and other stuff that does not belong here,
such as python bindings.

https://code.google.com/p/netmap-libpcap
a clone of the libpcap repository with netmap support.
With this any libpcap client has access to most netmap
feature with no recompilation. E.g. tcpdump can filter
packets at 10-15 Mpps.

https://code.google.com/p/netmap-ipfw
a userspace version of ipfw+dummynet which uses netmap
to send/receive packets. Speed is up in the 7-10 Mpps
range per core for simple rulesets.

Both netmap-libpcap and netmap-ipfw will be merged upstream at some
point, but while this happens it is useful to have access to them.

And yes, this code will be merged soon. It is infinitely better
than the version currently in 10 and 9.

MFC after: 3 days

show more ...


Revision tags: release/10.0.0
# f2637526 16-Jan-2014 Luigi Rizzo <[email protected]>

netmap_user.h:
add separate rx/tx ring indexes
add ring specifier in nm_open device name

netmap.c, netmap_vale.c
more consistent errno numbers

netmap_generic.c
correctly handle failure

netmap_user.h:
add separate rx/tx ring indexes
add ring specifier in nm_open device name

netmap.c, netmap_vale.c
more consistent errno numbers

netmap_generic.c
correctly handle failure in registering interfaces.

tools/tools/netmap/
massive cleanup of the example programs
(a lot of common code is now in netmap_user.h.)

nm_util.[ch] are going away soon.
pcap.c will also go when i commit the native netmap support for libpcap.

show more ...


# 339f59c0 09-Jan-2014 Gleb Smirnoff <[email protected]>

Fix build with VIMAGE.


# fb25194f 07-Jan-2014 Luigi Rizzo <[email protected]>

fix use after free when releasing a netmap adapter.

Submitted by: Giuseppe Lettieri


# 17885a7b 06-Jan-2014 Luigi Rizzo <[email protected]>

It is 2014 and we have a new version of netmap.
Most relevant features:

- netmap emulation on any NIC, even those without native netmap support.

On the ixgbe we have measured about 4Mpps/core/que

It is 2014 and we have a new version of netmap.
Most relevant features:

- netmap emulation on any NIC, even those without native netmap support.

On the ixgbe we have measured about 4Mpps/core/queue in this mode,
which is still a lot more than with sockets/bpf.

- seamless interconnection of VALE switch, NICs and host stack.

If you disable accelerations on your NIC (say em0)

ifconfig em0 -txcsum -txcsum

you can use the VALE switch to connect the NIC and the host stack:

vale-ctl -h valeXX:em0

allowing sharing the NIC with other netmap clients.

- THE USER API HAS SLIGHTLY CHANGED (head/cur/tail pointers
instead of pointers/count as before). This was unavoidable to support,
in the future, multiple threads operating on the same rings.
Netmap clients require very small source code changes to compile again.
On the plus side, the new API should be easier to understand
and the internals are a lot simpler.

The manual page has been updated extensively to reflect the current
features and give some examples.

This is the result of work of several people including Giuseppe Lettieri,
Vincenzo Maffione, Michio Honda and myself, and has been financially
supported by EU projects CHANGE and OPENLAB, from NetApp University
Research Fund, NEC, and of course the Universita` di Pisa.

show more ...


# 256d9417 18-Dec-2013 Gleb Smirnoff <[email protected]>

Fix build.


# f9790aeb 15-Dec-2013 Luigi Rizzo <[email protected]>

split netmap code according to functions:
- netmap.c base code
- netmap_freebsd.c FreeBSD-specific code
- netmap_generic.c emulate netmap over standard drivers
- netmap_mbq.c simple mbuf tailq
- ne

split netmap code according to functions:
- netmap.c base code
- netmap_freebsd.c FreeBSD-specific code
- netmap_generic.c emulate netmap over standard drivers
- netmap_mbq.c simple mbuf tailq
- netmap_mem2.c memory management
- netmap_vale.c VALE switch

simplify devce-specific code

show more ...


# 5864b3a5 06-Nov-2013 Luigi Rizzo <[email protected]>

remove a debugging message


# bc4c07d8 05-Nov-2013 Luigi Rizzo <[email protected]>

remove some test code.


# 954dca4c 05-Nov-2013 Luigi Rizzo <[email protected]>

fix a bug when a device has 1 tx (or rx) queue and more than
one queue of a different type.

Submitted by: Vincenzo Maffione
MFC after: 3 days


# 5ab0d24d 05-Nov-2013 Luigi Rizzo <[email protected]>

check errors on return from netmap_attach()

Submitted by: Giuseppe Lettieri
MFC after: 3 days


# 3d819cb6 02-Nov-2013 Luigi Rizzo <[email protected]>

circumvent a couple of warnings:
- on line 2550 intentionally overriding a const qualifier
- on line 3219 intentionally converting uint64_t to a pointer


# ce3ee1e7 01-Nov-2013 Luigi Rizzo <[email protected]>

update to the latest netmap snapshot.
This includes the following:
- use separate memory regions for VALE ports
- locking fixes
- some simplifications in the NIC-specific routines
- performance impro

update to the latest netmap snapshot.
This includes the following:
- use separate memory regions for VALE ports
- locking fixes
- some simplifications in the NIC-specific routines
- performance improvements for the VALE switch
- some new features in the pkt-gen test program
- documentation updates

There are small API changes that require programs to be recompiled
(NETMAP_API has been bumped so you will detect old binaries at runtime).

In particular:
- struct netmap_slot now is 16 bytes to support an extra pointer,
which may save one data copy when using VALE ports or VMs;
- the struct netmap_if has two extra fields;

MFC after: 3 days

show more ...


# 76039bc8 26-Oct-2013 Gleb Smirnoff <[email protected]>

The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit po

The r48589 promised to remove implicit inclusion of if_var.h soon. Prepare
to this event, adding if_var.h to files that do need it. Also, include
all includes that now are included due to implicit pollution via if_var.h

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

show more ...


Revision tags: release/9.2.0
# 85233a7d 05-Jun-2013 Luigi Rizzo <[email protected]>

- fix a bug in the previous commit that was dropping the last packet
from each batch flowing on the VALE switch

- feature: add glue for 'indirect' buffers on the sender side:
if a slot has NS_IN

- fix a bug in the previous commit that was dropping the last packet
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.

show more ...


Revision tags: release/8.4.0
# f18be576 30-May-2013 Luigi Rizzo <[email protected]>

Bring in a number of new features, mostly implemented by Michio Honda:

- the VALE switch now support up to 254 destinations per switch,
unicast or broadcast (multicast goes to all ports).

- we ca

Bring in a number of new features, mostly implemented by Michio Honda:

- 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.

show more ...


# 654ae8d6 02-May-2013 Luigi Rizzo <[email protected]>

remove trailing whitespace


# 849bec0e 30-Apr-2013 Luigi Rizzo <[email protected]>

Partial cleanup in preparation for upcoming changes:

- 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

Partial cleanup in preparation for upcoming changes:

- 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

show more ...


# d4b42e08 29-Apr-2013 Luigi Rizzo <[email protected]>

whitespace changes:
remove $Id$ lines, and add blank lines around some #if / #elif /#endif


# 2579e2d7 19-Apr-2013 Luigi Rizzo <[email protected]>

mostly whitespace changes:
- remove vestiges of the old memory allocator
- clean up some comments


12345