Bug 1315065 - [OVS] ovs-ofctl dump-flows should be more readable and easy to follow.
[OVS] ovs-ofctl dump-flows should be more readable and easy to follow.
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openvswitch (Show other bugs)
Unspecified Linux
high Severity high
: rc
: ---
Assigned To: Aaron Conole
: FutureFeature
Depends On:
Blocks: 1411862 1333923
  Show dependency treegraph
Reported: 2016-03-06 07:12 EST by Toni Freger
Modified: 2018-02-16 08:11 EST (History)
14 users (show)

See Also:
Fixed In Version: openvswitch-2.8.0-1.el7fdb
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-02-16 08:11:47 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1549803 None None None 2016-03-06 07:13 EST

  None (edit)
Description Toni Freger 2016-03-06 07:12:38 EST
Description of problem:

Since OpenStack  projects ( OVS firewall driver, ODL) will increase usage of OVS flows, we should create more readable structure of the OVS flows in order to display and to debug them better.

Several thoughts:

1)Instead of numerous lines to create tables display of the flows.
2)To add some meaningful names for these tables instead of numbers.

Version-Release number of selected component (if applicable):
Comment 2 Hynek Mlnarik 2016-05-23 03:09:47 EDT
Additional thoughts to the original description:

* Having the rules from a table grouped is indeed useful, hence it would be nice to be able to specify --sort=table (currently it outputs "ovs-ofctl: table: unknown field name" as of 2.5.0 ovs-ofctl)

* Would it be possible e.g. to add an option for human-readable output (e.g. by enhancing -F option set) that would produce the rules formatted into the table?

* In this human-readable format, it would be beneficial to maintain a default set of displayed fields and sorting order, e.g. not to display cookie and have the rules sorted by table and priority. Still it should be possible for the user to specify displayed fields. 

* Readability would benefit if the names of the commonly used fields (e.g. priority, table, n_packets) were headers of the columns in a table with flows and did not repeat in every flow. Output might be e.g. as follows:

  table  priority  in_port  match                action
  0      10        *        icmp_type=136,icmp6  NORMAL
  0      0         *                             drop

* It would also help if the in_port and output port numbers were translated to port names in the human-readable format.
Comment 11 qding 2017-11-28 21:45:04 EST
Run all OVS cases as regression test

[root@dell-per730-04 openvswitch]# rpm -q openvswitch
[root@dell-per730-25 ~]# ovs-ofctl dump-flows ovsbr0
 cookie=0x0, duration=0.023s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=100,ct_state=-trk,tcp actions=ct(table=1)
 cookie=0x0, duration=0.044s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,arp,in_port=10 actions=output:11
 cookie=0x0, duration=0.042s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,arp,in_port=11 actions=output:10
 cookie=0x0, duration=0.039s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,arp,in_port=20 actions=output:21
 cookie=0x0, duration=0.037s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,arp,in_port=21 actions=output:20
 cookie=0x0, duration=0.034s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,sctp,in_port=10 actions=output:11
 cookie=0x0, duration=0.031s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,sctp,in_port=11 actions=output:10
 cookie=0x0, duration=0.029s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,sctp,in_port=20 actions=output:21
 cookie=0x0, duration=0.026s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=10,sctp,in_port=21 actions=output:20
 cookie=0x0, duration=0.047s, table=0, n_packets=0, n_bytes=0, idle_age=0, priority=1 actions=drop
 cookie=0x0, duration=0.021s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+new+trk,tcp,in_port=10,nw_src=,nw_dst=,tp_dst=80 actions=ct(commit),output:11
 cookie=0x0, duration=0.018s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+new+trk,tcp,in_port=21,nw_src=,nw_dst=,tp_dst=80 actions=ct(commit),output:20
 cookie=0x0, duration=0.015s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+est+trk,tcp,in_port=10 actions=output:11
 cookie=0x0, duration=0.013s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+est+trk,tcp,in_port=11 actions=output:10
 cookie=0x0, duration=0.010s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+est+trk,tcp,in_port=20 actions=output:21
 cookie=0x0, duration=0.007s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+est+trk,tcp,in_port=21 actions=output:20
 cookie=0x0, duration=0.005s, table=1, n_packets=0, n_bytes=0, idle_age=0, ct_state=+inv+trk,tcp actions=drop
 cookie=0x0, duration=0.002s, table=1, n_packets=0, n_bytes=0, idle_age=0, actions=drop
Comment 16 Flavio Leitner 2018-02-16 08:11:47 EST
Closing resolved bugs.

Note You need to log in before you can comment on or make changes to this bug.