1 / 48

Network Processor and Its Applications

Network Processor and Its Applications. Yan Luo yluo@cs.ucr.edu Chris Baron cbaron@cs.ucr.edu. Outline. Overview of the network processors The NP market IXP2400/2800 High Performance Networking with IXP Initial Design To-do list. What the Internet Needs?. ASIC (large,

kirra
Download Presentation

Network Processor and Its Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Processor and Its Applications Yan Luo yluo@cs.ucr.edu Chris Baron cbaron@cs.ucr.edu Network Processor & Its Applications

  2. Outline • Overview of the network processors • The NP market • IXP2400/2800 • High Performance Networking with IXP • Initial Design • To-do list Network Processor & Its Applications

  3. What the Internet Needs? ASIC (large, expensive to develop, not flexible) Increasing Huge Amount of Packets & Routing, Packet Classification, Encryption, QoS, New Applications and Protocols, etc….. • High processing power • Support wire speed • Programmable • Scalable • Specially for network applications • … General Purpose RISC (not capable enough) Network Processor & Its Applications

  4. Net Processor Market Share by Revenues 2003 share 2002 share AMCC 39% 38% Intel 16 11 IBM 13 19 Motorola 12 15 Vitesse 11 8 Agere 6 9 EZchip 2 < 1 Source: The Linley Group NP market Network Processor & Its Applications

  5. SDRAM (Packet buffer) SRAM (control structures) Bus Bus Output ports Input ports multi-threaded processing elements Co-processor Network Processor Typical NP Architecture Network Processor & Its Applications

  6. Some commercial NP products Wait, see Tilman Wolf’s slides Network Processor & Its Applications

  7. Intel IXP2400 See another file Network Processor & Its Applications

  8. Cluster Architecture • Myrinet/Quadrics/etc. provide their own protocol (much simpler than TCP/IP) • Limited to LAN • Cost (Ethernet is cheap and standard) • Future networks require high-speeds Network Processor & Its Applications

  9. System Architecture Pentium DRAM 850E PCI ` I21555 PCI bridge PCI Unit ME XScale ME SDRAM 256MB SRAM 8MB ENP2611 Network Processor & Its Applications

  10. Memory Spaces • Virtual memory • Physical memory • PCI space memory • Primary side • Secondary side • Bridge translates from one side to the other Network Processor & Its Applications

  11. Memory Mapping Network Processor & Its Applications

  12. PCI Configuration Network Processor & Its Applications

  13. Bridge Configuration • Host->IXP2400 setup at boot time 00000000-0009ffff : System RAM 000a0000-000bffff : Video RAM area 000c0000-000c7fff : Video ROM 000f0000-000fffff : System ROM 00100000-1ff76fff : System RAM 00100000-0027588a : Kernel code 0027588b-002d90ff : Kernel data 1ff77000-1ff78fff : ACPI Non-volatile Storage 1ff79000-1fffffff : reserved 81882000-82882000 : Bigphysarea d0000000-efffffff : PCI Bus #02 d0000000-dfffffff : PCI device 8086:b555 (Intel Corp.) eff00000-efffffff : PCI device 8086:b555 (Intel Corp.) f0000000-f7ffffff : Intel Corp. 82850 850 (Tehama) Chipset Host Bridge (MCH) f8000000-fbffffff : PCI Bus #01 f8000000-fbffffff : ATI Technologies Inc Rage 128 Pro TF fec00000-fec0ffff : reserved fee00000-fee0ffff : reserved ff600000-ff7fffff : PCI Bus #02 ff6fec00-ff6fec7f : 3Com Corporation 3c905C-TX [Fast Etherlink] ff6ff000-ff6fffff : PCI device 8086:b555 (Intel Corp.) ff800000-ff9fffff : PCI Bus #01 ff8fc000-ff8fffff : ATI Technologies Inc Rage 128 Pro TF ffb00000-ffffffff : reserved Network Processor & Its Applications

  14. What does the device driver(s) need to do? • Identify Device • Pci_table[] contains vendorid, deviceid, etc. • Identify Device Resources • pci_resource_start(dev, i) • pci_resource_end(dev, i) • Primary side maps secondary registers and SDRAM • Secondary side maps host’s SDRAM (mempool) • Request Device Resources • request_mem_region(start, end) Network Processor & Its Applications

  15. What does the device driver(s) need to do? • Allocate Device Resources • ioremap(start_phys, size) • make_proc_entry(start_virt, size) • Allocate Host Resources • bigphysarea_alloc_pages(size) Network Processor & Its Applications

  16. Bridge Configuration • Direct Address Translation (DAT) • Stick in figure here • Alert secondary side off required offset (since the mempool may not start on a perfect boundary) • Lookup Table (LUT) • Bridge has 64 entries in the LUT • Each entry is configurable up to 32MB Network Processor & Its Applications

  17. Bridge Configuration • Input address divided into three parts: • Bit 31: base address • Bits 30-25: lookup table index (2^6 = 64) • Bits 24-0: offset (2^25 = 32MB) • Highest 7 bits of LUT entry indexed by bits 30-25 of input address, concatenated with bits 24-0 of input address • This is where we are having problems… Network Processor & Its Applications

  18. Host->IXP2400 Transfer • DMA or PIO? • PIO provides zero-copy through remap_page_range() • DMA requires an ioctl() call • Copying data • Standard memcpy() (8-bits) • Memcpy32() (32-bits) • memcpy(64() (64-bits using MMX registers) • Utilizing write-combining Network Processor & Its Applications

  19. IXP2400->Host Transfer • DMA or PIO? • DMA is required • Give both channels to microengines • Prefers 64-byte data transfers Network Processor & Its Applications

  20. DMA Descriptor Network Processor & Its Applications

  21. M-VIA Network Processor & Its Applications

  22. Basic Theory of Operation • Polling • Host application places data into secondary SDRAM region • Host application alerts secondary of data being placed and it’s location through mailbox register • Host application polls receive mailbox register until it is updated by secondary side Network Processor & Its Applications

  23. Basic Theory of Operation • Interrupt • Secondary must poll • Secondary triggers interrupt on host side to alert host of new data • When do you interrupt (how often)? • Who provides the network interface? • Speed • Security Network Processor & Its Applications

  24. Network Processor & Its Applications

  25. END Network Processor & Its Applications

  26. Network Architecture and Applications • Introduction to networking • IP packet structure • Control and data planes • Traditional applications • IPv4 routing, classification etc. • New applications • URL-based switching,transcoding, etc. Network Processor & Its Applications

  27. B Network Network A DATA 7 Application AH DATA Application 7 6 Pre. Pre. 6 PH DATA 5 Session SH DATA Session 5 4 Transport TH DATA Transport 4 3 Network NH DATA Network 3 2 Data Link DH DATA Data Link 2 1 Physical PH DATA Physical 1 OSI Network Architecture Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  28. OSI TCP/IP 7 Application Application 6 Pre. 5 Session 4 Transport TCP 3 Network IP 2 Data Link Host-to-Net 1 Physical TCP/IP Model • ISO OSI (Open Systems Interconnection) not fully implemented • Presentation and Session layers not present in TCP/IP Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  29. MAC IP TCP APP. DATA MAC Source Port Destination Port Sequence Number Acknowledgement Number Header Length and Options Window Size Checksum Urgent Pointer Options (0 or more 32-bit words) TCP/IP packet Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  30. MAC IP TCP APP. DATA MAC Ver. IHL Service Type Total Length Identification Options and Fragment Offset Time to Live Protocol Header Checksum Source Address Destination Address Options (0 or more 32-bit words) TCP/IP packet Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  31. Preamble D. Add. S. Add. Leng. CRC TCP/IP packet MAC IP TCP APP. DATA MAC Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  32. Application Categorization • Control-Plane tasks • Less time-critical • Control and management of device operation • Table maintenance, port states, etc. • Data-Plane tasks • Operations occurring real-time on “packet path” • Core device operations • Receive, process and transmit packets Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  33. Policy Applications Network Management Control Plane Signaling Topology Management Queuing / Scheduling Data Transformation Data Plane Classification Data Parsing Media Access Control Physical Layer Processing Tasks Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  34. Data Plane Tasks • Media Access Control • Low-level protocol implementation • Ethernet, SONET framing, ATM cell processing, etc. • Data Parsing • Parsing cell or packet headers for address or protocol information • Classification • Identify packet against a criteria (filtering / forwarding decision, QoS, accounting, etc.) • Data Transformation • Transformation of packet data between protocols • Traffic Management • Queuing, scheduling and policing packet data Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  35. Network Processor Applications • Routing table lookup • Determine the next hop for incoming packets • Packet Classification • classify packets using header fields against a set of rules • URL-based Switching • Distribute HTTP requests based on URLs. • Transcoding • Encryption/Decryption, intrusion detection, firewall, access control checking, denial-of-service Network Processor & Its Applications

  36. IPv4 Routing • Routers determine next hop and forward packets P P P B A Router C Network Processor & Its Applications

  37. Trie-based Routing Table Lookup • Trie block keeps pointers to route entry and other trie blocks • Destination IP address bits are examined group by group (4-bit) rt_ptr trie_ptr 0 Trie block Next hop 3 Next hop 4 15 Next hop 1 Next hop 2 Network Processor & Its Applications

  38. Example rt_ptr trie_ptr 0 Next hop 3 Next hop 4 15 Next hop 1 Next hop 2 Packet destination IP address =0x13fe2233 (0001,0011,1111,1110,…) Network Processor & Its Applications

  39. Encoding prefixes as ranges 1* -> [100000,111111] 101* -> [101000,101111] 10101* -> [101010,101011] 1 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 101011 101110 111110 L L L H H L L,H H H Narrowest enclosing Range containing A A IP Lookups using Multi-way Multi-column Search Illustration of the idea with 6-bit address Prefixes: 1* 101 * 10101* 1 0 0 0 0 0 1 0 1 0 0 0 1 0 1 0 1 0 101011 101110 111110 Binary search does not work with variable length strings. • end up far away from the matching prefix • Multiple addresses that match to different prefix, end up in the same region Network Processor & Its Applications

  40. 3-way tree for 8 keys P1: 1* -> [100000,111111] P2: 101* -> [101000,101111] P3: 10101* -> [101010,101011] k3 k6 Any region in the binary search between two consecutive numbers corresponds to a unique prefix k1 k2 k4 k5 k7 k8 > = p1) 1 0 0 0 0 0 p1 p1 p2) 1 0 1 0 0 0 p2 p2 p3) 1 0 1 0 1 0 p3 p3 1 0 1 0 1 1p2p3 1 0 1 1 1 1p1p2 1 1 1 1 1 1 - p1 info info info info info info info info info Multi-column search is used for wide address such as IPv6 W/M words A C E A D C A M W B M W B N X B N Y Probe 1 2 3 Multi-way multi-column search Network Processor & Its Applications

  41. Packet Classification • Routers are required to distinguish packets for • Flow identification • Fair sharing of bandwidth • QoS • Security • Accounting, billing • etc • Packets are classified by rules • Src IP, Dest IP, src port #, dest port # etc • Classification Algorithm Metrics • Search speed • Storage cost • Scalability • Updates • Etc. Network Processor & Its Applications

  42. Classification: Hierarchical tries • Extension of the one dimensional radix trie • Construct trie recursively: • Contruct F1-trie on the set of prefix {Rj1} • For each prefix p in F1-trie, we recursively construct (d-1) dimensional hierarchical trie on rules where {Rj:Rj1=p} Pankaj Gupta and Nick McKeown,"Algorithms for Packet Classification", IEEE Network Special Issue, March/April 2001, vol. 15, no. 2, pp 24-32. Network Processor & Its Applications

  43. Classification: Bitmap-intersection The set of rules S that a packet matches is the intersection of d sets, Si Where Si is the set of rules that match the packet in the i-th dimension alone. 0 0 Pankaj Gupta and Nick McKeown,"Algorithms for Packet Classification", IEEE Network Special Issue, March/April 2001, vol. 15, no. 2, pp 24-32. Network Processor & Its Applications

  44. URL-based switching • Increase efficiency • Tasks • Traverse the packet data (request) for each arriving packet and classify it: • Contains ‘.jpg’ -> to image server • Contains ‘cgi-bin/’ -> to application server www.yahoo.com Internet Image Server IP TCP APP. DATA Application Server Switch GET /cgi-bin/form HTTP/1.1 Host: www.yahoo.com… HTML Server Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  45. Corporate Network Mpeg encoder Video-on-demand server Transcoder Internet Media Player Transcoders • Two important requirements • If the receiver is not capable of interpreting the stored data (multimedia transcoders) • wireless receivers, hand-held devices, etc. • Compression for bandwidth and storage efficiency Source: Network Processor Tutorial in Micro 34 - Mangione-Smith & Memik Network Processor & Its Applications

  46. Summary • NP is developing very fast and is a hot research area • Multithreaded NP Architectures provide tremendous packet processing capability • NP can be applied in various network layers and applications • Traditional apps – forwarding, classification • Advanced apps – transcoding, URL-based switching, security etc. • New apps Network Processor & Its Applications

  47. Reference • Pankaj Gupta and Nick McKeown,"Algorithms for Packet Classification", IEEE Network Special Issue, March/April 2001, vol. 15, no. 2, pp 24-32. • Bill Mangione-Smith, Gokhan Memik, Network Processing: Applications, Architectures and Examples – Tutorial at Micro 34, Dec. 2001 • B. Lampson, V. Srinivasan and G. Varghese, IP Lookups using Multiway and Multicolumn Search, IEEE/ACM Transactions on Networking, August 1, 1997 • Intel IXP1200 Network Processor Family - Development Tools User's Guide, Intel Network Processor & Its Applications

  48. Why are Network Processors useful? • Flexible but fast • Heat dissipation • Opteron 248 2.2Ghz CPU with 1GB RAM and 10Gb/s Ethernet Card • CPU maxed out at ~5Gb/s • With TOE, achieved 7.4 Gb/s (PCI-X limit) with < 50% of CPU utilization Network Processor & Its Applications

More Related