当前位置:网站首页>Pisces: a programmable, protocol independent software switch (summary)

Pisces: a programmable, protocol independent software switch (summary)

2022-06-23 19:07:00 Bachuan Xiaoxiaosheng

PISCES: A Programmable, Protocol-Independent Software Switch

Importance

The virtual machine monitor uses a software switch to guide packets in and out of the virtual machine . These switches often need to be upgraded and customized , To support new protocol headers or encapsulation for tunneling and coverage , To improve the measurement and commissioning functions , Even add functions similar to intermediate devices . Software switches are usually based on a lot of code , Including kernel code , Changing switches is a daunting task , Need to be proficient in the design and development of network protocols 、 test , And maintaining a large and complex code base . Changing the way software switches forward packets does not require an in-depth understanding of the current situation . contrary , It should be possible to specify how to use high-level domain specific languages (DSL)( Such as P4) Process and forward packets , And compile it to run on the software switch . The assessment shows that ,PISCES Performance and OVS Quite a ,PISCES The length of the program is about OVS Source code 1/40.

Challenge

How to realize and optimize

programme

The forwarding behavior of software switch is specified in domain specific language . This example is based on Open vSwitch (OVS) Software switches , Use P4 Domain specific language . Implementation of protocol independent software switches .
The benefits of the scheme are :

  • Add a new standard or private protocol header : Data center owners can compile and deploy new protocols faster
  • Delete the standard protocol header : Deleting unused protocols is as simple as deleting unused parts of the protocol specification and recompiling the switch source code
  • Better visualization : Can quickly modify forwarding and monitoring logic , It can reduce the time of diagnosing and repairing network faults .
  • New functions can be added : Users and network owners can modify forwarding behavior , Will improve their network faster .
    This example is right OVS Improved
  • Arbitrary encapsulation and unpacking :OVS I won't support it P4 Any encapsulation and de encapsulation that the program may need . So two new primitives are added , Encapsulation and de encapsulation .
  • Conditions based on header field comparison :OpenFlow Only the bitwise equality test of header field is directly supported . stay OVS Added direct support for unequal relationships , In the form of conditional operation .
  • General checksum verification / to update :OVS Only incremental checksum is supported , But in order to support the use of checksums in the way programmers want , The incremental verification is optimized .
    And this example optimizes the back-end of the compiler :
  • Inline editor / Pipeline editing : The optimizer analyzes the intermediate representation , To determine how many times a package may need to be modified in the pipeline . If the value is below a certain threshold , Then the optimizer performs inline editing ; otherwise , It will perform post pipeline editing .
  • Motion optimization : Use optimizations such as dead code elimination to identify and eliminate redundancy in setup operations
  • Incremental checksum : By using high-level programs to describe ( Such as P4) To represent the checksum operation , Programmers can provide the compiler with the necessary context information , So as to realize checksum more effectively
  • Parser optimization : Specifying forwarding behavior in a high-level language can provide the compiler with information that can be used to optimize the parser .
  • Action merge : Through analysis P4 Control flow and matching operation processing in the program , The compiler can find out which fields have actually been modified , And can generate an effective 、 A single operation to update these fields directly .
  • Cache field modification : Through automatic generation operation P4 Specific arithmetic operations required by the program , Avoid matching and setting when possible
  • Assign in stages : Enhanced P4 Language , Enables the user to annotate each header file with a phase number

opinion

Designed and implemented the first one to allow in advanced DSL A software switch that customizes the protocol specification without directly modifying the switch source code . The average ratio is equivalent to OVS The source code is about 40 times , And forwarding performance ( Throughput ) The cost is only 2% about . Prove that in the virtual machine monitor switch , The cost of programmability is negligible , The research results can inspire the design of new protocol independent software switches .

原网站

版权声明
本文为[Bachuan Xiaoxiaosheng]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206231737022585.html