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 F03B3A04F0 for ; Tue, 10 Dec 2019 16:01:24 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E18251BEC4; Tue, 10 Dec 2019 16:01:24 +0100 (CET) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id DB67D1BEC4 for ; Tue, 10 Dec 2019 16:01:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575990082; 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=bH/IoEX2KHipBBbaEGbGzD756ecqKREs3VisZP85/hc=; b=DVxuQ0pq80LxGG/j4Wl9q/ufQ8NJnyhpSLSwl9KAL7jz0kNFG4aGsoanE2m8/pl77NiXT5 GR/PLFpBz3pbjBGD20/4ub/cIA887k5rbz50frLsiJ5wy+rEu985HWH8uGPV/DXuiPp/hI enblbxkJjaNHUWJX3/YKWVwOUxDW8fw= 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-114-lK_G5mK7Mn6YlXW4vLE4eg-1; Tue, 10 Dec 2019 10:01:18 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 68DF7107ACC5; Tue, 10 Dec 2019 15:01:17 +0000 (UTC) Received: from rh.redhat.com (ovpn-116-64.ams2.redhat.com [10.36.116.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 655D75D9C5; Tue, 10 Dec 2019 15:01:16 +0000 (UTC) From: Kevin Traynor To: Robin Jarry Cc: Stephen Hemminger , dpdk stable Date: Tue, 10 Dec 2019 14:59:20 +0000 Message-Id: <20191210145937.32755-46-ktraynor@redhat.com> In-Reply-To: <20191210145937.32755-1-ktraynor@redhat.com> References: <20191210145937.32755-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-MC-Unique: lK_G5mK7Mn6YlXW4vLE4eg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'usertools: fix telemetry client with python 3' has been queued to LTS release 18.11.6 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/16/19. 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 rebasi= ng (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/66742b2c696789ef64= 2042d035284bf1fc4f3a26 Thanks. Kevin. --- >From 66742b2c696789ef642042d035284bf1fc4f3a26 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Thu, 17 Oct 2019 19:32:12 +0200 Subject: [PATCH] usertools: fix telemetry client with python 3 [ upstream commit fe35622659edc678992aea389beb152105051e7f ] When running the dpdk-telemetry-client.py with python 3, we get the following syntax errors: File "usertools/dpdk-telemetry-client.py", line 70 print "\nResponse: \n", str(data) ^ SyntaxError: invalid syntax File "usertools/dpdk-telemetry-client.py", line 93 print "\nResponse: \n", str(data) ^ SyntaxError: invalid syntax File "usertools/dpdk-telemetry-client.py", line 111 file_path =3D sys.argv[1] ^ TabError: inconsistent use of tabs and spaces in indentation Import print_function from __future__ and add parentheses where missing. Also, use spaces for indentation everywhere. Fixes: d1b94da4a4e0 ("usertools: add client script for telemetry") Fixes: 53f293c9a783 ("usertools: replace unsafe input function") Fixes: 4080e46c8078 ("telemetry: support global metrics") Signed-off-by: Robin Jarry Acked-by: Stephen Hemminger --- usertools/dpdk-telemetry-client.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-= client.py index e0587022c..1c61a2a28 100644 --- a/usertools/dpdk-telemetry-client.py +++ b/usertools/dpdk-telemetry-client.py @@ -2,4 +2,6 @@ # Copyright(c) 2018 Intel Corporation =20 +from __future__ import print_function + import socket import os @@ -15,7 +17,7 @@ DEFAULT_FP =3D "/var/run/dpdk/default_client" =20 try: -=09raw_input # Python 2 + raw_input # Python 2 except NameError: -=09raw_input =3D input # Python 3 + raw_input =3D input # Python 3 =20 class Socket: @@ -73,5 +75,5 @@ class Client: self.socket.client_fd.send(METRICS_REQ) data =3D self.socket.client_fd.recv(BUFFER_SIZE) - print "\nResponse: \n", str(data) + print("\nResponse: \n", str(data)) =20 def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests= metrics for given client @@ -112,8 +114,8 @@ if __name__ =3D=3D "__main__": file_path =3D "" if (len(sys.argv) =3D=3D 2): -=09file_path =3D sys.argv[1] + file_path =3D sys.argv[1] else: print("Warning - No filepath passed, using default (" + DEFAULT_FP= + ").") -=09file_path =3D DEFAULT_FP + file_path =3D DEFAULT_FP client =3D Client() client.getFilepath(file_path) --=20 2.21.0 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092019-12-10 14:49:42.153148203 +0000 +++ 0046-usertools-fix-telemetry-client-with-python-3.patch=092019-12-10 14= :49:39.077457301 +0000 @@ -1 +1 @@ -From fe35622659edc678992aea389beb152105051e7f Mon Sep 17 00:00:00 2001 +From 66742b2c696789ef642042d035284bf1fc4f3a26 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit fe35622659edc678992aea389beb152105051e7f ] + @@ -30 +31,0 @@ -Cc: stable@dpdk.org @@ -35,2 +36,2 @@ - usertools/dpdk-telemetry-client.py | 14 ++++++++------ - 1 file changed, 8 insertions(+), 6 deletions(-) + usertools/dpdk-telemetry-client.py | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) @@ -39 +40 @@ -index 60fe97af7..e06d6306c 100755 +index e0587022c..1c61a2a28 100644 @@ -42 +43 @@ -@@ -3,4 +3,6 @@ +@@ -2,4 +2,6 @@ @@ -49 +50 @@ -@@ -17,7 +19,7 @@ DEFAULT_FP =3D "/var/run/dpdk/default_client" +@@ -15,7 +17,7 @@ DEFAULT_FP =3D "/var/run/dpdk/default_client" @@ -59 +60 @@ -@@ -75,5 +77,5 @@ class Client: +@@ -73,5 +75,5 @@ class Client: @@ -66,8 +67 @@ -@@ -89,5 +91,5 @@ class Client: - self.socket.client_fd.send(GLOBAL_METRICS_REQ) - data =3D self.socket.client_fd.recv(BUFFER_SIZE) -- print "\nResponse: \n", str(data) -+ print("\nResponse: \n", str(data)) -=20 - def interactiveMenu(self, sleep_time): # Creates Interactive menu wit= hin the script -@@ -122,8 +124,8 @@ if __name__ =3D=3D "__main__": +@@ -112,8 +114,8 @@ if __name__ =3D=3D "__main__":