commit | 73f9aeaa11fead280f72da1b79c4af9806c70c19 | [log] [tgz] |
---|---|---|
author | Laszlo Papp <laszlo.papp@hubersuhner.com> | Mon Jan 15 19:23:45 2018 +0000 |
committer | Laszlo Papp <laszlo.papp@hubersuhner.com> | Mon Jan 15 19:23:45 2018 +0000 |
tree | 71a04122f664e6cea27e7b330419b6efa3ed50f8 | |
parent | b7e618d43d8d19560c65133ca1e3bb36c3cce981 [diff] |
Avoid division by zero Nothing stops an OF agent to return zero for lambda values and ONOS probably ought to not crash then. One use case for this is when only one direction is supported on a port, for example tx. Unfortunately, the openflow specification does not separate the directions into different properties, so the agent implementation has to return some frequency value for rx in this case even if only the tx direction is supported. However, anything non-zero would probably be untruthful as it would indicate valid reading to the end user. Even zero will be problematic for unsupported power reading in a direction as 0 dBm is a valid value, but not sure how to deal with any better. Change-Id: I2597bd7d577d9c2e1a3b44421fe505b8b3b6cc92
ONOS is a new SDN network operating system designed for high availability, performance, scale-out.