[CONTROLLER-538] IN_PORT match field disappear in flow entry information when using the new OF plugin Created: 05/Jun/14  Updated: 18/Jun/14  Resolved: 18/Jun/14

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Helium
Fix Version/s: None

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

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks OPNFLWPLUG-110 Milestone: AD-SAL Compatibility adapt... Resolved
External issue ID: 1140

 Description   

When I run VTN Manager with the new OF plugin, I had VTN Manager install flow entries which has a value in IN_PORT match field, and I got information of flow entries using REST API provided by statistics service.
However, I cannot see IN_PORT match field in the response message of the REST API.

[What I used]
The latest version of the Virtualization Edition on 5th June.

$ pwd
/home/odp/work/integration

odc180 $ git log -3 --oneline
90e2f0c INTEGRAT-4: Remove toaster from virt edition
64e608a Adding extra TCs for RESTCONF
3516960 Uploaded working AD-SAL cluster testcases

[How to produce]

1. Start up the Virtualization edition with of13 and vtn option.

$ ./run.sh -of13 -virt vtn

2. Create a virtual bridge using REST API exposed by VTN Manager.

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X POST \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1 \
-d '

{"description": "Virtual Tenat 1"}

'

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X POST \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1/vbridges/vbr1 \
-d '{}'

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X POST \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1/vbridges/vbr1/interfaces/if1 \
-d '{}'

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X POST \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1/vbridges/vbr1/interfaces/if2 \
-d '{}'

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X PUT \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1/vbridges/vbr1/interfaces/if1/portmap \
-d '{"node":

{"type":"MD_SAL","id":"openflow:3"}

, "port": {"name": "s3-eth1"}}'

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X PUT \
http://192.168.60.180:8080/controller/nb/v2/vtn/default/vtns/vtn1/vbridges/vbr1/interfaces/if2/portmap \
-d '{"node":

{"type":"MD_SAL","id":"openflow:7"}

, "port": {"name": "s7-eth2"}}'

3. Run Mininet and run OF1.3 switches.

sudo mn --controller=remote,192.168.60.180 --topo tree,3 --switch=ovsk,protocols=of13

4. Send ping packets from h1 to h8.

mininet> h1 ping h8

5. Check flow entries in mininet.

Confirm that a value is set in "in_port" match field in flow entries.

mininet> dpctl dump-flows -O OpenFlow13

      • s1 ------------------------------------------------------------------------
        OFPST_FLOW reply (OF1.3) (xid=0x2):
        cookie=0x0, duration=7.587s, table=0, n_packets=7, n_bytes=630, send_flow_rem priority=10,in_port=1,vlan_tci=0x0000/0x1fff,dl_src=fe:96:3f:19:78:82,dl_dst=e6:b3:cc:03:9e:37 actions=output:2
        cookie=0x0, duration=7.626s, table=0, n_packets=7, n_bytes=630, send_flow_rem priority=10,in_port=2,vlan_tci=0x0000/0x1fff,dl_src=e6:b3:cc:03:9e:37,dl_dst=fe:96:3f:19:78:82 actions=output:1
        (sinp)

6. Get flow entries using REST API

curl --user "admin":"admin" -H "Accept: application/json" -H \
"Content-type: application/json" -X GET \
http://192.168.60.180:8080/controller/nb/v2/statistics/default/flow/node/MD_SAL/openflow:1

Confirm that the match values of the response doesn't contain "In Port" field.

{
"flowStatistic": [
{
"byteCount": 630,
"durationNanoseconds": 385000000,
"durationSeconds": 45,
"flow": {
"actions": [
{
"port": {
"id": "openflow:1:2",
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

,
"type": "MD_SAL"
},
"type": "OUTPUT"
}
],
"hardTimeout": 0,
"id": 0,
"idleTimeout": 0,
"match": {
"matchField": [

{ "type": "DL_DST", "value": "e6:b3:cc:03:9e:37" }

,

{ "type": "DL_VLAN", "value": "0" }

,

{ "type": "DL_SRC", "value": "fe:96:3f:19:78:82" }

]
},
"priority": 10
},
"packetCount": 7,
"tableId": 0
},
{
"byteCount": 630,
"durationNanoseconds": 424000000,
"durationSeconds": 45,
"flow": {
"actions": [
{
"port": {
"id": "openflow:1:1",
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

,
"type": "MD_SAL"
},
"type": "OUTPUT"
}
],
"hardTimeout": 0,
"id": 0,
"idleTimeout": 0,
"match": {
"matchField": [

{ "type": "DL_DST", "value": "fe:96:3f:19:78:82" }

,

{ "type": "DL_VLAN", "value": "0" }

,

{ "type": "DL_SRC", "value": "e6:b3:cc:03:9e:37" }

]
},
"priority": 10
},
"packetCount": 7,
"tableId": 0
}
],
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

}



 Comments   
Comment by Michal Rehak [ 17/Jun/14 ]

Change pushed:
https://git.opendaylight.org/gerrit/#/c/8079/

Hideyuki, please retest.

Comment by Hideyuki Tai [ 18/Jun/14 ]

(In reply to michal rehak from comment #1)
> Change pushed:
> https://git.opendaylight.org/gerrit/#/c/8079/
>
> Hideyuki, please retest.

Hi Michal,

Thank you for creating the patch.
I've confirmed that your patch fixes the problem.

I pulled the latest code of Integration Git repository, and built the Virtualization Edition on 18th June.
And I applied the change of your patch to the Virtualization edition. (I replaced org.opendaylight.controller.sal-compatibility-1.1-SNAPSHOT.jar.)

After that, I retested the same scenario I written in comment #1.
On the test, I saw IN_PORT match field in the response message.

The following response message was what I saw.

{
"flowStatistic": [
{
"byteCount": 434,
"durationNanoseconds": 221000000,
"durationSeconds": 20,
"flow": {
"actions": [
{
"port": {
"id": "openflow:1:1",
"node":

{ "id": "openflow:1", "type": "MD_SAL" }

,
"type": "MD_SAL"
},
"type": "OUTPUT"
}
],
"hardTimeout": 0,
"id": 0,
"idleTimeout": 0,
"match": {
"matchField": [

{ "type": "IN_PORT", <<<====== IN_PORT match field. "value": "MD_SAL|openflow:1:2@MD_SAL|openflow:1" }

,

{ "type": "DL_SRC", "value": "ce:f4:2e:a7:61:d0" }

,

{ "type": "DL_DST", "value": "d6:2b:3c:5e:bf:0d" }

,

{ "type": "DL_VLAN", "value": "0" }

]
},
"priority": 10
},
"packetCount": 5,
"tableId": 0
},
(snip)

Comment by Michal Rehak [ 18/Jun/14 ]

merged

Generated at Wed Feb 07 19:53:16 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.