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 B8DCDA0577; Mon, 13 Apr 2020 16:58:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 953631B53; Mon, 13 Apr 2020 16:58:52 +0200 (CEST) Received: from integrity.niometrics.com (integrity.niometrics.com [42.61.70.122]) by dpdk.org (Postfix) with ESMTP id 13265F72 for ; Mon, 13 Apr 2020 16:58:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by integrity.niometrics.com (Postfix) with ESMTP id B6618409CBA9; Mon, 13 Apr 2020 22:58:48 +0800 (+08) DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com B6618409CBA9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586789929; bh=lJep6nAr9XjZV5V/hMrijOLIPJW5PTQSV7Ot1bdEZgg=; h=From:To:Cc:Subject:Date:From; b=sa8+pWjOF8V7IYYtau6vHpSWfxjF5SQzgALdAN7aUCHSHcp/UokftME+jpxRcPuBq xurY4bDH0sYRyZ9eDcP28N0QAmLTkI3siMwbKl/l9dPvlnYrx4EYxwu4gjJthtWOrj nAvzRWRlgN+mYS3r+SodQSh5Fu3U8eRDZJu7N5Z8= X-Virus-Scanned: amavisd-new at niometrics.com Received: from integrity.niometrics.com ([127.0.0.1]) by localhost (integrity.niometrics.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DEndNSNrrdps; Mon, 13 Apr 2020 22:58:48 +0800 (+08) Received: from devserver-sg-11.niometrics.com (test-site-3.niometrics.com [192.168.2.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by integrity.niometrics.com (Postfix) with ESMTPSA id EA026409CBA8; Mon, 13 Apr 2020 22:58:47 +0800 (+08) DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com EA026409CBA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586789928; bh=lJep6nAr9XjZV5V/hMrijOLIPJW5PTQSV7Ot1bdEZgg=; h=From:To:Cc:Subject:Date:From; b=Asw2JIaEz+yCZAbOQOmFs9L6RwfSRoCvtRh6mSkupBvhtwq/LBWE0P8Z3WXJlIPjT +Yw+HbezjVvk2nOqh94ShKb+GaWANpu+kmLnRAFL9bO8/Q/f826hJG450H2wsOVnen cAOURiFcFMEikh526pzacr14BeHNAOyv2o/kHYus= From: Christos Ricudis To: dev@dpdk.org Cc: Christos Ricudis Date: Mon, 13 Apr 2020 22:58:34 +0800 Message-Id: <1586789914-10825-1-git-send-email-ricudis@niometrics.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=3.5 tests=ALL_TRUSTED, AWL, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on integrity.niometrics.com Subject: [dpdk-dev] [PATCH] usertools: decode PCI device name as UTF-8 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" Fixes the case where a PCI device string identifier contains non-ASCII UTF-8. A particular example is Mellanox Connext-X 5 EN MT27800: 28:00.0 Ethernet controller: Mellanox Technologies MT27800 Family [ConnectX-5] Subsystem: Mellanox Technologies ConnectX®-5 EN network interface card, 100GbE single-port QSFP28, PCIe3.0 x16, tall bracket; MCX515A-CCAT Signed-off-by: Christos Ricudis --- usertools/dpdk-devbind.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index b1d1498..8ec1703 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -257,7 +257,7 @@ def get_device_details(devices_type): # Clear previous device's data dev = {} else: - name, value = dev_line.decode().split("\t", 1) + name, value = dev_line.decode("utf8").split("\t", 1) value_list = value.rsplit(' ', 1) if len(value_list) > 1: # String stored in _str -- 1.8.3.1