1 / 15

IXP Lab 2012: Part 2

IXP Lab 2012: Part 2. Example Functions. Outline. Demo-1 : Packet Counter – 1ME Version Demo-2 : Packet Counter – n MEs Version Demo-3 : Packet Size Counter DIY-1 : Multiple Port Packet Counter Demo-4 : IP Lookup – Linear Search Version

Download Presentation

IXP Lab 2012: Part 2

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. IXP Lab 2012: Part 2 Example Functions

  2. 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

  3. Demo 1Packet 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

  4. Demo 2Packet 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

  5. Demo 3Packet Size Counter (1/2) • The usage of packet counter and packet size counter • The meta-data of the packet

  6. Demo 3Packet 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

  7. DIY 1Multiple 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

  8. Demo 4IP Lookup - Linear Search Version (1/4) • Given a routing table with 4 entries • Suppose we have four packet with specific destination address field

  9. Demo 4IP 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 0x40065080)

  10. Demo 4IP Lookup - Linear Search Version (3/4) • The code to obtain the needed header fields • The Code of get an routing table entry

  11. Demo 4IP Lookup - Linear Search Version (4/4) • The Code of Longest Prefix Matching (LPM) • Used pre-generated traffic to demo the functional

  12. Demo 5Packet 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)

  13. Demo 5Packet Classification- Linear Search Version (2/3) • Suppose we have seven packets with follows header fields • A simple data structure to store a rule

  14. Demo 5Packet Classification- Linear Search Version (3/3) • Result rule table:

  15. DIY 2Flow 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.

More Related