• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Александр Черников: Использование netmap
 

Александр Черников: Использование netmap

on

  • 1,966 views

Про netmap наверняка слышал каждый, кто отслеживает новости, связанные с FreeBSD. В докладе рассмотрим, чем хорош ...

Про netmap наверняка слышал каждый, кто отслеживает новости, связанные с FreeBSD. В докладе рассмотрим, чем хорош netmap, что уже сделано на его основе, а что только планируется сделать.

Statistics

Views

Total Views
1,966
Views on SlideShare
751
Embed Views
1,215

Actions

Likes
1
Downloads
6
Comments
0

6 Embeds 1,215

http://tech.yandex.ru 1123
http://tech.yandex.com 73
https://tech.yandex.ru 16
http://admin-com.tech.yandex-team.ru 1
http://translate.googleusercontent.com 1
https://tech.yandex.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Александр Черников: Использование netmap Александр Черников: Использование netmap Presentation Transcript

    • Using netmap Alexander Chernikov Network Engineer
    • What is netmap?
    • What is Netmap? • All-in-one solution? No. – Part of framework to build solutions? Yes. • Efficient Instrument for I/O • Other instruments needed – – – – 4 Memory allocator (like UMA in userspace) Packet chaining libraries (handling fragments) Lockless queues Flow inspection primitives
    • Similar tools • Intel DPDK – WindRiver INP • PacketShader I/O engine • PF_RING 5
    • Key Features • User-space • Zero-copy • Batching • Simplicity • Hardware independent 6
    • Programming simplicity • Get NIC info – ioctl(fd, NIOCGINFO, &nmr) • Open HW queue (or entire NIC) – ioctl(fd, NIOCREGIF, &tifreq) • Mmap ring memory – mmap(0, mmap_size, .., fd, 0); • Go! – select() / poll() on fd 7
    • Using NIC rings for balancing • Thread-per-ring model • Process-per-ring model 8
    • Framework simplicity • Targets to different NICs • ~400 lines per driver – Not many places for bugs to hide – Complicated drivers code (not related to nemap) • Currently supported – – – – 9 if_em(4) igb(4) ixgbe(4) re(4)
    • Existing open-source users • Pkt-gen • libpcap consumers • Ipfw • Click router • Sandstorm web server 10
    • Users: pkt-gen • /usr/src/tools/tools/netmap/ • Linerate sending/receiving data • Src/Dst address wildcards • Features – MAC rewriting – IP src/dst wildcards – PCAP replay • Note – Check flow control ( dev.ix.*.fc ) – Check older NICs ( Intel 82598 ) 11
    • Users: libpcap consumers • /usr/src/tools/tools/netmap/ • Transparent • s/lpcap/lnetmap/ • Improvements in 'easy' packet processing 12
    • Users: ipfw • 20120813 version • On-going work to ease kernel/userland sync • Pros – Batching • Cons – Not all features work (iface matching, fwd, etc..) 13
    • Users: Sandstorm • All-in-one app – ethernet library – libtcpip as light-weight TCP stack – libmnio as netmap i/o abstraction • Arch – – – – optimizied for specific task small number of components ability to do easy cross-layering (mostly) lockless scheme • Features – Very high throughput for small files 14
    • Future: routing • /usr/ports/net/netmap_router • Near to zero configuration • Existing utilities to control interfaces/routing • Kernel for control plane • Netmap appliance for data plane • Modified routing daemon for route export 15
    • Alexander Chernikov Network Engineer melifaro@yandex-team.ru Thank you