[OPNFLWPLUG-181] Wrong value in DL_VLAN in FLOW_MOD using new OF plugin for OF 1.0 switches. Created: 05/Jun/14  Updated: 27/Sep/21  Resolved: 11/Jun/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
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


External issue ID: 1137

 Description   

Values in DL_VLAN match field of FLOW_MOD messages were wrong, when VTN Manager run on MD-SAL and the new OF plugin, connected to OF 1.0 switches, and tried to install flow entries which match packets without VLAN tag.
In this situation, the controller must set 0xffff (OFP_VLAN_NONE) into the DL_VLAN match field of FLOW_MOD.
However, it set 0x0000, so packets without VLAN tag didn't match the flow entries.

In the same situation, when VTN Manager runs on AD-SAL and the old OF plugin, the value of DL_VLAN is 0xffff (OFP_VLAN_NONE).

[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.0 switches.

$ sudo mn --controller=remote,192.168.60.180 --topo tree,3

4. Send ping packets from h1 to h8.

mininet> h1 ping h8

At this time, VTN Manager tries to install flow entries to forward packets between h1 and h8 based on the vtn configuration (See step 2).



 Comments   
Comment by Hideyuki Tai [ 05/Jun/14 ]

[Additional information]

When VTN Manager wants to install a flow entry to match packets without VLAN tag, VTN Manager sets 0 (DL_VLAN_NONE defined in MatchType class) into DL_VLAN filed of an instance of Match class (org.opendaylight.controller.sal.match.Match).
And after that, FlowConverter class (in org.opendaylight.controller.protocol_plugin.openflow.internal) converts 0 (DL_VLAN_NONE) to 0xffff (OFP_VLAN_NONE) in the case that VTN Manager runs on AD-SAL and the old OF plugin.
Note that DL_VLAN field of an instance of Match class does not accept 0xffff, but only accepts 0 to 0xfff.

Comment by Kamal Rameshan [ 07/Jun/14 ]

Yangtools: https://git.opendaylight.org/gerrit/#/c/7793/

OFPlugin: https://git.opendaylight.org/gerrit/#/c/7794/

7794 is dependent on 7793.

Comment by Kamal Rameshan [ 10/Jun/14 ]

Merged https://git.opendaylight.org/gerrit/#/c/7844/

This change would avoid the range change in yangtools.

Hideyuki, can you please test and see if these changes fixed this issue?
I have been seeing flows getting removed on my VTN setup but not sure if its a setup issue or a bug.
Please test and let me know.
thx

Comment by Hideyuki Tai [ 11/Jun/14 ]

(In reply to Kamal Rameshan from comment #3)
> Merged https://git.opendaylight.org/gerrit/#/c/7844/
>
> This change would avoid the range change in yangtools.
>
> Hideyuki, can you please test and see if these changes fixed this issue?
> I have been seeing flows getting removed on my VTN setup but not sure if its
> a setup issue or a bug.
> Please test and let me know.
> thx

Sure!
I'll test it and see if these changes have fixed this issue today.

Comment by Hideyuki Tai [ 11/Jun/14 ]

(In reply to Hideyuki Tai from comment #4)
> (In reply to Kamal Rameshan from comment #3)
> > Merged https://git.opendaylight.org/gerrit/#/c/7844/
> >
> > This change would avoid the range change in yangtools.
> >
> > Hideyuki, can you please test and see if these changes fixed this issue?
> > I have been seeing flows getting removed on my VTN setup but not sure if its
> > a setup issue or a bug.
> > Please test and let me know.
> > thx
>
> Sure!
> I'll test it and see if these changes have fixed this issue today.

Hi Kamal,

Thank you for fixing it.
I've tested it and confirmed that the issue has been fixed.

For the test, I used the latest version of the Virtualization Edition on 11th June which includes the following patch.
https://git.opendaylight.org/gerrit/#/c/7844/

$ git log -3 --oneline
444f3e9 RESTConf FlowMod Test cases
fa46cc8 Test Case Reorganization part 3
d223e7c Test Case Reorganization Part 2

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