redundant logic elimination in network functions
play

Redundant Logic Elimination in Network Functions Bangwen Deng 1 , - PowerPoint PPT Presentation

Redundant Logic Elimination in Network Functions Bangwen Deng 1 , Wenfei Wu 1 , Linhai Song 2 1: Tsinghua University 2: The Pennsylvania State University Network Functions: Critical components in network Growing impact: Various network


  1. Redundant Logic Elimination in Network Functions Bangwen Deng 1 , Wenfei Wu 1 , Linhai Song 2 1: Tsinghua University 2: The Pennsylvania State University

  2. Network Functions: Critical components in network • Growing impact: • Various network scenarios • Diverse functions (e.g. , Firewall, NAT, IDS, Load Balancer) • NF’s efficiency in flow processing is critical: • Affects network’s end-to-end performance in a significant way (e.g., latency accumulation, throughput bottleneck )

  3. Network Functions: Critical components in network • Mismatch of the protocol space in the development and that in the deployment leads to redundant logic: • Covering a large protocol space in development • Configuring a subspace of the entire protocol space in deployment Whole Protocol Space

  4. Network Functions: Critical components in network • Mismatch of the protocol space in the development and that in the deployment leads to redundant logic: • Covering a large protocol space in development • Configuring a subspace of the entire protocol space in deployment Rules: Whole Protocol Space drop tcp 10.0.0.0/24 any −> 10.1.0.0/24 any …… …… Subspace

  5. Network Functions: Critical components in network • Mismatch of the protocol space in the development and that in the deployment leads to redundant logic: • Covering a large protocol space in development • Configuring a subspace of the entire protocol space in deployment Goal: To use compiler techniques to optimize away the redundancy.

  6. Outline • Introduction • Design Intuition • NFReducer Implementation • Preliminary Evaluation • Conclusion

  7. Snort IDS Code(Simplified)

  8. Snort IDS Code(Simplified) Parsing

  9. Snort IDS Code(Simplified) Parsing Match

  10. Snort IDS Code(Simplified) Action Parsing Match

  11. Type-I Redundancy: Unused layer parsing • Example Action Parsing Match Pkt.IP == Rule.IP IP address (L3) Drop Pkt.Port == Rule.Port Port (L4) Pass

  12. Type-I Redundancy: Unused layer parsing • Example What if only L3 header is used? E.g., <10.0.0.1->*, s/d port=*, drop> Action Parsing Match Pkt.IP == Rule.IP IP address (L3) Drop Pkt.Port == Rule.Port Port (L4) Pass

  13. Type-I Redundancy: Unused layer parsing • Example What if only L3 header is used? E.g., <10.0.0.1->*, s/d port=*, drop> Unused Wildcard Action Parsing Match Pkt.IP == Rule.IP IP address (L3) Drop Pkt.Port == Rule.Port Port (L4) Pass Always True

  14. Type-I Redundancy: Method to Solve • Apply Rules <10.0.0.1->*, s/d port=*, drop> Match Parsing Action Pkt.IP == Rule.IP IP address (L3) Drop Pass Port (L4) Pkt.Port == *

  15. Type-I Redundancy: Method to Solve • Apply Rules • Constant Folding and Propagation <10.0.0.1->*, s/d port=*, drop> Match Parsing Action Pkt.IP == Rule.IP IP address (L3) Drop Pass Port (L4) True

  16. Type-I Redundancy: Method to Solve • Apply Rules • Constant Folding and Propagation • Dead Code Elimination <10.0.0.1->*, s/d port=*, drop> Match Parsing Action Pkt.IP == Rule.IP IP address (L3) Drop Pass Port (L4) Port (L4) True

  17. Type-II Redundancy: Unused Protocol (Branch) Parsing • Branches in Parse and Match If NF processes TCP packets only, E.g., <10.0.0.0/24, tcp, 80, drop> IP Parsing IP Proto==TCP Proto==UDP Proto==TCP Proto==UDP TCP UDP TCP UDP Port==80 Port!=80 Port==* Parsing Parsing pass pass drop Parsing Match

  18. Type-II Redundancy: Unused Protocol (Branch) Parsing • Branches in Parse and Match If NF processes TCP packets only, E.g., <10.0.0.0/24, tcp, 80, drop> True Always False Redundant IP Parsing IP Logic Proto==TCP Proto==UDP Proto==TCP Proto==UDP TCP UDP TCP UDP Port==80 Port!=80 Port==* Parsing Parsing pass pass drop Parsing Match

  19. Type-II Redundancy: Method to Solve • Extract Feasible Execution Path Parse Match IP Parsing IP Proto==TCP Proto==UDP Proto==TCP Proto==UDP TCP UDP TCP UDP Port==80 Port!=80 Port==* Parsing Parsing pass pass drop

  20. Type-II Redundancy: Method to Solve • Extract Feasible Execution Path • Constant Folding and Propagation Parse Match IP Parsing IP Proto==TCP Proto==UDP Proto==TCP False TCP UDP TCP UDP Port==80 Port!=80 Port==* Parsing Parsing pass pass drop

  21. Type-II Redundancy: Method to Solve • Extract Feasible Execution Path • Constant Folding and Propagation • Dead Code Elimination Parse Match IP Parsing IP Proto==TCP Proto==UDP Proto==TCP False Dead Code Dead Code TCP UDP TCP UDP Port==80 Port!=80 Port==* Parsing Parsing pass pass drop

  22. Type-II Redundancy: Method to Solve • Extract Feasible Execution Path • Constant Folding and Propagation • Dead Code Elimination Parse Match IP Parsing IP Proto==TCP Proto==UDP Proto==TCP False TCP TCP Port==80 Port!=80 Parsing pass drop

  23. Type-III Redundancy: Cross-NF Redundancy • If a monitor deployed before an IDS instance who blocks UDP packets, all the parsing and counting for UDP packets in the monitor is redundant. Ingress flows Egress flows Monitor IDS Block UDP packets UDP packets processing is redundant

  24. Type-III Redundancy: Cross-NF Redundancy • If a monitor deployed before an IDS instance who blocks UDP packets, all the parsing and counting for UDP packets in the monitor is redundant. Ingress flows Egress flows Monitor IDS Block UDP packets UDP packets processing is redundant • Method to Solve: • Consolidate • Eliminate type-I and type-II redundancy • Decompose

  25. Outline • Introduction • Design Intuition • NFReducer Implementation • Preliminary Evaluation • Conclusion

  26. NFReducer Architecture • Labeling Critical Variables and Actions The architecture of NFReducer

  27. NFReducer Architecture • Labeling Critical Variables and Actions • Extracting Packet Processing Logic The architecture of NFReducer

  28. NFReducer Architecture • Labeling Critical Variables and Actions • Extracting Packet Processing Logic • Individual NF Optimization The architecture of NFReducer

  29. NFReducer Architecture • Labeling Critical Variables and Actions • Extracting Packet Processing Logic • Individual NF Optimization • Cross-NF Optimization The architecture of NFReducer

  30. NFReducer Architecture • Labeling Critical Variables and Actions • Critical Variables • Packet Variables: Holding the packet raw data. • State Variables: Maintaining the NF states. (e.g., counter) • Config Variables: Maintaining the config info. (e.g., rules) • NF Actions: • External Actions (e.g., replying, forward, drop packets) • Internal Actions (e.g., updating state variables)

  31. NFReducer Architecture • Labeling Critical Variables and Actions • Extracting Packet Processing Logic • Removing functionalities unrelated to packet processing (e.g., log). • Facilitate the compiler techniques applied later (e.g., symbolic execution). Source code Packet Processing Program Slicer Logic Labeled Variables && Actions

  32. NFReducer Architecture Packet Processing Configured Rules Logic Apply Configs & • Labeling Critical Variables and Actions Extract Paths • Extracting Packet Processing Logic … … Path1 Path2 Constant Folding & Propagation • Individual NF Optimization … … • Apply Configs Check path feasibility • Extract Paths … … • Constant Folding and Propagation • Check Path Feasibility Dead Code Elimination & Merge • Dead Code Elimination Optimized Code

  33. NFReducer Architecture NF1 NF2 • Labeling Critical Variables and Actions Consolidate • Extracting Packet Processing Logic Individual NF • Individual NF Optimization Optimization • Cross-NF Optimization Decompose • Preliminary discussion on the optimization of different NF chain execution models. Optimized Optimized NF1 NF2

  34. Implementation LLVM DG Static Slicer

  35. Outline • Introduction • Design Intuition • NFReducer Implementation • Preliminary Evaluation • Conclusion

  36. Evaluation: Eliminating Type-I Redundancy Throughput of Suricata Throughput of Snort • Setting: Configured with layer-3 rules. • Increase by nearly 15% for Snort and by 15% to 10X for Suricata (single thread). • Suricata is more significant • inspects packets deeper in payload than Snort.

  37. Evaluation: Eliminating Type-I Redundancy Throughput of Suricata Throughput of Snort • Setting: Configured with layer-3 rules. • Increase by nearly 15% for Snort and by 15% to 10X for Suricata (single thread). • Suricata is more significant • inspects packets deeper in payload than Snort.

  38. Evaluation: Eliminating Type-I Redundancy Throughput of Suricata Throughput of Snort • Setting: Configured with layer-3 rules. • Increase by nearly 15% for Snort and by 15% to 10X for Suricata (single thread). • Suricata is more significant • inspects packets deeper in payload than Snort.

  39. Evaluation: Eliminating Type-I Redundancy Throughput of Suricata Throughput of Snort • Setting: Configured with layer-3 rules. • Increase by nearly 15% for Snort and by 15% to 10X for Suricata (single thread). • Suricata is more significant • inspects packets deeper in payload than Snort.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend