<?xml version="1.0" encoding="US-ASCII"?>
<!-- This template is for creating an Internet Draft using xml2rfc, which is available here: http://xml.resource.org. -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [

<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC793 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.0793.xml">
<!ENTITY RFC2460 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2460.xml">
<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">

]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt'?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), please see ttp://xml.resource.org/authoring/README.html. -->
<?rfc strict="yes"?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->

<rfc category="std" docName="draft-cheng-sdn-switchtest-00" ipr="trust200902">

<!-- category values: std, bcp, info, exp, and historic ipr values: trust200902, noModificationTrust200902, noDerivativesTrust200902, or pre5378Trust200902 you can add the attributes updates="NNNN" and obsoletes="NNNN" they will automatically be output with "(if approved)" -->


  <!-- ***** FRONT MATTER ***** -->
  <front>
  <!-- The abbreviated title is used in the page header - it is only necessary if the full title is longer than 39 characters -->

    <title abbrev="SDN Switch Benchmark Test Cases">    
    SDN Switch Benchmark Test Cases Summary
    </title>

    <author fullname="Mike Cheng" initials="M." surname="Cheng">
      <organization>BII Group Holdings Ltd.</organization>
      <address>
        <postal>
          <street></street>
          <city>Beijing</city>
          <region></region>
          <code></code>
          <country>P. R. China</country>
        </postal>
        <email>mikecheng@biigroup.com</email>
      </address>
    </author>

    <author fullname="Yaming Bao" initials="Y." surname="Bao">
      <organization>BII Group Holdings Ltd.</organization>
      <address>
        <postal>
          <street></street>
          <city>Beijing</city>
          <region></region>
          <code></code>
          <country>P. R. China</country>
        </postal>
        <email>ymbao@biigroup.cn</email>
      </address>
    </author>    
    <date year="2016"/>

    <!-- Meta-data Declarations -->
    <area>Internet</area>
    <keyword>SDN Switch Benchmark Test Cases</keyword>


<abstract>
<t>
This document summarized the test cases for SDN switches, and introduced the test methodologies for each case of them.
</t>
</abstract>


  </front>

  <!-- ***** MIDDLE MATTER ***** -->

  <middle>


<section anchor="s1" title="Introduction">

<t>
This document listed 11 test cases for SDN switch.
</t>

</section>


<section anchor="s2" title="Test Cases">

<section anchor="s2.1" title="Case1">

<t>Test Case Name:Flow entry installing time</t>
<t>Test Purpose:Measure how much time does the switch under test test to valid a flow entry.</t>

<t>Test Methodology:</t>
<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Add a flow entry to table 0 with a match field of TCP five-tuple and an action OFPAT_OUTPUT to an output port</t>
<t>4. Wait enough time(e.g. 5 seconds) for switch to valid the flow entry</t>
<t>5. Send a matched TCP packet to the data plane, record this time as Tt</t>
<t>6. Receive the packet at the output port, record this time as Tr</t>
<t>7. The result time Tresult = Tr - Tt</t>
<t>8. Iterate this test by a pre-configured number(less than the known maximum flow entry number) of flow entries installed already or the maximum number of flow entries</t>
</section>

<section anchor="s2.2" title="Case2">

<t>Test Case Name:Flow table look up time</t>
<t>Test Purpose:Measure how much time does the switch under test take to look up flow table for a matched packet</t>

<t>Test Methodology:</t>
<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Add a flow entry to table 0 with a match field of TCP five-tuple and an action OFPAT_OUTPUT to an output port </t>
<t>4. Wait enough time(e.g. 5 seconds) for switch to valid the flow entry</t>
<t>5. Send a matched TCP packet to the data plane, record this time as Tt</t>
<t>6. Receive the packet at the output port, record this time as Tr</t>
<t>7. The result time Tresult = Tr - Tt</t>
<t>8. Iterate this test by a pre-configured number(less than the known maximum flow entry number) of flow entries installed already or the maximum number of flow entries</t>
</section>

<section anchor="s2.3" title="Case3">

<t>Test Case Name:Packet in message performance of table-miss</t>
<t>Test Purpose:Measures the time sending packet_in message after a table-miss flow entry is triggered</t>

<t>Test Methodology:</t>
<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of the switch under test</t>
<t>3. Add a table-miss flow entry matching all wildcards, and a default action OFPAT_OUTPUT to port OFPP_CONTROLLER</t>
<t>4. Wait enough time(e.g. 5 seconds) for switch to valid the flow entry</t>
<t>5. Send a packet to data plane, record this time as Tt</t>
<t>6. Receive Packet_in messages and record this time as Tr</t>
<t>7. The result time Tresult = Tr - Tt</t>
<t>8. Iterate this test with different datapath packet throughput</t>
</section>

<section anchor="s2.4" title="Case4">

<t>Test Case Name:Packet in message performance of none table-miss</t>
<t>Test Purpose:Measures the time sending packet_in message after a normal flow entry is triggered</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. remove all flow entries of switch</t>
<t>3. add a flow entry to table 0 with matching  in_port and an action OFPAT_OUTPUT to port OFPP_CONTROLLER</t>
<t>4. Wait enough time(e.g. 5 seconds) for switch to valid the flow entry</t>
<t>5. send a packet to the matched data plane port, record this time as Tt</t>
<t>6. receive Packet_in messages and record this time as Tr</t>
<t>7. The result time Tresult = Tr - Tt</t>
<t>8. Iterate this test with different datapath packet throughput</t>
</section>

<section anchor="s2.5" title="Case5">

<t>Test Case Name:Flow entry deleting time</t>
<t>Test Purpose:Measure how much time does the switch under test take to delete a flow entry.</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Add a flow entry to table 0 with a match field of TCP five-tuple and an action OFPAT_OUTPUT to an output port</t>
<t>4. Keep sending TCP packets to dataplane ingress port</t>
<t>5. Wait enough time(e.g. 3 seconds) for switch until packets are forwarded to the output port</t>
<t>6. Send a flow delete message, delete all flow entries, record this time as Tt</t>
<t>7. wait until no packets received at the output port, record the time of the last one received packet as Tr</t>
<t>8. The result time Tresult = Tr - Tt</t>
<t>9. Iterate this test for 100 flow entries and 1000 flow entries installed already or the maximum number(if it is less than 1000) of flow entries</t>
</section>

<section anchor="s2.6" title="Case6">

<t>Test Case Name:Flow entry modifing time</t>
<t>Test Purpose:Measure how much time does the switch under test take to modify a flow entry.</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Add a flow entry to table 0 with a match field of TCP five-tuple and an action OFPAT_OUTPUT to an output port</t>
<t>4. Keep sending TCP packets to dataplane ingress port</t>
<t>5. Wait enough time(e.g. 3 seconds) for switch until packets are forwarded to the output port</t>
<t>6. Send a flow modify message, output the packets to another port, record this time as Tt</t>
<t>7. wait until packets received at the ohter output port, record the time of the first received packet as Tr</t>
<t>8. The result time Tresult = Tr - Tt</t>
<t>9. Iterate this test for 100 flow entries and 1000 flow entries installed already or the maximum number(if it is less than 1000) of flow entries</t>
</section>

<section anchor="s2.7" title="Case7">

<t>Test Case Name:Table capacity</t>
<t>Test Purpose:Measure the maximum number of flow entries of a certain table of a switch</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Send an empty body ofp_multipart_request with type OFPMP_TABLE_FEATURES, to get the maximum flow entries of a specified table</t>
<t>4. Keep sending flow_add messages with different priorities,  actions can be an output action to an output port</t>
<t>5. Wait until ofp_error_msg is received, with type OFPET_FLOW_MOD_FAILED, and error code OFPFMFC_TABLE_FULL</t>
<t>6. Record the number of flow entries sent before the ofp_error_msg is triggered as the test result</t>
</section>

<section anchor="s2.8" title="Case8">

<t>Test Case Name:Packet out message throughput/latency time</t>
<t>Test Purpose:Measure the Packet_out message processing throughput and latency of the switch under test</t>

<t>Test Methodology:</t>
<t>1. Setup connection between switch under test and test tool</t>
<t>2. Send packet_out messages with a certain length of packet in its data field and action OFPAT_OUTPUT to an output port of the switch under test, record the time as Tt</t>
<t>3. Receive the packet contains in the data field, record the time as Tr</t>
<t>4. The result Tresult = Tr - Tt</t>
<t>5. Iterate this test for different Packet_out throughput and data length</t>
</section>

<section anchor="s2.9" title="Case9">

<t>Test Case Name:Flow entry multipart_reply message test</t>
<t>Test Purpose:Measure flow statistics update time of a switch</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Add a flow entry to table 0 with a match field of TCP five-tuple and an action OFPAT_OUTPUT to an output port</t>
<t>4. Keep sending an OFPT_MULTIPART_REQUEST message with type of OFPMP_FLOW to request statistics of the flow added in step 3</t>
<t>5. Send a packet matches the flow added in step 3 to switch from dataplane, record the time as Tt</t>
<t>6. Wait enough time(e.g. 3 seconds) for switch until flow statistics are updated, record the time as Tr</t>
<t>7. The result Tresult = Tr - Tt</t>
<t>8. Iterate this test for different flows</t>
</section>

<section anchor="s2.10" title="Case10">

<t>Test Case Name:Port multipart_reply message test</t>
<t>Test Purpose:Measure port statistics update time of a switch</t>

<t>Test Methodology:</t>

<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Send an OFPT_MULTIPART_REQUEST message with type of OFPMP_PORT_STATS to request statistics of one port, record the rx_packets and rx_bytes</t>
<t>4. Keep sending the OFPT_MULTIPART_REQUEST message of step 3.</t>
<t>5. Send a packet to switch from dataplane, record the time as Tt</t>
<t>6. Wait enough time(e.g. 3 seconds) for switch until port statistics are updated, record the time as Tr</t>
<t>7. The result Tresult = Tr - Tt</t>
<t>8. Iterate this test for sending different amount and kind of packets to switch</t>
</section>

<section anchor="s2.11" title="Case11">

<t>Test Case Name:Idle time out timer performance test</t>
<t>Test Purpose:Test the accuracy of idle timeout of flow entries</t>

<t>Test Methodology:</t>
<t>1. Setup connection between switch under test and test tool</t>
<t>2. Remove all flow entries of switch</t>
<t>3. Install a flow entry with idle timeout 5s and set the OFPFF_SEND_FLOW_REM flag</t>
<t>4. Send a matching packet to ingress port within idle timeout and record the time as Ts</t>
<t>5. Wait until the switch send an OFP_FLOW_REMOVED message to the test tool, record the time as Te</t>
<t>6. The result time, Tresult = Te - Ts</t>
<t>7. Compare Tresult with the hard timeout(5s), the error percentage equals (Tresult - 5s)/5s * 100%</t>
<t>8. Iterate this test with different number of installed flow entries</t>

</section>

</section>

<section anchor="s3" title="Acknowledgements">

<t>Funding for the RFC Editor function is currently provided by BII Group. </t>
</section>

</middle>


<!-- ***** BACK MATTER ***** -->

<back>

</back>
</rfc>


