Александр Черников: Использование netmap
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

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

  • 2,351 views
Uploaded on

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

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

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,351
On Slideshare
1,025
From Embeds
1,326
Number of Embeds
6

Actions

Shares
Downloads
7
Comments
0
Likes
1

Embeds 1,326

http://tech.yandex.ru 1,123
https://tech.yandex.ru 124
http://tech.yandex.com 73
https://tech.yandex.com 4
http://admin-com.tech.yandex-team.ru 1
http://translate.googleusercontent.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Using netmap Alexander Chernikov Network Engineer
  • 2. What is netmap?
  • 3. 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
  • 4. Similar tools • Intel DPDK – WindRiver INP • PacketShader I/O engine • PF_RING 5
  • 5. Key Features • User-space • Zero-copy • Batching • Simplicity • Hardware independent 6
  • 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
  • 7. Using NIC rings for balancing • Thread-per-ring model • Process-per-ring model 8
  • 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)
  • 9. Existing open-source users • Pkt-gen • libpcap consumers • Ipfw • Click router • Sandstorm web server 10
  • 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
  • 11. Users: libpcap consumers • /usr/src/tools/tools/netmap/ • Transparent • s/lpcap/lnetmap/ • Improvements in 'easy' packet processing 12
  • 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
  • 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
  • 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
  • 15. Alexander Chernikov Network Engineer melifaro@yandex-team.ru Thank you