The goal of this utility is to read both datapath and Openflow flows
(using the flow library already available) and print them in different
formats and styles to make it easier to understand them and troubleshoot
issues.
The formats are quite opinionated and so are the colors chosen so I'm
eager to hear what is the impression caused to the community.
Here is a summary of the formats and features supported:
- Openflow
- Console: Prints flows back to the console allowing filtering and
extensive formatting.
- Cookie: Arranges flows based on cookie (instead of table) to ease
visualization of OVN-generated flows.
- HTML: Prints an HTML file that shows the flows arranged by tables.
resubmit actions have a hyperlinke to the target table to ease
navegation.
- Logic: Many times OVN generates many "logically-equivalent" flows.
These are flows that have the same structure: match on the same
values and have the same actions. The only thing that changes is
the actual value they match against and maybe the arguments of the
actions. This format collapses these flows so you can visualize the
logical pipeline easier.
- JSON: JSON format.
More OpenFlow features:
- OVN metadata: Both the "cookie" and the "logic" format allow to
connect to a running OVN NB/SB databases and enrich the flows with
OVN context based on the flow's cookie.
- Datapath:
- Console: Prints flows back to the console allowing filtering and
extensive formatting.
- Tree: Datapath flows use recirculation to further execute
additional actions. This format builds a tree of flows following
the recirculation identifiers and prints it in the console.
- HTML: Prints the datapath flow tree in HTML. It includes some
minimal JS to support expanding and collapsing of entire branches.
- Graph: Following the "tree" format, this one prints the tree in
graphviz format.
- JSON: JSON format.
Additional datapath features:
- Many datapath formats are based on the tree flow hierarchy. An
interesting feature of this structure is that filtering is done at
the branch level. This means that when a flow satisfies the filter,
the entire sub-tree leading to that flow is shown.
Additional common features:
- Styling: Styles for both console and HTML formats can be defined
using a configuration file.
- Heat maps: Some formats support heat-maps. A color pallete ranging
from blue (cold) to red (hot) is used to print the number of
packets and bytes of the flows. That way, the flows that are
handling more traffic are much easier to spot
--
V5 -> V6:
- Addressed comments regarding documentation.
V4 -> V5:
- Reworked datapath formats to display flows per pmd-thread if possible
- Reworked datapath tree format to:
- combine flows with the same action together
- include in_port in recirculation block so we don't show
impossible-to-match flows
- Removed "rich" banners in console outputs.
- Add a couple of missing datapath flow fields.
- Squash the dark html format into patch 6/13.
V3 -> V4:
- Add manpage to rpm package
- Fix Eelco's comments
V2 -> V3:
- Fix grammar thanks to Eelco's review
V1 -> V2:
- Fix typos and nits on documentation
- Split documentation in two: ovs-flowviz.8 man page and a topic
article with more detailed examples.
RFC -> V1:
- Addressed Eelco's comments
- Added a documentation page
- Added support for dark style HTML pages
- Patch 3. Small fix in the way a style is looked up. Use the key in
the KV instead of the metadata string. This helps with "free" values
such as "output".
Adrian Moreno (13):
python: ovs: flow: Support dp-extra-info section.
python: ovs: flow: Add offloaded key to odp flow.
python: ovs: Add flowviz scheleton.
python: ovs: flowviz: Add file processing infra.
python: ovs: flowviz: Add console formatting.
python: ovs: flowviz: Add default config file.
python: ovs: flowviz: Add html formatting.
python: ovs: flowviz: Add datapath tree format.
python: ovs: flowviz: Add OpenFlow logical view.
python: ovs: flowviz: Add Openflow cookie format.
python: ovs: flowviz: Add datapath html format.
python: ovs: flowviz: Add datapath graph format.
documentation: Document ovs-flowviz.
Documentation/automake.mk | 4 +-
Documentation/conf.py | 4 +
Documentation/ref/index.rst | 1 +
Documentation/ref/ovs-flowviz.8.rst | 539 ++++++++++++++++++++
Documentation/topics/flow-visualization.rst | 313 ++++++++++++
Documentation/topics/index.rst | 1 +
NEWS | 5 +-
python/automake.mk | 29 +-
python/ovs/flow/kv.py | 9 +
python/ovs/flow/odp.py | 24 +-
python/ovs/flowviz/__init__.py | 2 +
python/ovs/flowviz/console.py | 193 +++++++
python/ovs/flowviz/format.py | 405 +++++++++++++++
python/ovs/flowviz/html_format.py | 147 ++++++
python/ovs/flowviz/main.py | 196 +++++++
python/ovs/flowviz/odp/__init__.py | 0
python/ovs/flowviz/odp/cli.py | 109 ++++
python/ovs/flowviz/odp/graph.py | 481 +++++++++++++++++
python/ovs/flowviz/odp/html.py | 337 ++++++++++++
python/ovs/flowviz/odp/tree.py | 512 +++++++++++++++++++
python/ovs/flowviz/ofp/__init__.py | 0
python/ovs/flowviz/ofp/cli.py | 236 +++++++++
python/ovs/flowviz/ofp/html.py | 100 ++++
python/ovs/flowviz/ofp/logic.py | 364 +++++++++++++
python/ovs/flowviz/ovs-flowviz | 20 +
python/ovs/flowviz/ovs-flowviz.conf | 128 +++++
python/ovs/flowviz/process.py | 344 +++++++++++++
python/setup.py.template | 14 +-
rhel/openvswitch-fedora.spec.in | 1 +
rhel/openvswitch.spec.in | 1 +
30 files changed, 4510 insertions(+), 9 deletions(-)
create mode 100644 Documentation/ref/ovs-flowviz.8.rst
create mode 100644 Documentation/topics/flow-visualization.rst
create mode 100644 python/ovs/flowviz/__init__.py
create mode 100644 python/ovs/flowviz/console.py
create mode 100644 python/ovs/flowviz/format.py
create mode 100644 python/ovs/flowviz/html_format.py
create mode 100644 python/ovs/flowviz/main.py
create mode 100644 python/ovs/flowviz/odp/__init__.py
create mode 100644 python/ovs/flowviz/odp/cli.py
create mode 100644 python/ovs/flowviz/odp/graph.py
create mode 100644 python/ovs/flowviz/odp/html.py
create mode 100644 python/ovs/flowviz/odp/tree.py
create mode 100644 python/ovs/flowviz/ofp/__init__.py
create mode 100644 python/ovs/flowviz/ofp/cli.py
create mode 100644 python/ovs/flowviz/ofp/html.py
create mode 100644 python/ovs/flowviz/ofp/logic.py
create mode 100755 python/ovs/flowviz/ovs-flowviz
create mode 100644 python/ovs/flowviz/ovs-flowviz.conf
create mode 100644 python/ovs/flowviz/process.py
--
2.46.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev