[OPNFLWPLUG-21] Only the first programmed flow in a Table shown in the /operational store for the Table Created: 12/Jan/14  Updated: 27/Sep/21  Due: 20/Jan/14  Resolved: 18/Jan/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jan Medved Assignee: Prasanna Huddar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: Macintosh


External issue ID: 285
Priority: High

 Description   

Only the first programmed flow is reported in the /operational store for a Table.

For example, use Table 2 and the following 2 flows:

Flow 135:
PUT http://192.168.4.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/135

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<flow-name>FooXf20</flow-name>
<id>135</id>
<cookie_mask>255</cookie_mask>
<cookie>20</cookie>
<table_id>2</table_id>
<priority>2</priority>
<hard-timeout>1200</hard-timeout>
<idle-timeout>3400</idle-timeout>
<installHw>false</installHw>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-nw-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<match>
<metadata>
<metadata>12345</metadata>
</metadata>
</match>
</flow>

Flow 2:
PUT http://192.168.4.1:8080/restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/2/flow/140

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<strict>false</strict>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<order>0</order>
<dec-mpls-ttl/>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>0</table_id>
<id>140</id>
<cookie_mask>10</cookie_mask>
<installHw>false</installHw>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<ipv4-destination>10.0.0.1/24</ipv4-destination>
</match>
<hard-timeout>1200</hard-timeout>
<cookie>10</cookie>
<idle-timeout>3400</idle-timeout>
<flow-name>FooXf14</flow-name>
<priority>2</priority>
<barrier>false</barrier>
</flow>

1. Program the first flow.

2. Get the oper data for Table 2:

GET http://192.168.4.1:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/2

{
"flow-node-inventory:table": [
{
"opendaylight-flow-statistics:aggregate-flow-statistics":

{ "opendaylight-flow-statistics:byte-count": 0, "opendaylight-flow-statistics:packet-count": 0, "opendaylight-flow-statistics:flow-count": 1 }

,
"flow-node-inventory:id": 2,
"opendaylight-flow-table-statistics:flow-table-statistics":

{ "opendaylight-flow-table-statistics:packets-looked-up": 0, "opendaylight-flow-table-statistics:packets-matched": 0, "opendaylight-flow-table-statistics:active-flows": 1 }

,
"flow-node-inventory:flow": [
{
"flow-node-inventory:id": 135,
"opendaylight-flow-statistics:flow-statistics": {
"opendaylight-flow-statistics:flags": "SEND_FLOW_REM",
"opendaylight-flow-statistics:match": {
"opendaylight-flow-statistics:metadata":

{ "opendaylight-flow-statistics:metadata": 12345 }

},
"opendaylight-flow-statistics:table_id": 2,
"opendaylight-flow-statistics:duration":

{ "opendaylight-flow-statistics:nanosecond": 802000000, "opendaylight-flow-statistics:second": 4 }

,
"opendaylight-flow-statistics:cookie": 20,
"opendaylight-flow-statistics:packet-count": 0,
"opendaylight-flow-statistics:priority": 2,
"opendaylight-flow-statistics:byte-count": 0,
"opendaylight-flow-statistics:hard-timeout": 1200,
"opendaylight-flow-statistics:idle-timeout": 3400,
"opendaylight-flow-statistics:instructions": {}
}
}
]
}
]
}

The stats show that there is one flow.

3. Program the second flow

4. Get operational data for Table 2 (Repeat Step 2)

Stats still show only one flow, and only one flow is shown in the Table's list of flows.



 Comments   
Comment by Michal Polkorab [ 16/Jan/14 ]

Hello,

this issue was caused mainly by a bug in the Openflow Library - library was deserializing only one flowStats structure in the flowStats body instead of deserializing an array of flowStats structures.
Fix is here: https://git.opendaylight.org/gerrit/#/c/4269/

Please test and close this bug.

Regards
Michal Polkorab

Comment by Jan Medved [ 18/Jan/14 ]

Restested, and behavior does not occur anymore.

Comment by Jan Medved [ 18/Jan/14 ]

Restested, and behavior does not occur anymore.

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