From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AF5DAA04B1 for ; Mon, 23 Nov 2020 18:13:41 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A354AC912; Mon, 23 Nov 2020 18:13:40 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id D4980C90A for ; Mon, 23 Nov 2020 18:13:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606151618; 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=6UPADQ7V7wF3/mPZIAHZ2TtMYoiQJY2Tqo8F0RCL5lA=; b=A9YDPHrUP7YzSOLU9ssjiPMUmsCw/t0uS5y4G2LohwCUtQGIzG5Tixuy2BWbkw4xLvP2aW H8vEsSUk7nm6q8mCim5UpDoLZtwtO3lmhyga9xwXzrTxoGl4g4X3oWdWkRklPhBwIqNR/6 A219aE67c19nMXZE/BeQ3/8ZOlrM7rI= 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-183-dlGNNU3lPDScD371zBdfPA-1; Mon, 23 Nov 2020 12:13:35 -0500 X-MC-Unique: dlGNNU3lPDScD371zBdfPA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DFC21034B21; Mon, 23 Nov 2020 17:13:34 +0000 (UTC) Received: from rh.redhat.com (ovpn-112-19.ams2.redhat.com [10.36.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id AE00660C04; Mon, 23 Nov 2020 17:13:33 +0000 (UTC) From: Kevin Traynor To: Julien Massonneau Cc: dpdk stable Date: Mon, 23 Nov 2020 17:12:22 +0000 Message-Id: <20201123171222.79398-30-ktraynor@redhat.com> In-Reply-To: <20201123171222.79398-1-ktraynor@redhat.com> References: <20201123171222.79398-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'usertools: fix pmdinfo parsing' has been queued to LTS release 18.11.11 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/27/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/3627aa71db4b46ac17b448fd35c409e2362ab181 Thanks. Kevin. --- >From 3627aa71db4b46ac17b448fd35c409e2362ab181 Mon Sep 17 00:00:00 2001 From: Julien Massonneau Date: Thu, 19 Nov 2020 10:44:01 +0100 Subject: [PATCH] usertools: fix pmdinfo parsing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [ upstream commit 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 ] In the display_pmd_info_strings function, the script parses the section until to find a byte between 32 and 127, and get all data until a byte equals to 0. After, it searches "PMD_INFO_STRING" in the data and passes the whole string in the parse_pmd_info_string function, which split the string with "=" and convert it in python dict with json.loads(). But the string may contain a "=" before "PMD_INFO_STRING", so it is not correctly split and will lead to an error (json.decoder.JSONDecodeError). Example of a string encountered that leads to an error: "Ag%=C£°ÐÊ+Ë®{0´wË-£0òjB·;¾¬úPMD_INFO_STRING= {"name" : "net_octeontx", "params" : "nr_port= ", "pci_ids" : []}" Fixes: c67c9a5c646a ("tools: query binaries for HW and other support information") Signed-off-by: Julien Massonneau --- usertools/dpdk-pmdinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index 12f20735e0..27e1cad328 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -353,5 +353,5 @@ class ReadElf(object): rc = mystring.find("PMD_INFO_STRING") if (rc != -1): - self.parse_pmd_info_string(mystring) + self.parse_pmd_info_string(mystring[rc:]) dataptr = endptr -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-11-23 17:10:14.700509820 +0000 +++ 0030-usertools-fix-pmdinfo-parsing.patch 2020-11-23 17:10:14.018061613 +0000 @@ -1 +1 @@ -From 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 Mon Sep 17 00:00:00 2001 +From 3627aa71db4b46ac17b448fd35c409e2362ab181 Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit 3515fa1e5ecbe0099cb886b81ba77058d1a2d397 ] + @@ -26 +27,0 @@ -Cc: stable@dpdk.org @@ -34 +35 @@ -index b4e8a48cde..3381aa616c 100755 +index 12f20735e0..27e1cad328 100755 @@ -37 +38 @@ -@@ -347,5 +347,5 @@ class ReadElf(object): +@@ -353,5 +353,5 @@ class ReadElf(object): @@ -39 +40 @@ - if rc != -1: + if (rc != -1):