[SFC-201] pus_nsh action is not working for sal-flow:update-flow method Created: 05/Sep/17  Updated: 04/Jul/18

Status: Open
Project: sfc
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug Priority: High
Reporter: Beerappa SM Assignee: Beerappa SM
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: Other


External issue ID: 9106
Priority: High

 Description   

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.



 Comments   
Comment by Beerappa SM [ 11/Sep/17 ]

This issue observed for learn action as well.
Any comments from group will be helpful.

Comment by OpenDaylight Release [ 03/May/18 ]

Since the bug is unassigned I'm currently assigning it to you.

Please assign to the relevant person. 

Generated at Wed Feb 07 20:38:54 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.