IXP Lab 2012: Part 2 Example Functions. Outline Demo-1: Packet Counter – 1ME Version Demo-2: Packet Counter – nMEs Version Demo-3: Packet Size Counter.

Slides:



Advertisements
Similar presentations
IP Router Architectures. Outline Basic IP Router Functionalities IP Router Architectures.
Advertisements

1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Discussion Monday ( ). ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier header checksum time to live.
RIP V1 W.lilakiatsakun.
© 2009 Cisco Systems, Inc. All rights reserved. SWITCH v1.0—4-1 Implementing Inter-VLAN Routing Deploying Multilayer Switching with Cisco Express Forwarding.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) SriramGopinath( )
Lab 4: Simple Router CS144 Lab 4 Screencast May 2, 2008 Ben Nham Based on slides by Clay Collier and Martin Casado.
Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:
EEC-484/584 Computer Networks Lecture 10 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Performance Evaluation of IPv6 Packet Classification with Caching Author: Kai-Yuan Ho, Yaw-Chung Chen Publisher: ChinaCom 2008 Presenter: Chen-Yu Chaug.
ECE 526 – Network Processing Systems Design Packet Processing II: algorithms and data structures Chapter 5: D. E. Comer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 9 Classification And Forwarding. Outline.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP-UDP-RTP Computer Networking (In Chap 3, 4, 7) 건국대학교 인터넷미디어공학부 임 창 훈.
IP Addressing. Dotted Decimal Notation IP addresses are written in a so-called dotted decimal notation Each byte is identified by a decimal number in.
ECE 526 – Network Processing Systems Design Network Processor Architecture and Scalability Chapter 13,14: D. E. Comer.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
LWIP TCP/IP Stack 김백규.
IP Forwarding.
Applied research laboratory David E. Taylor Users Guide: Fast IP Lookup (FIPL) in the FPX Gigabit Kits Workshop 1/2002.
The Saigon CTT Semester 1 CHAPTER 10 Le Chi Trung.
Washington WASHINGTON UNIVERSITY IN ST LOUIS Packet Routing Within MSR Fred Kuhns
Chapter 22 Q and A Victor Norman CS 332 Spring 2014.
ECE 526 – Network Processing Systems Design Packet Processing I: algorithms and data structures Chapter 5: D. E. Comer.
Layer 3: Internet Protocol.  Content IP Address within the IP Header. IP Address Classes. Subnetting and Creating a Subnet. Network Layer and Path Determination.
CUDA - 2.
Networks and Protocols CE Week 7b. Routing an Overview.
StrideBV: Single chip 400G+ packet classification Author: Thilan Ganegedara, Viktor K. Prasanna Publisher: HPSR 2012 Presenter: Chun-Sheng Hsueh Date:
Network Layer4-1 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection”
STORE AND FORWARD & CUT THROUGH FORWARD Switches can use different forwarding techniques— two of these are store-and-forward switching and cut-through.
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
NAT/PAT by S K SATAPATHY
ECE 526 – Network Processing Systems Design Network Address Translator.
Routing. Classless Inter-Domain Routing Classful addressing scheme wasteful – IP address space exhaustion – A class B net allocated enough for 65K hosts.
POSTECH DP&NM Lab Detailed Design Document NetFlow Generator 정승화 DPNM Lab. in Postech.
On-Chip Logic Minimization Roman Lysecky & Frank Vahid* Department of Computer Science and Engineering University of California, Riverside *Also with the.
David M. Zar Block Design Review: PlanetLab Line Card Header Format.
1 IP Routing table compaction and sampling schemes to enhance TCAM cache performance Author: Ruirui Guo, Jose G. Delgado-Frias Publisher: Journal of Systems.
Hierarchical packet classification using a Bloom filter and rule-priority tries Source : Computer Communications Authors : A. G. Alagu Priya 、 Hyesook.
Coping with Link Failures in Centralized Control Plane Architecture Maulik Desai, Thyagarajan Nandagopal.
IP – Subnetting and CIDR
Advanced Computer Networks
Datagram Forwarding.
Multiplexing.
Chapter-5 TCP/IP Suite.
Forwarding and Routing IP Packets
IP Addressing Introductory material.
IP Forwarding Relates to Lab 3.
IP Addressing Introductory material.
EEC-484/584 Computer Networks
Flow Stats Module James Moscola September 6, 2007.
IP Forwarding Relates to Lab 3.
Network Core and QoS.
EEC-484/584 Computer Networks
Code Review for IPv4 Metarouter Header Format
Code Review for IPv4 Metarouter Header Format
IP Addressing Introductory material
Project 2 Fall 04
Network Layer: Control/data plane, addressing, routers
IP Forwarding Relates to Lab 3.
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Network Core and QoS.
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

IXP Lab 2012: Part 2 Example Functions

Outline Demo-1: Packet Counter – 1ME Version Demo-2: Packet Counter – nMEs Version Demo-3: Packet Size Counter DIY-1: Multiple Port Packet Counter Demo-4: IP Lookup – Linear Search Version Demo-5: Packet Classification – Linear Search Version DIY-2: Flow Statistics Counter 2

Demo 1 Packet Counter – 1ME Version Demo how to simulate packet traffic Explain the base project Using “Shared GPR” to implement the counter. Explain the reason of using “shared” GPR – Subset of the real counter value Show that the design is valid – The execution of thread is non-preemptive Demo how to allocate multiple ME to packet processing The result is not correct when multiple ME are used 3

Demo 2 Packet Counter – nMEs Version Code for allocating a scratchpad variable Use Atomic Increment Instruction to implement the counter The result is still correct while multiple ME are used 4 static __declspec(scratch) unsigned int *pkt_count = (__declspec(scratch) unsigned int *)SCR_COUNTER_ADDR; scratch_incr(pkt_count); __intrinsic void scratch_incr( volatile void __declspec(scratch) *address /* address to incr */ ) { INTRINSIC_BEGIN { __asm scratch[incr, --, address, 0] } INTRINSIC_END; }

Demo 3 Packet Size Counter (1/2) The usage of packet counter and packet size counter The meta-data of the packet 5 typedef struct { dl_buf_handle_tdlBufHandle; // lw0 unsigned int buffer_next: 32;// lw1 unsigned intbuffer_size: 16;// lw2 unsigned int offset: 16; unsigned intpacket_size: 16;// lw3 unsigned intfree_list_id: 4; unsigned intrx_stat: 4; unsigned int header_type: 8; unsigned intinput_port: 16;// lw4 unsigned intoutput_port: 16; } ring_data_t3;

Demo 3 Packet Size Counter (2/2) Use Atomic Add Instruction to implement the counter Multiple size of traffic are evaluated (64B, 128B, 256B) Show one of the performance limit of network processor (interface) Demo how to generate own packet traffic The format of STRM traffic is plain-text format 6 scratch_add(&pkt_size, byte_count, ctx_swap, &counter_sig); void scratch_add( declspec(sram_write_reg) unsigned int *data, /* data to add */ volatile void __declspec(scratch) *address, /* address to add */ sync_t sync, /* type of synchronization to use */ SIGNAL *sig_ptr /* signal to raise upon completion */ ) {…}

DIY 1 Multiple Port Packet Counter Modify the above projects to: Generate three kinds of Ethernet-IP-TCP Packet Traffic (Size: 68B, 72B, 76B) (Each traffic has 10 packets) Assign Port 0 to 2 a packet stream (Port 0: 68B, Port 1: 72B, Port 2: 76B) Set Outgoing Port to Incoming Port Plus one Count total size of packet pass through the three ports separately Use the function of the workbench to verify the result 7 Incoming PortOutgoing Port Port 0Port 1 Port 2 Port 0

Demo 4 IP Lookup - Linear Search Version (1/4) Given a routing table with 4 entries Suppose we have four packet with specific destination address field 8 Entry #PrefixPort # /0P0 # /16P1 # /24P2 # /24P2 Packet #Destination AddressMatched Prefix (Entry)Port Packet # /24 (#3)P2 Packet # /16 (#2)P1 Packet # /0 (#1)P0 Packet # /0 (#1)P0

Demo 4 IP Lookup - Linear Search Version (2/4) Discuss the Longest Prefix Matching result Example data structure of a routing table entry Script Format (Assume the base address is 0x ) 9 Prefix (32) Length (16)Port (16) 0x x x x x x8C x C 0x x x8C x x x x8C74F600 0x C 0x

Demo 4 IP Lookup - Linear Search Version (3/4) The code to obtain the needed header fields The Code of get an routing table entry 10 dram_read(&header, (__declspec(dram) unsigned int *) (Dl_BufGetData(rdata.dlBufHandle) + rdata.offset ), 5, sig_done, &sig_get_dram_header_pair); __wait_for_all(&sig_get_dram_header_pair); sram_read(&sram_entry, (__declspec(sram) entry *)(Base_1 + (loop*2*4)), 2, sig_done, &sram_sig_base1); __wait_for_all(&sram_sig_base1);

Demo 4 IP Lookup - Linear Search Version (4/4) The Code of Longest Prefix Matching (LPM) Used pre-generated traffic to demo the functional 11 if( ( sram_entry.length == 0 ) || ( ( sram_entry.prefix >> (32- sram_entry.length) ) == (dip >> (32-sram_entry.length) ) ) ) { if( sram_entry.length >= default_length ) { default_length = sram_entry.length; port_out = sram_entry.port; } Packet #Result Packet #1Send to Port 2 Packet #2Send to Port 1 Packet #3Send to Port 0 Packet #4Send to Port 0

Demo 5 Packet Classification- Linear Search Version (1/3) Given a rule table with 5 rules (R1~R5) SA => Source Address; DA=> Destination Address (Prefix Matching) SP => Source Port; DP => Destination Port; (Range Matching) PO => Protocol (Exact Matching) 12 #SADASPDPPOAction R / / Send to P2 R / / *Send to P1 R / / Send to P0 R / / Send to P2 R / *Send to P3

Demo 5 Packet Classification- Linear Search Version (2/3) Suppose we have seven packets with follows header fields A simple data structure to store a rule 13 #SADASPDPPOResult ? P R1 (P2) P R5 (P3) P R4 (P2) P R2 (P1) P R3 (P0) P R2 (P1) P R1 (P2) SA (32) DA (32) SP Begin (16)SP End (16) DP Begin (16)DP End (16) SA-LEN (8)DA-LEN (8)PO (8)Rule ID (8)

Demo 5 Packet Classification- Linear Search Version (3/3) Result rule table: 14 R1 0x x8C x x8C74521C 0x x0000FFFF 0x C0x x x R2 0x x8C74521C 0x x8C74F600 0x C0x x400650A00x0000FFFF 0x400650A40x R3 0x400650A80x8C x400650AC0x x400650B00x0CF90CF9 0x400650B40x x400650B80x R4 0x400650BC0x x400650C00x8C x400650C40x x400650C80x008B008B 0x400650CC0x R5 0x400650D00x x400650D40x x400650D80x0000FFFF 0x400650DC0x0000FFFF 0x400650E00x

DIY 2 Flow Statistics Counter Flow: Defined as the distinct combination of Source Address, Destination Address, Protocol, Source Port, Destination Port. Flow Statistics Counter: Calculate the number of packets and bytes count for each flows. Goal: 1. Distinguish incoming packets to the different flows. 2. Calculate the number of received packets and received bytes count for each flow. 15