From patchwork Fri Jun 19 13:53:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 1312944 X-Patchwork-Delegate: i.maximets@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=TkPg9fiP; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49pKzS2SQgz9sT2 for ; Fri, 19 Jun 2020 23:54:11 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E565F2049E; Fri, 19 Jun 2020 13:54:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Of0-b-Kf3ol; Fri, 19 Jun 2020 13:54:08 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id C6D0E2155C; Fri, 19 Jun 2020 13:54:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8EBCBC07FF; Fri, 19 Jun 2020 13:54:07 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id DE9D6C016E for ; Fri, 19 Jun 2020 13:54:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CE39A896AA for ; Fri, 19 Jun 2020 13:54:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1Z79GQsYGHg8 for ; Fri, 19 Jun 2020 13:54:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by hemlock.osuosl.org (Postfix) with ESMTPS id 91276896A0 for ; Fri, 19 Jun 2020 13:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592574843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TsBQaHtAynTgXtAeG/tQjMdD27WgNprv3b0Nukc3xIY=; b=TkPg9fiPXaLt/+1sSbao8m3qz0J4fIK2p3PH4Z+vt+bVkwsxvekHp3WrL+VjSLHjnM/LaI JUisk0iwNvl4shGI9NDwIdw1PIRjIsYDEKR4vn4onjdmH+n0613hvAIxuNFFTl+bUauLPr 16awXvFyn1WLunTciCJVAlQMqxBusOw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-492-I59lwkRqMEefVYSElOmgBA-1; Fri, 19 Jun 2020 09:54:01 -0400 X-MC-Unique: I59lwkRqMEefVYSElOmgBA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5DC081800D42; Fri, 19 Jun 2020 13:54:00 +0000 (UTC) Received: from localhost.localdomain (dhcp-158-210.lab.eng.brq.redhat.com [10.37.158.210]) by smtp.corp.redhat.com (Postfix) with ESMTP id 945395C1D0; Fri, 19 Jun 2020 13:53:59 +0000 (UTC) From: Timothy Redaelli To: dev@openvswitch.org Date: Fri, 19 Jun 2020 15:53:52 +0200 Message-Id: <3a728f05dd57f0d97fda3d86c883f7f86cf672ef.1592573751.git.tredaelli@redhat.com> In-Reply-To: <376bc10cac7e0041d6c21e74c996cd033128bcb7.1592573748.git.tredaelli@redhat.com> References: <376bc10cac7e0041d6c21e74c996cd033128bcb7.1592573748.git.tredaelli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2] ovs-dpctl-top: Skip "eth()" element X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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.") Cc: blp@ovn.org Signed-off-by: Timothy Redaelli Acked-by: Flavio Leitner --- v2: - Added missing Signed-off-by 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 011cc64b7..fbe6e4f56 100755 --- a/utilities/ovs-dpctl-top.in +++ b/utilities/ovs-dpctl-top.in @@ -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)