[OPNFLWPLUG-24] OF 1.0 statistics are reporting ethernet src/dst mac when none is present Created: 13/Jan/14  Updated: 27/Sep/21  Due: 22/Jan/14  Resolved: 22/Jan/14

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

Type: Improvement
Reporter: Ed Warnicke Assignee: Jyotsna Priya
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Mac OS
Platform: PC


Attachments: PNG File Screenshot from 2014-01-22 15:59:18.png    

 Description   

When running:

sudo mn --topo tree,2 --controller 'remote,ip=10.0.2.2:6633' --switch ovsk,protocols=OpenFlow10

Against the new openflowplugin, and then running in mininet

h1 ping h2

(which fails, different bug)

In stats I see:

http://localhost:8080/restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/0

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<table
xmlns="urn:opendaylight:flow:inventory">
<aggregate-flow-statistics
xmlns="urn:opendaylight:flow:statistics">
<byte-count>0</byte-count>
<packet-count>0</packet-count>
<flow-count>0</flow-count>
</aggregate-flow-statistics>
<id>0</id>
<flow-table-statistics
xmlns="urn:opendaylight:flow:table:statistics">
<packets-looked-up>36852</packets-looked-up>
<packets-matched>36595</packets-matched>
<active-flows>9</active-flows>
</flow-table-statistics>
<flow>
<id>1011</id>
<flow-statistics
xmlns="urn:opendaylight:flow:statistics">
<match>
<ipv4-source>0.0.0.0/0</ipv4-source>
<ipv4-destination>0.0.0.0/0</ipv4-destination>
<ip-match>
<ip-protocol>0</ip-protocol>
</ip-match>
<in-port>openflow:1:0</in-port>
<ethernet-match>
<ethernet-source>
<address>00:00:00:00:00:00</address>
</ethernet-source>
<ethernet-type>
<type>2048</type>
</ethernet-type>
<ethernet-destination>
<address>00:00:00:00:00:00</address>
</ethernet-destination>
</ethernet-match>
<vlan-match>
<vlan-pcp>0</vlan-pcp>
<vlan-id>
<vlan-id>0</vlan-id>
</vlan-id>
</vlan-match>
</match>
<table_id>0</table_id>
<duration>
<nanosecond>369000000</nanosecond>
<second>78</second>
</duration>
<cookie>0</cookie>
<packet-count>0</packet-count>
<priority>1</priority>
<byte-count>0</byte-count>
<hard-timeout>0</hard-timeout>
<idle-timeout>0</idle-timeout>
</flow-statistics>
</flow>
</table>

On the switch I see:

vagrant@vagrant-ubuntu-trusty-64:~$ sudo ovs-ofctl -O OpenFlow10 dump-flows s1
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=5.357s, table=0, n_packets=0, n_bytes=0, idle_age=5, priority=1,ip actions=output:1

And in the config I see:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<table
xmlns="urn:opendaylight:flow:inventory">
<flow>
<instructions>
<instruction>
<order>0</order>
<apply-actions>
<action>
<output-action>
<output-node-connector>openflow:1:1</output-node-connector>
</output-action>
</action>
</apply-actions>
</instruction>
</instructions>
<table_id>0</table_id>
<id>b80f35b0-ebe9-476a-a36a-3bcb459cee86</id>
<match>
<ipv4-destination>10.0.0.1</ipv4-destination>
<ethernet-match>
<ethernet-type>
<type>2048</type>
</ethernet-type>
</ethernet-match>
</match>
<hard-timeout>0</hard-timeout>
<cookie>0</cookie>
<idle-timeout>0</idle-timeout>
<priority>1</priority>
</flow>
</table>

We are getting spurious eth src/dst matches reported in stats which we shouldn't.



 Comments   
Comment by Anil Vishnoi [ 13/Jan/14 ]

Following values are passed from library to plugin

<ipv4-source>0.0.0.0/0</ipv4-source>
<ipv4-destination>0.0.0.0/0</ipv4-destination>

<ethernet-source>
<address>00:00:00:00:00:00</address>
</ethernet-source>
<ethernet-destination>
<address>00:00:00:00:00:00</address>
</ethernet-destination>

and plugin uses these values to create md-sal flow statistics object which statistics-manager augment in the data store.

Library is converting all the zero bytes of mac/ip address to 00:00:00:00:00:00 and 0.0.0.0 respectively while decoding openflow 1.0 flow statistics message and pass it to the plugin.

Ideally library should look at the wildcard byte and skip the values those were not set for the match. So if Ethernet src/dst are not set in wildcard, library should return null for both these values.

Anil

Comment by Michal Polkorab [ 14/Jan/14 ]

Hello,

I think this is the logical point of view, which should be handled by Openflow Plugin. Because library does what it should do - translates received message. There might be more problems if the library passed nulls to plugin - reason might be unknown.

I believe that the Openflow Plugin should take care of the addresses and check the wildcarded data.

Please, feel free to discuss.

Regards
Michal Polkorab

Comment by Anil Vishnoi [ 19/Jan/14 ]

Hi Ed,

I fixed this issue and pushed code changes through following two commits

openflowplugin - http://git.opendaylight.org/gerrit/4414
Controller - http://git.opendaylight.org/gerrit/4416

Can you please test it in your setup and confirm. I will close the bug afterwards.

Thanks
Anil

Comment by Ed Warnicke [ 21/Jan/14 ]

Please verify fixed.

Comment by Jyotsna Priya [ 22/Jan/14 ]

Verified. The issue is resolved

Comment by Jyotsna Priya [ 22/Jan/14 ]

Attachment Screenshot from 2014-01-22 15:59:18.png has been added with description: Reolved

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