Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-15

Modifying a flow is not applying the changes to the switch

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

      Steps to follow,

      1. Add a flow

      PUT http://localhost:8080/controller/nb/v2/flowprogrammer/default/node/MD_SAL/openflow:1/staticFlow/flow109

      <flowConfig>
      <installInHw>true</installInHw>
      <name>flow109</name>
      <node>
      <id>openflow:1</id>
      <type>MD_SAL</type>
      </node>
      <ingressPort>openflow:1:1</ingressPort>
      <priority>5109</priority>
      <etherType>0x800</etherType>
      <nwSrc>9.9.1.2</nwSrc>
      <actions>OUTPUT=openflow:1:1</actions>
      </flowConfig>

      2. Update the flow

      <flowConfig>
      <installInHw>true</installInHw>
      <name>flow109</name>
      <node>
      <id>openflow:1</id>
      <type>MD_SAL</type>
      </node>
      <ingressPort>openflow:1:1</ingressPort>
      <priority>5109</priority>
      <etherType>0x800</etherType>
      <nwSrc>9.9.1.3</nwSrc>
      <actions>OUTPUT=openflow:1:1</actions>
      </flowConfig>

      3. Check with RESTCONF

      http://localhost:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/0/flow/0

      The flow should have been updated

      4. Now check on the switch

      sudo ovs-ofctl -O OpenFlow13 dump-flows s1

      You will see this,

      OFPST_FLOW reply (OF1.3) (xid=0x2):
      cookie=0x0, duration=477.033s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5109,ip,in_port=1,nw_src=9.9.1.2 actions=output:1

      when you expect to see this

      OFPST_FLOW reply (OF1.3) (xid=0x2):
      cookie=0x0, duration=477.033s, table=0, n_packets=0, n_bytes=0, send_flow_rem priority=5109,ip,in_port=1,nw_src=9.9.1.3 actions=output:1

      Note that for this example I used the FlowProgrammer NB API but I would expect to see similar results when using RESTCONF or the CLI to add the flow.

            dbandyop@cisco.com Debolina Bandyopadhyay
            moraja@cisco.com Moiz Raja
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: