This series does a number of things, things to improve performance. These fixes
are needed before updating to ODP v1.0, to make it worthwile trying it.
1. replacing spinlocks with ticketlocks in pktio to improve performance
2. a small bug fix that would cause a crash when no data was available
3. update to netmap v11.1; very handy to work with newer kernels
4. some formatting changes, renaming nm_desc to desc to match netmap API
5. getting rid of old ioctl code that was performing worse than poll with tmo 0
6. blocking poll caused a botleneck in odp_l2fwd because the receiving thread
also sends the data out, but it needs to lock_entry at pktio level with the
other receiving thread; making poll unblocking fixes this problem
7. odp_netmap_init_global needed for early initialization of a global lock
8. single mmap addr needed when multiple threads access a pktio (odp_schedule)
9. keeping a list of netmap interfaces is needed if more than one thread open a
pktio on the same interface; this will be revised in ODP at some point but
until then we need this list to store per-interface locks (patch 11)
10. netmap API provides nm_dispatch and nm_inject which make the code cleaner
11. add proper locking needed when multiple threads access the same interface
(right now only through different pktios on the same interface). When
locking at the pktio level will be removed these locks will be essential for
correct synchronization
12. polling only when the rings are empty reduces the number of system calls and
gives slightly better performance
The end result is that odp-netmap can now achieve 1GBs line rate l2 forwarding
with odp_l2fwd, for now only with burst mode with two interfaces and two cores.
The tests setup was the same as with the ovs one, netmap pkt-gen, 64 byte pkts.
For 1Gbs, the practical limit is about 1.38 Mpps which odp_l2fwd 2 cores in
burst mode can now achieve.
The odp_l2fwd will try to open more than one pktio for each interface if the
number of cores is greater than the number of interfaces. This gives worse
performance than with i.e 2 interfaces and 2 cores burst mode, because of extra
locking.
With queue mode the odp_l2fwd can reach about 700 kpps with 4 cores on 2
interfaces and if the pktio level locking is removed the performance goes to
about 1 Mpps.
Ciprian Barbu (12):
linux-netmap: pktio: use ticketlock to send and recv packets
linux-netmap: pktio: fix invalid ring crash
linux-netmap: update to netmap_v11.1
linux-netmap: pktio: cosmetic changes
linux-netmap: pktio: remove unused ioctl code
linux-netmap: pktio: set POLL_TMO to 0 to poll without blocking
linux-netmap: add odp_netmap_init_global
linux-netmap: pktio: use single mmap address for all pktios
linux-netmap: pktio: keep track of opened netmap interfaces
linux-netmap: pktio: refactor packet I/O using existing APIs
linux-netmap: pktio: add per device RX and TX locks
linux-netmap: pktio: poll only when needed
platform/linux-netmap/Makefile.am | 4 +-
platform/linux-netmap/README | 76 +++--
platform/linux-netmap/include/odp_internal.h | 51 +++
.../linux-netmap/include/odp_packet_io_internal.h | 4 +-
platform/linux-netmap/include/odp_packet_netmap.h | 29 +-
platform/linux-netmap/odp_init.c | 96 ++++++
platform/linux-netmap/odp_packet_io.c | 8 +-
platform/linux-netmap/odp_packet_netmap.c | 351 ++++++++++-----------
8 files changed, 389 insertions(+), 230 deletions(-)
create mode 100644 platform/linux-netmap/include/odp_internal.h
create mode 100644 platform/linux-netmap/odp_init.c
--
1.8.3.2
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp