Uploaded image for project: 'sfc'
  1. sfc
  2. SFC-201

pus_nsh action is not working for sal-flow:update-flow method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • unspecified
    • General
    • None
    • Operating System: Linux
      Platform: Other

    • 9106
    • High

      1. First add the SFC classifier rule with push_nsh and set nsp, nsi fields using http://x.x.x.x:8181/restconf/operations/sal-flow:add-flow

      XML file contents:
      ========================
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <input xmlns="urn:opendaylight:flow:service">
      <barrier>false</barrier>
      <node xmlns:inv="urn:opendaylight:inventory">/inv:nodes/inv:node[inv:id="openflow:6"]</node>

      <installHw>false</installHw>

      <match>
      <ethernet-match>
      <ethernet-type>
      <type>2048</type>
      </ethernet-type>
      </ethernet-match>

      <ipv4-source>5.6.6.7/32</ipv4-source>
      </match>

      <instructions>
      <instruction>
      <order>0</order>
      <apply-actions>

      <action>
      <order>0</order>
      <nx-push-nsh xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
      </nx-push-nsh>
      </action>

      <action>
      <order>1</order>
      <nx-reg-load xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
      <value>3</value>
      <dst>
      <nx-nsi-dst xmlns="urn:opendaylight:openflowplugin:extension:nicira:action"/>
      <start>0</start>
      <end>7</end>
      </dst>
      </nx-reg-load>
      </action>

      <action>
      <order>2</order>
      <nx-reg-load xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
      <value>10</value>
      <dst>
      <nx-nsp-dst xmlns="urn:opendaylight:openflowplugin:extension:nicira:action"/>
      <start>0</start>
      <end>31</end>
      </dst>
      </nx-reg-load>
      </action>
      </apply-actions>
      </instruction>

      <instruction>
      <order>1</order>
      <go-to-table>
      <table_id>10</table_id>
      </go-to-table>

      </instruction>
      </instructions>

      <strict>false</strict>
      <table_id>5</table_id>
      </input>

      2. dump the flows:
      cookie=0x0, duration=0s, table=5, n_packets=0, n_bytes=0, priority=32768,ip,nw_src=5.6.6.7 actions=push_nsh,set_field:3->nsi,set_field:0xa->nsp,goto_table:10

      3. Now update the this flow with different NSP and NSI using below update-flow method.
      http://172.24.12.217:8181/restconf/operations/sal-flow:update-flow

      xml file :contents
      ====================
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <input xmlns="urn:opendaylight:flow:service">
      <node xmlns:inv="urn:opendaylight:inventory">/inv:nodes/inv:node[inv:id="openflow:6"]</node>

      <original-flow>

      <match>

      <extension-list xmlns="urn:opendaylight:openflowplugin:extension:general">
      <extension-key xmlns:x="urn:opendaylight:openflowplugin:extension:nicira:match">x:nxm-nx-nsp-key</extension-key>
      <extension>
      <nxm-nx-nsp xmlns="urn:opendaylight:openflowplugin:extension:nicira:match">
      <value>10</value>
      </nxm-nx-nsp>
      </extension>
      </extension-list>

      <extension-list xmlns="urn:opendaylight:openflowplugin:extension:general">
      <extension-key xmlns:x="urn:opendaylight:openflowplugin:extension:nicira:match">x:nxm-nx-nsi-key</extension-key>
      <extension>
      <nxm-nx-nsi xmlns="urn:opendaylight:openflowplugin:extension:nicira:match">
      <nsi>3</nsi>
      </nxm-nx-nsi>
      </extension>
      </extension-list>

      </match>
      <instructions/>
      <table_id>10</table_id>
      </original-flow>

      <updated-flow>
      <match>

      <extension-list xmlns="urn:opendaylight:openflowplugin:extension:general">
      <extension-key xmlns:x="urn:opendaylight:openflowplugin:extension:nicira:match">x:nxm-nx-nsp-key</extension-key>
      <extension>
      <nxm-nx-nsp xmlns="urn:opendaylight:openflowplugin:extension:nicira:match">
      <value>10</value>
      </nxm-nx-nsp>
      </extension>
      </extension-list>

      <extension-list xmlns="urn:opendaylight:openflowplugin:extension:general">
      <extension-key xmlns:x="urn:opendaylight:openflowplugin:extension:nicira:match">x:nxm-nx-nsi-key</extension-key>
      <extension>
      <nxm-nx-nsi xmlns="urn:opendaylight:openflowplugin:extension:nicira:match">
      <nsi>3</nsi>
      </nxm-nx-nsi>
      </extension>
      </extension-list>

      </match>
      <instructions>
      <instruction>
      <order>0</order>

      <write-metadata>
      <metadata>200</metadata>
      <metadata-mask>0xffff</metadata-mask>
      </write-metadata>

      </instruction>
      <instruction>
      <order>1</order>

      <go-to-table>
      <table_id>15</table_id>
      </go-to-table>

      </instruction>
      </instructions>
      <strict>false</strict>
      <table_id>10</table_id>
      </updated-flow>
      </input>

      4. ODL is throwing the error:
      Failed to process interface org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.update.flow.input.updated.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionPushNshRpcUpdateFlowUpdatedApplyActionsCase for version 4

      even though flow get added, dump flows does not shows the push_nsh action:
      cookie=0x0, duration=0s, table=5, n_packets=0, n_bytes=0, priority=32768,ip,nw_src=5.6.6.7 actions=set_field:3->nsi,set_field:0x28->nsp,goto_table:10

      5.Is this behavior expected one?
      Please correct me if the steps are wrong.

      NOTE:Same behavior is for the pop_nsh action.

            beerappa11@gmail.com Beerappa SM
            beerappa11@gmail.com Beerappa SM
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: