From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 613B1A034F for ; Wed, 10 Nov 2021 07:42:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5ACC04014D; Wed, 10 Nov 2021 07:42:06 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by mails.dpdk.org (Postfix) with ESMTP id BCB524014D for ; Wed, 10 Nov 2021 07:42:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ip4sicric4wwxm01YMI+mygMaDwPLD+vT1olp5idccN3SzfpbwsbyqCfiD755rI/3RG4f8J85a+GcztpkErCRxrJcyQbXtPcYhlCM32JdwqrBCcCST+tYuYqUb60cU+lLaFiNxoeNV4x9PGmTaj+YS+F0AQg3dqKSKS46CWmILf8Vzavpz8bVrKuQxpVj1A/4wEYdJ0tr1IobeHBvbfnrabzsbK2oiq9YeSTdCA4IBZmqaS65fHPo8Enlsr8GhHd5f92iET5aRGWl9HvazV579dvZ6sipL6acljBLKzbTEl9AEPBQp914b4zk3lgraq7gDG2LQryPgLIM5t6faxtyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=L6StDNtJFGeKzsbMDO4lGuzSw2PdPjGkDLHpZSL5aDM=; b=a81SH5JL62JPTGO9LE/XLEqL94QL/4O/fKgEKNeHrm9ohMD9xDXTILVCWKExJuMcMGS6g/+eqQwMMnwB0f3MpuH9xM+92a3n8PL7o/CNdsbiHOjoCEwqZ70Sht3Y14Z09LX5nz/C7Ep05PWR1ym2mjT56+wJI74A4kGOt0Yo4sgtHReE5LqMeJZMc9R+geOydzkSp5i6l5CjzrYlzUzj7v/0dwY7zhjSRKv0K/lxJ2fovyx07nd4ZWdXDHeo+hEbXVY50mERkjNFrK0apt2koMfGAtP0LUnuIwb+lXGFoQXsnXdHcTNHUXCUVtzJ2Pxk2HESqeivWxTGwltjkvj8cw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L6StDNtJFGeKzsbMDO4lGuzSw2PdPjGkDLHpZSL5aDM=; b=T97DVuaBaDpo1nfgiKev2LUDiExuLczsLi7mJmNqrG6BwdevbZe78OTuZUWxpPrnloxw17Bkpy3QlYwtNhM55L04DsQ/4f3Xus5sRLyNXzTEZ4hkzSBm56I4FqrWe/JS+QIZnZCE+JF85srNj/0V18w4FBfKQ64dOqupC321vE2PS5muqcnQvPORoQSdgLTRg7gX+old0rI/0qHFTUyBtFERVa0D9k7lzuJ6b7VdrqROebbvctyH+H36JPvWyGhWShPZ9JXVvhbZ77/phYB8/5MtvxnXQAWL5BdMjxyAs+C0q5uJKTIKmGf+6bvKY9aqwiKtKbiDazy/0cJ7WOWnmQ== Received: from DS7PR03CA0028.namprd03.prod.outlook.com (2603:10b6:5:3b8::33) by MW2PR12MB2475.namprd12.prod.outlook.com (2603:10b6:907:3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.15; Wed, 10 Nov 2021 06:42:01 +0000 Received: from DM6NAM11FT032.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3b8:cafe::b4) by DS7PR03CA0028.outlook.office365.com (2603:10b6:5:3b8::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 10 Nov 2021 06:42:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT032.mail.protection.outlook.com (10.13.173.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:42:00 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:41:58 +0000 From: Xueming Li To: Bruce Richardson CC: Luca Boccassi , Ciara Power , dpdk stable Date: Wed, 10 Nov 2021 14:29:29 +0800 Message-ID: <20211110063216.2744012-86-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 89b3eedc-615b-4045-e640-08d9a41532f3 X-MS-TrafficTypeDiagnostic: MW2PR12MB2475: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1Z7sAZ/A8aNL5exESbxAJu5aQJuB4pY6FCiRpB6PFZZTS6fWa4PkYKKT1Tao60lLR0bPHgRT2BfYG/kK6nF/PT2YiL+FbtPxRptpb3YyOllu34CkAEWWwc4PaWZVKGkgS46vRIYxwFombqMayxLVR++kLkfCwDiWCuHFpHmzBAFr1QK9RocB49k2L8ndV8Dw+/V+/G/cgPeNn19lACTxW3JlVhg7NUV5hOIp8BPQrlsKfTePIJVEopYGZIYZSDvZ4UmXC6c79pkIebh9dMrar70OGP/x6v0hKFtF1fPA0lf/qL3OCsDA0ucRb5GN2TI5XQiWk18d14+FhUHN4vVDKWXpIlktB0bCyzq7ly3BubAYwmflSN+B7NElQZykXNlAfkHCXvX8K0nmXunP4+oULeKXWKhHBJ9Ta6QTr9dd3twVmwqHLabAG17CCIiUDDsE2fZbIVLc71x9OWWDJ247OHdrhpAFxcJHT4T9M9Bj/0J5p/tO9pz1wKHIytJEnYA5yWQI30g/A65GLi9azmk5SNJ8g5z3rWEUPTIpgAalRqWNrmkFpy6LxDTYUbDkacPnngMdGJV1EvW2kaKDTgYnF0R+hUIYH6tZ08a0wmtRiCObrQ07Ds1xePBeZMN84PbzTI8OkIowBBXrMJPexB3OIcrDy9tQUY3F5VFpiPKbNjZrfPhQ5F98OdmWUhOjmACMN6sR35O2HDd8Xt52Ku37/UJNwK0Pr9p2u9ChBrQxjEWLEYZmAsXwOPVKakyymnnDaJSGHpmd5BSuek1lrWveZkRXN+W6x2/H6fE78CLe/Mw5IV0AR6TKIpa6i8Gai3SqZp6WpRK5jMTK2HjyiN9iiQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(36756003)(2906002)(6286002)(8936002)(186003)(36860700001)(966005)(86362001)(4326008)(8676002)(53546011)(82310400003)(6916009)(7696005)(2616005)(54906003)(426003)(16526019)(26005)(4001150100001)(1076003)(70586007)(356005)(70206006)(508600001)(5660300002)(7636003)(83380400001)(316002)(336012)(55016002)(47076005)(6666004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:42:00.3730 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 89b3eedc-615b-4045-e640-08d9a41532f3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT032.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2475 Subject: [dpdk-stable] patch 'usertools: fix handling EOF for telemetry input pipe' has been queued to stable release 20.11.4 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 stable release 20.11.4 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/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Thanks. Xueming Li --- >From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 13 Sep 2021 11:51:36 +0100 Subject: [PATCH] usertools: fix handling EOF for telemetry input pipe Cc: Xueming Li [ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ] To allow the script to take queries from input pipes e.g. "echo /ethdev/stats,0 | dpdk-telemetry.py", we need to handle the case of EOF correctly without crashing with an exception. Do this by using a try-except block around the input handling. Fixes: 6a2967c112a3 ("usertools: add new telemetry script") Signed-off-by: Bruce Richardson Acked-by: Ciara Power --- usertools/dpdk-telemetry.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/usertools/dpdk-telemetry.py b/usertools/dpdk-telemetry.py index 181859658f..a71f1e9ff9 100755 --- a/usertools/dpdk-telemetry.py +++ b/usertools/dpdk-telemetry.py @@ -51,13 +51,17 @@ def handle_socket(path): CMDS = read_socket(sock, output_buf_len, False)["/"] # interactive prompt - text = input('--> ').strip() - while text != "quit": - if text.startswith('/'): - sock.send(text.encode()) - read_socket(sock, output_buf_len) + try: text = input('--> ').strip() - sock.close() + while text != "quit": + if text.startswith('/'): + sock.send(text.encode()) + read_socket(sock, output_buf_len) + text = input('--> ').strip() + except EOFError: + pass + finally: + sock.close() def readline_complete(text, state): -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:05.827601818 +0800 +++ 0085-usertools-fix-handling-EOF-for-telemetry-input-pipe.patch 2021-11-10 14:17:01.847412948 +0800 @@ -1 +1 @@ -From 744e9a87c582d687d5d20b61b7ee0835da421541 Mon Sep 17 00:00:00 2001 +From ad4051ca8f5fac9d1ad173ab8c4f7d24cc115258 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 744e9a87c582d687d5d20b61b7ee0835da421541 ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index bdc617db18..7ebbb64fce 100755 +index 181859658f..a71f1e9ff9 100755 @@ -24 +26 @@ -@@ -69,13 +69,17 @@ def handle_socket(path): +@@ -51,13 +51,17 @@ def handle_socket(path):