From patchwork Fri May 31 11:11:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Timothy Redaelli X-Patchwork-Id: 53952 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DDBE31B94D; Fri, 31 May 2019 13:11:43 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 78E93375B; Fri, 31 May 2019 13:11:42 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2556A3B70; Fri, 31 May 2019 11:11:36 +0000 (UTC) Received: from aldebaran.drizzt.lan (dhcp19-189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2A147838D; Fri, 31 May 2019 11:11:34 +0000 (UTC) From: Timothy Redaelli To: dev@dpdk.org Cc: stable@dpdk.org Date: Fri, 31 May 2019 13:11:26 +0200 Message-Id: <0c31ecf46994f3c582f14842446c538ebe0622d9.1559301086.git.tredaelli@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 31 May 2019 11:11:41 +0000 (UTC) Subject: [dpdk-dev] [PATCH] usertools: Fix clearing any old data X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently clear_data (dpdk-devbind.py) doesn't work as expected since "global devices" is missing and so "devices" is considered a local variable. This commit changes "clear_data" function in order to really clear devices by adding "global devices". CC: stable@dpdk.org Signed-off-by: Timothy Redaelli Acked-by: Luca Boccassi Reviewed-by: David Marchand --- usertools/dpdk-devbind.py | 1 + 1 file changed, 1 insertion(+) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 9e79f0d28..e6b551d33 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -210,6 +210,7 @@ def get_pci_device_details(dev_id, probe_lspci): def clear_data(): '''This function clears any old data''' + global devices devices = {} def get_device_details(devices_type):