From 287ead4c2038cb03558cd14c877ef06a3de7fa8e Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Fri, 19 Jun 2020 15:53:52 +0200 Subject: [PATCH] ovs-dpctl-top: Skip "eth()" element. With commit efde188622ae ("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: efde188622ae ("odp-util: Print eth() for Ethernet flows if packet_type is absent.") Signed-off-by: Timothy Redaelli Acked-by: Flavio Leitner Signed-off-by: Ilya Maximets --- utilities/ovs-dpctl-top.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utilities/ovs-dpctl-top.in b/utilities/ovs-dpctl-top.in index 7f0f1f8c224..fcb178be64f 100755 --- a/utilities/ovs-dpctl-top.in +++ b/utilities/ovs-dpctl-top.in @@ -479,6 +479,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)