Details
-
Bug
-
Status: Resolved
-
Resolution: Done
-
None
-
None
-
None
-
Operating System: Linux
Platform: PC
-
1553
Description
I am install flow to table = 0 of the switch using following restconf uri
but the table number i am using in request flow data is different then the one i am using in the url. I am using table=2 in the flow data.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<barrier>false</barrier>
<cookie>10</cookie>
<cookie_mask>10</cookie_mask>
<flags>SEND_FLOW_REM</flags>
<flow-name>FooXf1</flow-name>
<hard-timeout>0</hard-timeout>
<id>1234</id>
<idle-timeout>0</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
<action>
<order>1</order>
<nx-reg-load xmlns="urn:opendaylight:openflowplugin:extension:nicira:action">
<dst>
<nx-reg xmlns:nxSB="urn:opendaylight:openflowjava:nx:match">nxSB:nxm-nx-reg0</nx-reg>
<start>0</start>
<end>5</end>
</dst>
<value>55</value>
</nx-reg-load>
</action>
</apply-actions>
<order>0</order>
</instruction>
</instructions>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.0.1/24</ipv4-destination>
<extension-list xmlns="urn:opendaylight:openflowplugin:extension:general">
<extension-key xmlns:nxNB="urn:opendaylight:openflowplugin:extension:nicira:match">nxNB:nxm-nx-reg0-key</extension-key>
<extension>
<nxm-nx-reg xmlns="urn:opendaylight:openflowplugin:extension:nicira:match">
<reg xmlns:nxSB="urn:opendaylight:openflowjava:nx:match">nxSB:nxm-nx-reg0</reg>
<value>42</value>
</nxm-nx-reg>
</extension>
</extension-list>
</match>
<priority>2</priority>
<strict>false</strict>
<table_id>2</table_id>
</flow>
This flow get installed successfully to the switch. But in config data store this flow is stored under table 0, but when this flow goes to switch it gets install in the table=2 of the switch. It creates problem for the statistics manager, because when it fetches flow data from the switch, flow data contains table=2, but when it look for the respective flow in the table=2 of the config data store, it doesn't find the flow and it augments the flow in table =2 as a alien flow using specific id, but in reality that flow already exist in the system and present under table=0. This is causing various bugs where user installs the flow, but didn't find the statistics in the operational data store at the respective location.
I used mininet with openflow 1.3+ switch for the testing.
Please let me know if you need any more details to recreate the issue.