Skip to content

Commit

Permalink
ovs-dpctl-top: Skip "eth()" element.
Browse files Browse the repository at this point in the history
With commit efde188 ("odp-util: Print eth() for Ethernet flows if
packet_type is absent.") "eth()" is printed for Ethernet flows if packet_type
is absent, but this broke "ovs-dpctl-top" since it expects that every
element has a value.

This commit skips the parsing of the empty "eth()" element.

Fixes: efde188 ("odp-util: Print eth() for Ethernet flows if packet_type is absent.")
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
  • Loading branch information
drizzt authored and igsilya committed Aug 26, 2020
1 parent 046321d commit 6a328b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions utilities/ovs-dpctl-top.in
Expand Up @@ -480,6 +480,8 @@ def elements_to_dict(elements):
""" Convert line to a hierarchy of dictionaries. """
result = {}
for element in elements:
if (element == "eth()"):
continue
match = FIELDS_CMPND.search(element)
if (match):
key = match.group(1)
Expand Down

0 comments on commit 6a328b6

Please sign in to comment.