[OPNFLWPLUG-822] Stats collection matching fails if in-port used without device name prefix Created: 11/Nov/16  Updated: 27/Sep/21  Resolved: 08/Jun/17

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

Type: Bug
Reporter: Anil Vishnoi Assignee: Anil Vishnoi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 7158

 Description   

If we use in-port, without device name e.f in-port=1, rather then in-port=openflow:1:1, stats collection matching fails and it augment the flow under the alien id. Here is the example flow.

{
"id": "flow1",
"table_id": 0,
"hard-timeout": 0,
"priority": 30400,
"idle-timeout": 0,
"instructions": {
"instruction": [
{
"order": 0,
"apply-actions": {
"action": [
{
"order": 1,
"set-field": {
"protocol-match-fields":

{ "mpls-label": 324001 }

}
}
]
}
},
{
"order": 1,
"go-to-table":

{ "table_id": 1 }

}
]
},
"match": {
"in-port": "1",
"ethernet-match": {
"ethernet-type":

{ "type": 2054 }

}
},
"cookie": 23232335
}



 Comments   
Comment by Tomas Slusny [ 15/Dec/16 ]

I also noticed this issue when I was working on serializers and deserializers. I think solution will be to not use device name in in-port and in-phy-port fields at all, and just use port number, because when serializing, this part about device is removed, and only port number is serialized, and when deserializing, we are manually prepending "openflow:" + current node datapath id + incoming port number to it back, so it makes no sense at all.

Comment by Tomas Slusny [ 16/Dec/16 ]

Maybe solution will be to change NodeConnnectorId with PortNumberUni? Or just keep NodeConnectorId in models, and just keep using only port number in these fields. Because, when deserializing, then in this new deserializers I am working on, I have no way to get current datapath id, so I cannot prepend openflow: + datapathId back to port number.

Comment by Tomas Slusny [ 22/Feb/17 ]

This bug was fixed in patch https://git.opendaylight.org/gerrit/#/c/50965/ by adding custom comparator for port numbers. I think this can be closed now.

Comment by Anil Vishnoi [ 28/Feb/17 ]

cherry-picked it to stable/boron : https://git.opendaylight.org/gerrit/#/c/52407/

Comment by Tomas Slusny [ 08/Jun/17 ]

So, all patches was megred, so this one can be closed

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