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 6344BA0577; Mon, 13 Apr 2020 17:37:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A02731BFD9; Mon, 13 Apr 2020 17:37:28 +0200 (CEST) Received: from integrity.niometrics.com (integrity.niometrics.com [42.61.70.122]) by dpdk.org (Postfix) with ESMTP id 3AC9E1BF9E for ; Mon, 13 Apr 2020 17:37:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by integrity.niometrics.com (Postfix) with ESMTP id 641EE409CBA9; Mon, 13 Apr 2020 23:37:22 +0800 (+08) DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com 641EE409CBA9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586792244; bh=tWrn1IRmfIDk7RWtCjrKwdjt/iutu4nqrJrH9+PLfSI=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=j9ixnqZl22f1VOBsMppr14ObgSc+7DeZKWVeKQon14dwUbUbzjSrOZ4daZrcQPJGj MaEwXWNjHw5x22q5sGYLYYTOulLcW+LONd9ODeUUWvouCr7u+l5jNootDTxGRu6mYW EG9aII5CoUg2yPwGuU8XTQ+5Ytxk2XI+dKyoym+A= 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 dftNmPsq85cG; Mon, 13 Apr 2020 23:37:22 +0800 (+08) Received: from [192.168.1.133] (unknown [103.6.151.238]) (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 7F246409CBA8; Mon, 13 Apr 2020 23:37:20 +0800 (+08) DMARC-Filter: OpenDMARC Filter v1.3.2 integrity.niometrics.com 7F246409CBA8 DKIM-Filter: OpenDKIM Filter v2.11.0 integrity.niometrics.com 7F246409CBA8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niometrics.com; s=default; t=1586792242; bh=tWrn1IRmfIDk7RWtCjrKwdjt/iutu4nqrJrH9+PLfSI=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=jh2FSdHdQcQyINzj5KynZz06mVIDJY3LikZg+FfTbLRuk8C4eX7mDEZhCKHGO4+X9 9lxvorOuWmiyXIGXv5lQwdFgVGM3/xHOHH7ETNpLuE5RzR6EW0ylLUscNavor3drTM ivSEFpV/DLRTAYza/oh/Ur7wTpFX7P6ZtuHE/Hn8= From: Christos Rikoudis Message-Id: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Date: Mon, 13 Apr 2020 23:36:49 +0800 In-Reply-To: Cc: Christos Rikoudis , dev@dpdk.org To: Andrew Rybchenko References: <1586789914-10825-1-git-send-email-ricudis@niometrics.com> X-Mailer: Apple Mail (2.3445.104.11) X-Spam-Status: No, score=-1.0 required=3.5 tests=ALL_TRUSTED, AWL, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE,T_REMOTE_IMAGE autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on integrity.niometrics.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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" > On 13 Apr 2020, at 11:14 PM, Andrew Rybchenko = wrote: >=20 > On 4/13/20 5:58 PM, Christos Ricudis wrote: >> Fixes the case where a PCI device string identifier contains = non-ASCII UTF-8. >>=20 >> A particular example is Mellanox Connext-X 5 EN MT27800: >>=20 >> 28:00.0 Ethernet controller: Mellanox Technologies MT27800 Family = [ConnectX-5] >> Subsystem: Mellanox Technologies ConnectX=C2=AE-5 EN network = interface card, 100GbE single-port QSFP28, PCIe3.0 x16, tall bracket; = MCX515A-CCAT >>=20 >> Signed-off-by: Christos Ricudis >> --- >> usertools/dpdk-devbind.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> 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 =3D {} >> else: >> - name, value =3D dev_line.decode().split("\t", 1) >> + name, value =3D dev_line.decode("utf8").split("\t", 1) >> value_list =3D value.rsplit(' ', 1) >> if len(value_list) > 1: >> # String stored in _str >>=20 >=20 >=20 > Is similar fix required in line 214 as well? >=20 > name, value =3D line.decode('utf-8').split("\t", 1) Apparently yes, though the above patch was enough to fix our usage of = dpdk-devbind.=20 Same string appears in output of lspci -vmmks. I will update the patch = and resubmit.=20 Thanks for your help! $ lspci -vmmks 28:00.0 Slot: 28:00.0 Class: Ethernet controller Vendor: Mellanox Technologies Device: MT27800 Family [ConnectX-5] SVendor: Mellanox Technologies SDevice: ConnectX=C2=AE-5 EN network interface card, 100GbE = single-port QSFP28, PCIe3.0 x16, tall bracket; MCX515A-CCAT PhySlot: 2 Driver: mlx5_core Module: mlx5_core NUMANode: 0 Christos Rikoudis Senior Software Engineer Mail: ricudis@niometrics.com | Mobile: +65 9893 3659 | Office: +65 6396 = 9159 | Fax: +65 6396 7908 Niometrics Pte. Ltd. (Reg. No. 200909012M) | 600 North Bridge Road, = #12-04, Parkview Square, Singapore 188778 niometrics.com We support email encryption via GPG suite CONFIDENTIALITY NOTICE: This message (including any attachments) is = confidential and may be privileged. It may be read, copied and used only = by the intended recipient. If you have received it in error please = contact the sender (by return email) immediately and delete this = message. Any unauthorised use or dissemination of this message in whole = or in parts is strictly prohibited. DISCLAIMER: The information contained in this email, attachment, = document and/or presentation have been researched by us with due care = and all and any evaluations or assessments stated herein represent our = personal opinions. We advise you that some of the available information = may not have been independently verified and may be based on statements = by third persons. No representation or warranty, expressed or implied, = is made as to, and no reliance should be placed on, the fairness, = accuracy, completeness or correctness of this information or opinions = contained herein. Certain statements contained herein may be statements = of future expectations and other forward-looking statements that are = based on our current personal views and assumptions and involve known = and unknown risks and uncertainties that cause actual results, = performance or events to differ materially from those expressed or = implied in such statements. None of our team shall assume any liability = whatsoever (in negligence or otherwise) for any loss howsoever arising = from any use of this email, attachment and/or presentation or the = statements contained herein as to unverified third person statements, = any statements of future expectations and other forward-looking = statements, or the fairness, accuracy, completeness or correctness of = statements contained herein, or otherwise arising in connection with = this email, attachment, document and/or presentation.