Message ID | 1472822193-107410-1-git-send-email-gmussar@ciena.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Yuanhan Liu |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 253F53990; Fri, 2 Sep 2016 15:16:43 +0200 (CEST) Received: from mx0a-00103a01.pphosted.com (mx0a-00103a01.pphosted.com [67.231.144.234]) by dpdk.org (Postfix) with ESMTP id 8B2BF37B4 for <dev@dpdk.org>; Fri, 2 Sep 2016 15:16:41 +0200 (CEST) Received: from pps.filterd (m0000419.ppops.net [127.0.0.1]) by mx0a-00103a01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u82DDtRn008666 for <dev@dpdk.org>; Fri, 2 Sep 2016 09:16:40 -0400 Received: from mdwvexchht01.ciena.com (lin1-118-36-28.ciena.com [63.118.36.28]) by mx0a-00103a01.pphosted.com with ESMTP id 2579329qst-3 (version=TLSv1 cipher=AES128-SHA bits=128 verify=NOT) for <dev@dpdk.org>; Fri, 02 Sep 2016 09:16:40 -0400 Received: from MDWVEXCHHT02.ciena.com (10.4.156.176) by MDWVEXCHHT01.ciena.com (10.4.156.175) with Microsoft SMTP Server (TLS) id 8.3.389.2; Fri, 2 Sep 2016 09:16:37 -0400 Received: from MDVSMTP01.ciena.com (10.4.156.27) by mdwvexchht02.ciena.com (10.4.156.176) with Microsoft SMTP Server id 8.3.389.2; Fri, 2 Sep 2016 09:16:37 -0400 Received: from onx-gmussar-01.ciena.com ([10.176.103.193]) by MDVSMTP01.ciena.com with Microsoft SMTPSVC(7.0.6002.18222); Fri, 2 Sep 2016 09:16:37 -0400 From: Gary Mussar <gmussar@ciena.com> To: dev@dpdk.org CC: Gary Mussar <gmussar@ciena.com> Date: Fri, 2 Sep 2016 09:16:33 -0400 Message-ID: <1472822193-107410-1-git-send-email-gmussar@ciena.com> X-Mailer: git-send-email 2.1.1 X-OriginalArrivalTime: 02 Sep 2016 13:16:37.0134 (UTC) FILETIME=[3C04DAE0:01D2051C] MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-11.0.0.4179-8.000.1202-22550.007 X-TM-AS-Result: No--2.467900-8.000000-31 X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-09-02_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1609020176 Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Mussar, Gary
Sept. 2, 2016, 1:16 p.m. UTC
The dpdk-devbind.py script does not find/display the ifname for virtio interfaces since the "net" directory is not directly under the device directory but rather under a subdirectory. eg. > dpdk-devbind.py --status 0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused= This change searches for the first "net" directory under the device directory hierarchy. eg. 0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused= Fixes: 629395b063e8 ("igb_uio: remove PCI id table") Signed-off-by: Gary Mussar <gmussar@ciena.com> --- tools/dpdk-devbind.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
Comments
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar > Sent: Friday, September 2, 2016 2:17 PM > To: dev@dpdk.org > Cc: Gary Mussar <gmussar@ciena.com> > Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names > > The dpdk-devbind.py script does not find/display the ifname for virtio > interfaces since the "net" directory is not directly under the device > directory but rather under a subdirectory. > eg. > > dpdk-devbind.py --status > 0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused= > > This change searches for the first "net" directory under the device > directory hierarchy. > eg. > 0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused= > > Fixes: 629395b063e8 ("igb_uio: remove PCI id table") > > Signed-off-by: Gary Mussar <gmussar@ciena.com> Thanks for that. Note, the subject line should be lowercase but apart from that: Acked-by: John McNamara <john.mcnamara@intel.com>
I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/ Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master? Gary > -----Original Message----- > From: Mcnamara, John [mailto:john.mcnamara@intel.com] > Sent: Friday, September 02, 2016 11:24 AM > To: Mussar, Gary; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names > > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar > > Sent: Friday, September 2, 2016 2:17 PM > > To: dev@dpdk.org > > Cc: Gary Mussar <gmussar@ciena.com> > > Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface > > names > > > > The dpdk-devbind.py script does not find/display the ifname for virtio > > interfaces since the "net" directory is not directly under the device > > directory but rather under a subdirectory. > > eg. > > > dpdk-devbind.py --status > > 0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused= > > > > This change searches for the first "net" directory under the device > > directory hierarchy. > > eg. > > 0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused= > > > > Fixes: 629395b063e8 ("igb_uio: remove PCI id table") > > > > Signed-off-by: Gary Mussar <gmussar@ciena.com> > > Thanks for that. > > Note, the subject line should be lowercase but apart from that: > > Acked-by: John McNamara <john.mcnamara@intel.com> > >
2016-09-22 10:34, Mussar, Gary: > I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/ > > Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master? No, thanks Gary. It will be applied as soon as a lazy guy starts doing his work :)
On Thu, Sep 22, 2016 at 04:46:52PM +0200, Thomas Monjalon wrote: > 2016-09-22 10:34, Mussar, Gary: > > I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/ > > > > Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master? > > No, thanks Gary. > It will be applied as soon as a lazy guy starts doing his work :) Hmm., I just found this has been assinged to me in patchwork... Thomas, should I apply it to next-virtio tree, or you will apply it on yours? --yliu
2016-09-23 15:36, Yuanhan Liu: > On Thu, Sep 22, 2016 at 04:46:52PM +0200, Thomas Monjalon wrote: > > 2016-09-22 10:34, Mussar, Gary: > > > I am new at submitting patches to dpdk.org. This patch has been acked and patchwork claims success on build it: http://www.dpdk.org/dev/patchwork/patch/15595/ > > > > > > Other users state it has corrected their problems. Am I supposed to be doing something else with it before it gets applied to master? > > > > No, thanks Gary. > > It will be applied as soon as a lazy guy starts doing his work :) > > Hmm., I just found this has been assinged to me in patchwork... > > Thomas, should I apply it to next-virtio tree, or you will apply it on > yours? Oh sorry, I was thinking to apply it myself when reading Gary's mail. But yes, Yuanhan, you can handle it in the virtio tree. It will be faster if you bypass the lazy man ;)
On Fri, Sep 02, 2016 at 03:23:34PM +0000, Mcnamara, John wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Gary Mussar > > Sent: Friday, September 2, 2016 2:17 PM > > To: dev@dpdk.org > > Cc: Gary Mussar <gmussar@ciena.com> > > Subject: [dpdk-dev] [PATCH] Tools: Fix issue with virtio interface names > > > > The dpdk-devbind.py script does not find/display the ifname for virtio > > interfaces since the "net" directory is not directly under the device > > directory but rather under a subdirectory. > > eg. > > > dpdk-devbind.py --status > > 0000:00:03.0 'Virtio network device' if= drv=virtio-pci unused= > > > > This change searches for the first "net" directory under the device > > directory hierarchy. > > eg. > > 0000:00:03.0 'Virtio network device' if=ens3 drv=virtio-pci unused= > > > > Fixes: 629395b063e8 ("igb_uio: remove PCI id table") > > > > Signed-off-by: Gary Mussar <gmussar@ciena.com> > > Thanks for that. > > Note, the subject line should be lowercase but apart from that: Applied to dpdk-next-virtio, this this minor fix. And, it looks like a good candidate for stable release, so, stable@dpdk.org cc'ed. Thanks. --yliu > > Acked-by: John McNamara <john.mcnamara@intel.com> >
diff --git a/tools/dpdk-devbind.py b/tools/dpdk-devbind.py index b69ca2a..34be495 100755 --- a/tools/dpdk-devbind.py +++ b/tools/dpdk-devbind.py @@ -221,11 +221,12 @@ def get_pci_device_details(dev_id): name = name.strip(":") + "_str" device[name] = value # check for a unix interface name - sys_path = "/sys/bus/pci/devices/%s/net/" % dev_id - if exists(sys_path): - device["Interface"] = ",".join(os.listdir(sys_path)) - else: - device["Interface"] = "" + device["Interface"] = "" + for base, dirs, _ in os.walk("/sys/bus/pci/devices/%s/" % dev_id): + if "net" in dirs: + device["Interface"] = \ + ",".join(os.listdir(os.path.join(base, "net"))) + break # check if a port is used for ssh connection device["Ssh_if"] = False device["Active"] = ""