From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0053.outbound.protection.outlook.com [65.55.169.53]) by dpdk.org (Postfix) with ESMTP id 5F4025A32 for ; Tue, 19 Jan 2016 17:35:16 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kamil.Rytarowski@caviumnetworks.com; Received: from localhost.localdomain (80.82.22.190) by CY1PR07MB1447.namprd07.prod.outlook.com (10.161.167.145) with Microsoft SMTP Server (TLS) id 15.1.365.19; Tue, 19 Jan 2016 16:35:13 +0000 To: Yuanhan Liu , Kamil Rytarowski References: <1449588833-485-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <1449667198-27218-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <20160118142125.GD19531@yliu-dev.sh.intel.com> From: Kamil Rytarowski Message-ID: <569E65B3.3080000@caviumnetworks.com> Date: Tue, 19 Jan 2016 17:34:59 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160118142125.GD19531@yliu-dev.sh.intel.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [80.82.22.190] X-ClientProxiedBy: HE1PR02CA0002.eurprd02.prod.outlook.com (25.162.33.12) To CY1PR07MB1447.namprd07.prod.outlook.com (25.161.167.145) X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1447; 2:mVpzq6rAK4cVU31DPvWANgki2UbZonnlZU7FBrEje0HFf1O2kJzr35XjCA3O8W7Wr3vJhIS55qb6VaP6bMTa3kvWuDxGRU4pH+CmG7uZlQZivO3bZwvnQDqNQcFLWejbAfJgj0rDT4JePUk9XeHVKg==; 3:hbw8dZQvGd4Cx4ixQQJ9dhPRUUNaQCi5PJm2NWNzj06FztC7hEHnX2/IP7ogbEIR3ksH/cMsNnToV/PdhtOc8nNpxCupTioEwg4FFP+g2WFJsRiZHnnWy9LKdKZBXhuz; 25:xn1Nw4KlHkwdMoSA5rhrynEOkeX1TnJMYwIC1rBvEtVPP6vSVYIySdoY0k41V8r9i6zYA6rtzKsZXngZcMDXBuaw65NL7Pp1ZDGHXrMH+4vNTC51IPuNvCvFPJONDD/oUz5tm0zoK/9srKyG3k1EuoC8jnwVINQTNLrzeo+BDveBRzbkZ9bkGBwbFg5b878WCUgTeXwyijV+wipxhvAMPwhlhabyQfqDLsQb85XsTJJq++f/qMbeI16MHtpik8me X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR07MB1447; X-MS-Office365-Filtering-Correlation-Id: d8ae5f5d-976c-4dce-7767-08d320ee81e9 X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1447; 20:Fp7qsFt0tr89XQ6jmZ096svI2l5YAHkzZTs2E3cq3VEmF83oBAZxm8wG7NX2BOySE4SbI9XiColBQISuMWrL3la8YpBap5xjlOwzikk8K+/QyKdkIkQ46hJX0epwSmgXJqwjGLGTYRbYwFVbXDP5twTVHb1iZkeT4XQt/PDrO3L5mdEx3pu8Gjvxh/73WLRpsKAQlwbpO4gJj8XgSpbjM2ZpobVRuFhoMHJBDPpnq0gm6JgkA7kJAockSgA7L2kiCh2+Pso0MBEIBwKDAx86n7GJm7jm0gvLoHdBVW37xKsbFZ6RS2k4AhaO8q2xoOhKBUPlp5nKGXZQI9KmvDLfph04/45POe1dkkwyt62IN2u3meRhm09/zfR+yLHLCEm4lnC+0sQtiYfm6ZzWakmotbFnKfIDVFK9E5vYkSb8R+lreenRIAaUvow5Nt11lGsAzD+EZU1PfatAHrfTBkHWOSjOQ6CUkHccLecRWVsuC95FiqTzLEVuZJWuJ2TdzveyTmUNf4+HjgdYxMTrNRZMhRkcDJyDcSrdrzvxksnI4eAHpFhv8oamC99Pq8rnuSAOCDsg4HJDPA5eBeI7wTdyc+a7w9swkoX0yF2qHOgmnjQ= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:CY1PR07MB1447; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB1447; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1447; 4:Pfk399gf6S1yZF8XwvDyxIH+FMz2N0UVpHo13YI1MKBjR1IiV2mxphbcdph7S/022ewaDkHBkze53ePeSeu7JEwojWs8p7k9lDJ/79ENHc1+VRcwYmzfWphJGrmSYdH2PE05BXKVPn+7CrSHqFhYdfDmMtn6KXs4Sf8CA4UwYKhOlOTYAbGKT/UifcEI3JPDMtjUvy2wntJTp3HNVei22nsO/HhD1WiXiWIMwM+RkE+p8E06bv38tCKOve6A3QEsuik0TwWLMa4ZmKooOEB+iPU8eDkQEQJXTovxgOuP9lHDNnibrXrfA0n5VyzxZjMmqEQfjla0jDZ2X4oKXUKAiuYZc4lwX5jPEU7f/nAvULcFELE4+3OOgh7RxTc+8p95 X-Forefront-PRVS: 0826B2F01B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(24454002)(189002)(199003)(4001350100001)(97736004)(83506001)(42186005)(4001450100002)(87976001)(101416001)(5001960100002)(50466002)(5008740100001)(5004730100002)(19580395003)(65816999)(230700001)(50986999)(2950100001)(23746002)(59896002)(76176999)(19580405001)(80316001)(87266999)(54356999)(105586002)(81156007)(586003)(189998001)(36756003)(5001770100001)(4326007)(106356001)(3846002)(66066001)(2906002)(6116002)(77096005)(47776003)(65956001)(40100003)(1096002)(33656002)(92566002)(65806001)(64126003)(122386002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB1447; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR07MB1447; 23:7h72EjhMe0gxjnneCagHV2mWYtzyysRrkB8JD?= =?Windows-1252?Q?SGfteS6d55Q7F4nf/CD01YYOoBvCZdP8X+lx74aK/Zmv9d3sBAzAvWs6?= =?Windows-1252?Q?OGkQ1y85a2oPR6FLxipqcXzMcjMIY9zcMfj/L0XC1DwLDzRp4IAeheSt?= =?Windows-1252?Q?TgkQCyH1fv1/XVGYorIun476bivyrQvHRJ3bkHbz+Rh8hMsGYE+d9fTF?= =?Windows-1252?Q?TcEvhARhhR6sL/yrVJY0Qcov6xmGgxk/IUdgHmBHFiTAvulZLSXo7KqJ?= =?Windows-1252?Q?ITs3OwqAYbBCyqOO5iD12hp56IIdMlRajpmB5knF6f1M/pMFVaPJc/kP?= =?Windows-1252?Q?QONnjQc2NUtSoCTgSnh5iKicWzKLAUFCGxIfB7GcexFHHM4QwKK2qQRG?= =?Windows-1252?Q?Mioy50t81P+LWKnYzoJBfqRHrDdk1oDhHC9aHB3kUSbgqGwnupZAMUKX?= =?Windows-1252?Q?pF6B+EJQKnG3wmPLmnO3RBIeXrLOtNlCLUzmugRQ9lQtYZM7xfh0hve9?= =?Windows-1252?Q?tABqaoqjDVuSI813JLRHOzkJFEsC+VkD1P3mNFwhNFrlLLgaZS2Sba7D?= =?Windows-1252?Q?HMZc+zcg42Gwp+cgsketjO63hvQXzIYgDbt2yeNSxfBljNN5cfjjnPvE?= =?Windows-1252?Q?JH/ixAcqMeMk6gNN3raTBY4crRevnHIXPD0u8FJSPHLTXM2alSJ+IhJ+?= =?Windows-1252?Q?pNChE7dNnaHdVUIoY0y7pxXVTVYk3KH91rvMddnItEZaPnyFPVJghSQV?= =?Windows-1252?Q?aSlhe1YwXUDUIIUGpc2VSj7u2vc2ndvKouJyhB+OmAWuIqfE56tdCpfd?= =?Windows-1252?Q?TkSgOhai/ZW2Xz/2AW9oleqM7hIxYEOKzCB8U2o5X9PdDPy1GNpb7cQ/?= =?Windows-1252?Q?LeN22cNEHYetn8Qs0zN5L6fLdbm9GtknLsajzsUse2D0Fy50XN8koN2t?= =?Windows-1252?Q?wY6uS8tCO+X03+nN6dPPFkZift2hzwNMp91r4ZXBX0VG2buyZzgp8fFQ?= =?Windows-1252?Q?UvAx/wQGb9NhNU+VqTOY5TOS6YoRU0hgThtqVIjsPI5BLIeqLRA8Blem?= =?Windows-1252?Q?wNfS4fEu/nztg0IVN8/G2U95rPVxSzBy1Mrh7K+zuqfGrCvze6JFx18c?= =?Windows-1252?Q?j9hsGNNexiHfvGlFlf8sRrEWu6D6xkyuiUE8Gszaao6GrAsnkzcxi/E5?= =?Windows-1252?Q?AZqsuuh4Kns2KlBwNwqm85uT7tMLD/odeIcBMzogWKAOLTluOXHViEM1?= =?Windows-1252?Q?aWP4sFuxhxe/cJPUIto53F8ArB8vLidj8Wt2LiL0jXDLRCBbtkIWy7yB?= =?Windows-1252?Q?mShYVVkivuyJt3a0B+uHeVelks9r9MhKBjPH7yrkQGO+jISfk6cPQRFv?= =?Windows-1252?Q?dL8YHyRWstPx5FEYD2bi+7Z94FGNqRsLjFjuVeKoeDEQebWK5tYpbE?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1447; 5:wCNReA6ZDzM2JhnLrYKwBNQ1yO+A94E6XaU8HluX9Fg6BSp+zOLdtIiWumjjKuXeIwS/oltO106lra/2Apjj+dXKfqHx6j6GlCprrcDEj70lA7Cw6asQY5DRT9bXnMrt4E1k9mDb/LeXDbiBbr6WuA==; 24:XRFDACGb7T6u12jwCNs7K6Z9OkPyCP235HzYEBmSoMQKD/5HH2qS8219I5SeRG+dAjbUmuMxE1X9L5Wl+eV2fpGoPNX60jQ1yLWOIGsUJQY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2016 16:35:13.2300 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB1447 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 1/2] tools: Add support for handling built-in kernel modules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 16:35:16 -0000 Thank you, I will submit improved version as v6. W dniu 18.01.2016 o 15:21, Yuanhan Liu pisze: > Hi Kamil, > > First of all, sorry for no one has reviewed your patches for over one > month! You may want to ping more often (say, per week) next time if it > still happenes :) > > Another thing is that there is no maintainer for tools code. > > On Wed, Dec 09, 2015 at 02:19:57PM +0100, Kamil Rytarowski wrote: >> Currently dpdk_nic_bind.py detects Linux kernel modules via reading >> /proc/modules. Built-in ones aren't listed there and therefore they are not >> being found by the script. >> >> Add support for checking built-in modules with parsing the sysfs files. >> >> This commit obsoletes the /proc/modules parsing approach. >> >> Signed-off-by: Kamil Rytarowski >> Signed-off-by: David Marchand >> --- >> tools/dpdk_nic_bind.py | 27 +++++++++++++++++---------- >> 1 file changed, 17 insertions(+), 10 deletions(-) >> >> diff --git a/tools/dpdk_nic_bind.py b/tools/dpdk_nic_bind.py >> index f02454e..e161062 100755 >> --- a/tools/dpdk_nic_bind.py >> +++ b/tools/dpdk_nic_bind.py >> @@ -156,22 +156,29 @@ def check_modules(): >> '''Checks that igb_uio is loaded''' >> global dpdk_drivers >> >> - fd = file("/proc/modules") >> - loaded_mods = fd.readlines() >> - fd.close() >> - >> # list of supported modules >> mods = [{"Name" : driver, "Found" : False} for driver in dpdk_drivers] >> >> # first check if module is loaded >> - for line in loaded_mods: >> + try: >> + # Get list of syfs modules, some of them might be builtin and merge with mods >> + sysfs_path = '/sys/module/' >> + >> + # Get the list of directories in sysfs_path >> + sysfs_mods = [os.path.join(sysfs_path,o) for o in os.listdir(sysfs_path) if os.path.isdir(os.path.join(sysfs_path,o))] > Minor nit: it's quite a long line; you may need break it. And space is > needed after ','. > > Otherwise, this patch looks good to me. > > --yliu