[OPNFLWPLUG-592] tunnel-ipv4-source maps to nw_src instead of tun_src while writing flow onto OVS Created: 12/Jan/16  Updated: 27/Sep/21  Resolved: 12/Dec/17

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

Type: Bug
Reporter: Savan Doshi Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: All


Attachments: PNG File tunnel_ipv4_bug.png    
External issue ID: 4937

 Description   

While trying to write a flow on OVS from ODL with the body shown below. The flow is added successfully but the field "tunnel-ipv4-source" got mapped to "nw_src" in OVS instead of "tun_src".

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="urn:opendaylight:flow:inventory">
<hard-timeout>0</hard-timeout>
<idle-timeout>0</idle-timeout>
<priority>150</priority>
<flow-name>flow1</flow-name>
<match>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
<tunnel-ipv4-source>10.2.1.1/32</tunnel-ipv4-source>
<tunnel>
<tunnel-id>5555</tunnel-id>
</tunnel>
</match>
<id>1</id>
<table_id>0</table_id>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<output-action>
<output-node-connector>1</output-node-connector>
</output-action>
<order>0</order>
</action>
</apply-actions>
</instruction>
</instructions>
</flow>

Response from OVS dump-flows for the above flow is shown below :

cookie=0x0, duration=3.237s, table=0, n_packets=0, n_bytes=0, idle_age=3, priority=150, ip,tun_id=0x15b3,nw_src=10.2.1.1 actions=output:1

Why tun_src does not appear on OVS flow, instead it gets mapped to nw_src?

Whereas when the flow is added using ovs-ofctl add flows cmd, the parameter tun_src getting correctly mapped.

cookie=0x0, duration=3.237s, table=0, n_packets=0, n_bytes=0, idle_age=3, priority=150, tun_id=0x15b3, tun_src=10.2.1.1 actions=output:1



 Comments   
Comment by Savan Doshi [ 13/Jan/16 ]

Attached screenshot of possible bug.
In MatchConvertorImpl.java file tunnel-ipv4-source is mapped to Ipv4SrcCaseBuilder instead of TunnelIpv4MatchBuilder.

Comment by Savan Doshi [ 13/Jan/16 ]

Attachment tunnel_ipv4_bug.png has been added with description: Attached source code of bug

Comment by Suvitha Balu [ 13/May/16 ]

The tunnel source/destination IP fields are introduced in Open vSwitch 2.5.

tun_src=ip[/netmask]
tun_dst=ip[/netmask]

So the corresponding changes needs to be done on Yang model.
The yang model "openflow-extensible-match.yang" updated with till 1.3, so we need to update the new field which is supported on openflow latest version.

Comment by Suvitha Balu [ 13/May/16 ]

This bug need fix from openflowJava and openflowplugin module.

Comment by Suvitha Balu [ 17/May/16 ]

Following are my fix proposal and looking for input if any issue.

1. The Field tun-src is not in the yang model which is defined for openflow base class. So i have updated the “ opendaylight-match-types.yang “ model. After building the yang file, the required builder class are also generated.
Also added corresponding serializer and deserializer for new field (tun-ser, tun-dst).

Review on yang and corresponding file in openflowjava module:
https://git.opendaylight.org/gerrit/#/c/38954/

2. On the actula fix, we need to change the field from Ipv4Src to TunSrc and Ipv4Dst to TunDst in MatchConvertorImpl .java.

Review on MatchConvertorImpl.java in openflowplugin module:
https://git.opendaylight.org/gerrit/#/c/38955/

Comment by Suvitha Balu [ 19/May/16 ]

As per Michal Polkorab comments, this fix on hold.

Review comments:
can you please provide reference for the tun_src and tun_dst
fields
in openflow specification ?
>
Hi, I have found in below link for openvswitch link
http://openvswitch.org/support/dist-docs/ovs-ofctl.8.txt
>
This looks like openvswitch specific field (or openflow 1.4+
specific). In that case this needs to be located in a custom bundle
/ project and use the extension framework as openflowjava provides
only structures defined in specification OF v1.0 & OF v1.3
>
Thanks Michal. I will check it.

Comment by Anil Vishnoi [ 12/Dec/17 ]

No activity on the bug for a while. Please re-open the bug if you hit this issue with carbon/nitrogen/oxygen branch.

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