<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:31:31 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[OPNFLWPLUG-82] Flow Entries from Switch and Controller are not same. Might affect Bug375</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-82</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;When I pushed a particular flow entry using &quot;addMDFlow openflow:1 f4&quot; and request the flow using readConfigurationData() API, readOperationalData() API both the Flows are not matching. The fields like Flow id/values, FlowKey, _barrier=false, _cookieMask=10, _flowName=Bar etc. are either malformed or not present. This bug might affect &lt;a href=&quot;https://jira.opendaylight.org/browse/VTN-2&quot; title=&quot;Computation of logical ports names fail when adding more than once ODL controller to VTN Coordinator&quot; class=&quot;issue-link&quot; data-issue-key=&quot;VTN-2&quot;&gt;&lt;del&gt;VTN-2&lt;/del&gt;&lt;/a&gt; as suggested by Michal Rehak.&lt;/p&gt;

&lt;p&gt;I am using latest openflowplugin and OVSK switch with OF1.3&lt;/p&gt;

&lt;p&gt;getAllControllerFlows: tableId= 4&lt;br/&gt;
getAllControllerFlows: flow= Flow [_id=Uri &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=127&amp;#93;&lt;/span&gt;, _key=FlowKey [_id=Uri &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=127&amp;#93;&lt;/span&gt;], _barrier=false, _cookieMask=10, _flags=FlowModFlags &lt;span class=&quot;error&quot;&gt;&amp;#91;_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=true&amp;#93;&lt;/span&gt;, _flowName=Bar, _installHw=false, _instructions=Instructions [_instruction=[Instruction [_key=InstructionKey [], _instruction=ApplyActionsCase [_applyActions=ApplyActions [_action=[Action [_key=ActionKey [], _action=DropActionCase [_dropAction=DropAction [augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], augmentation=[]], augmentation=[]]], augmentation=[]], _match=Match [_ethernetMatch=EthernetMatch [_ethernetDestination=EthernetDestination [_address=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=ff:ff:ff:ff:ff:ff&amp;#93;&lt;/span&gt;, _mask=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=ff:ff:ff:00:00:00&amp;#93;&lt;/span&gt;, augmentation=[]], _ethernetSource=EthernetSource [_address=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=00:00:00:00:23:ae&amp;#93;&lt;/span&gt;, _mask=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=ff:ff:00:00:00:00&amp;#93;&lt;/span&gt;, augmentation=[]], _ethernetType=EthernetType [_type=EtherType &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=2048&amp;#93;&lt;/span&gt;, augmentation=[]], augmentation=[]], augmentation=[]], _strict=false, _cookie=10, _hardTimeout=0, _idleTimeout=0, _priority=2, _tableId=4, augmentation=[]]&lt;/p&gt;

&lt;p&gt;getAllSwitchFlows: tableId= 4&lt;br/&gt;
getAllSwitchFlows: flow= Flow [_id=Uri &lt;a href=&quot;#UF$TABLE*4*2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;_value=#UF$TABLE*4*2&lt;/a&gt;, _key=FlowKey &lt;a href=&quot;#UF$TABLE*4*2]&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;_id=Uri [_value=#UF$TABLE*4*2]&lt;/a&gt;, augmentation=[FlowStatisticsData [_flowStatistics=FlowStatistics [_byteCount=Counter64 &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=0&amp;#93;&lt;/span&gt;, _packetCount=Counter64 &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=0&amp;#93;&lt;/span&gt;, _duration=Duration [_nanosecond=Counter32 &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=707000000&amp;#93;&lt;/span&gt;, _second=Counter32 &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=722&amp;#93;&lt;/span&gt;, augmentation=[]], _flags=FlowModFlags &lt;span class=&quot;error&quot;&gt;&amp;#91;_cHECKOVERLAP=false, _rESETCOUNTS=false, _nOPKTCOUNTS=false, _nOBYTCOUNTS=false, _sENDFLOWREM=true&amp;#93;&lt;/span&gt;, _instructions=Instructions [_instruction=[], augmentation=[]], _match=Match [_ethernetMatch=EthernetMatch [_ethernetDestination=EthernetDestination [_address=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=FF:FF:FF:00:00:00&amp;#93;&lt;/span&gt;, augmentation=[]], _ethernetSource=EthernetSource [_address=MacAddress &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=00:00:00:00:00:00&amp;#93;&lt;/span&gt;, augmentation=[]], _ethernetType=EthernetType [_type=EtherType &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=2048&amp;#93;&lt;/span&gt;, augmentation=[]], augmentation=[]], augmentation=[]], _cookie=10, _hardTimeout=0, _idleTimeout=0, _priority=2, _tableId=4, augmentation=[]]]]]&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="27350">OPNFLWPLUG-82</key>
            <summary>Flow Entries from Switch and Controller are not same. Might affect Bug375</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="Avishnoi">Anil Vishnoi</assignee>
                                    <reporter username="praveen_recker@sify.com">Praveen Darshanam</reporter>
                        <labels>
                    </labels>
                <created>Wed, 12 Mar 2014 15:49:51 +0000</created>
                <updated>Mon, 27 Sep 2021 09:01:06 +0000</updated>
                            <resolved>Tue, 16 Aug 2016 12:41:56 +0000</resolved>
                                                                    <component>General</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="55435" author="praveen_recker@sify.com" created="Wed, 12 Mar 2014 15:57:47 +0000"  >&lt;p&gt;Sorry, it is &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-56&quot; title=&quot;Existing flows not cleared when Controller reconnects to the switch&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-56&quot;&gt;&lt;del&gt;OPNFLWPLUG-56&lt;/del&gt;&lt;/a&gt; not 385&lt;/p&gt;</comment>
                            <comment id="55436" author="vishnoianil@gmail.com" created="Wed, 12 Mar 2014 21:05:18 +0000"  >&lt;p&gt;Investigating&lt;/p&gt;</comment>
                            <comment id="55437" author="mirehak@cisco.com" created="Thu, 13 Mar 2014 14:10:23 +0000"  >&lt;p&gt;For better flow identification we should use the cookie field.&lt;/p&gt;</comment>
                            <comment id="55438" author="vishnoianil@gmail.com" created="Wed, 23 Apr 2014 13:42:57 +0000"  >&lt;p&gt;Hi Praveen,&lt;br/&gt;
Contents of the flow stored in the operational data store seems fine to me. Here is what actually happening.&lt;br/&gt;
You are installing flow with &lt;br/&gt;
source _mac = ff:ff:ff:ff:ff:ff  src_mac_mask = ff:ff:ff:00:00:00&lt;br/&gt;
dest_mac = 00:00:00:00:23:ae     dest_mac_mask = ff:ff:00:00:00:00&lt;/p&gt;

&lt;p&gt;When you install flow with above mac address and their respective mask values, switch installs flow with following src and dst mac.&lt;/p&gt;

&lt;p&gt;src_mac = (ff:ff:ff:ff:ff:ff &amp;amp; ff:ff:ff:00:00:00 = ff:ff:ff:00:00:00)&lt;br/&gt;
dst_mac = (00:00:00:00:23:ae &amp;amp; ff:ff:00:00:00:00 = 00:00:00:00:00:00)&lt;/p&gt;

&lt;p&gt;So in actual flow rule gets install to the switch has src_mac = ff:ff:ff:00:00:00 &amp;amp; dst_mac = 00:00:00:00:00:00 because of the mask, and this is what operational data store flow reports. When controller fetch flow details from switch, switch don&apos;t send cookie mask value with the details, and that why its missing.&lt;/p&gt;

&lt;p&gt;FlowName is something thats being used for controller bookkeeping purpose and never goes down to the switch, so its also not there in the details we fetch from switch. &lt;/p&gt;

&lt;p&gt;When we fetch flow statistics from switch, we compare each flow retrieved from the switch with the flows stored in config data store to find the matching flow, and if we find the matching flow, we augment the statistics respectively in operational data store under the matching flow key. If we don&apos;t find any matching flow in config data store, we consider those flow as unaccounted flows and we augment details of those  flows to operational data store using specific key value. The key (_value=#UF$TABLE*4*2) you see in the operational data store flow is a key of an unaccounted flow. You can decode this key in following way&lt;br/&gt;
#UF - Unaccounted flow&lt;br/&gt;
$TABLE*4 &amp;#8211; Table = 4&lt;br/&gt;
*2, this is second unaccounted flow in this table on switch.&lt;/p&gt;

&lt;p&gt;Matching between the flow fetched from switch and flows stored in config data store is done through custom match functions ( comparison based on each element of the flow construct ), because flow is the only construct in openflow spec that don&apos;t have unique ID associated with it. If we can find some alternate mechanism of providing unique id to the flow, we can avoid this custom matching and directly augment the flow stats to the flow associated with that unique key in the operational data store.&lt;/p&gt;

&lt;p&gt;Now the question is why controller is considering this flow as unaccounted flow given that its respective flow is already there in the config data store?&lt;br/&gt;
I feel this is a bug in the custom matching functions where we compare ethernet address for match, we probably are ignoring the mask based comparison. The reason this custom comparison gets more tricky is because when we fetch flow stats from switch, it doesn&apos;t provide the mask values, it just provide the final executed details of flow, rather then what user sent to it.&lt;/p&gt;

&lt;p&gt;For short term i will try to fix it in the existing implementation and will push patch sometime next week. For the long term solution we are looking at alternate mechanism of assigning unique identifier to the flow using &quot;cookies&quot;. &lt;/p&gt;

&lt;p&gt;Thanks&lt;br/&gt;
Anil&lt;/p&gt;</comment>
                            <comment id="55439" author="andrejleitner" created="Tue, 16 Aug 2016 12:41:56 +0000"  >&lt;p&gt;Closing bug since the main issue here was the alien flow id which was fixed in &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-722&quot; title=&quot;Some Flows not found in DeviceFlowRegistry&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-722&quot;&gt;&lt;del&gt;OPNFLWPLUG-722&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.opendaylight.org/browse/OPNFLWPLUG-736&quot; title=&quot;Flow doesn&amp;#39;t show up in operational data with correct flow id&quot; class=&quot;issue-link&quot; data-issue-key=&quot;OPNFLWPLUG-736&quot;&gt;&lt;del&gt;OPNFLWPLUG-736&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>521</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=521]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i02yyf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>