From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id B89E55920 for ; Mon, 1 May 2017 18:29:22 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 549EE2083F; Mon, 1 May 2017 12:29:22 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 01 May 2017 12:29:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=2TCFdJ/Rk+1fhb2 LOkOKV4yYW67p3RCsuWWdTxHOSmU=; b=FUE27V07URnfHKGNSBygFHKs9LjC/z2 oB4s9jsZsZ0qQh+K96+xRDByFH0nfIfHRrQnP5p1xyWs/L+EGWuC0Kfyfe+Ui46M snZENfDIslu0Zn6dez6tj64N9o5yxAtHwqQ7gslaQnn8Oes9u3ZjWxy5mXH+w3a/ u8DF9WrtUROk= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=2TCFdJ/Rk+1fhb2LOkOKV4yYW67p3RCsuWWdTxHOSmU=; b=DKvcGQS5 OGAp2SSogX6DNkmwBG8/L+Dhg3cjyB5YpVVWUyV/yFXZ8es9Y1JCgOb70GHNoCcc YPI3A80aBWgRa1cV2M7aGjBkkR5Zi+KGzM0/VmUWVd7FH49KlEfac5ZW+/Ua92Vr ePe/LsKkMHxYBmhnvUEZFDwFCzHk5WW5vTXfRDXZKi+Ixs7LcHULNRWDYU+RkpMB NuM04KavrMNfUkgVWs9kusL8UGBZ2LE6oiIMczPCUBoSJ6xBmPnm5LDITunBEuyy cS9SbJWgYL8auNEavmVh9SeZ2a5R3kfk4JSthXK9x511KOsyCw0sbCHcfjP04gCa 4bsxSBv81qUd2w== X-ME-Sender: X-Sasl-enc: +G/MJq51ZUhEhzeBxUPrvXvbUsLH31tslUs2AT9t1+aR 1493656161 Received: from xps.localnet (55.17.136.77.rev.sfr.net [77.136.17.55]) by mail.messagingengine.com (Postfix) with ESMTPA id E3700248B4; Mon, 1 May 2017 12:29:21 -0400 (EDT) From: Thomas Monjalon To: Mark Asselstine Cc: alloc , dev@dpdk.org, "Wang, Weiwei" Date: Mon, 01 May 2017 18:29:18 +0200 Message-ID: <2030753.g6EQP89X4l@xps> In-Reply-To: <4627597.6XQZM4AtIa@yow-masselst-lx1> References: <24c64816-8084-b5fd-0b10-3db3143500ec@windriver.com> <1959888.bZH0xSPdBI@yow-masselst-lx1> <4627597.6XQZM4AtIa@yow-masselst-lx1> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] tools/dpdkdevbind.py: remove call to lower case for mod path 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: , X-List-Received-Date: Mon, 01 May 2017 16:29:23 -0000 01/05/2017 17:33, Mark Asselstine: > On Monday, May 1, 2017 11:24:13 AM EDT Mark Asselstine wrote: > > On Friday, April 28, 2017 11:38:17 AM EDT Thomas Monjalon wrote: > > > 25/11/2016 04:16, alloc: > > > > If the module path has upper case chars, the dpdk-devbind.py script will > > > > crunch them to lower case. This will result in the script never > > > > finding a module. > > > > > > I wonder why this "lower" was done. > > > I'm afraid we are missing something. > > > Nobody else is complaining about this issue. > > > Please confirm it is a real issue. > > > > The commit (d6537e6a7432ea9cf39fc4ab2112d4bce0e9fe57) that brought in the > > lower() call does not document any specific reason for its inclusion. So > > unfortunalely we can't rely on historic wisdom to rule out this change. > > > > We can however look at the source to determine that the lower() call is > > bogus. > > > > --- usertools/dpdk-devbind.py --- > > # check using depmod > > try: > > depmod_out = check_output(["modinfo", "-n", mod], > > stderr=subprocess.STDOUT).lower() > > if "error" not in depmod_out: > > Actually, looking at this I can see only one reason for the lower(), and that > is to catch 'ERROR vs. Error vs. error vs. ...". Yes it is exactly what I was thinking. > So Alloc can you make an > additionaly change and in the line above change it to: > > if "error" not in depmod_out.lower(): Good suggestion. > That should address any concerns. Of course this still leaves a corner case of > 'error' being in the path, but the place this would exist would be in the > kernel version and extra-version and I doubt many folks put 'error' in there. > > Mark > > > path = depmod_out.strip() > > if exists(path): > > return path > > except: # if modinfo can't find module, it fails, so continue > > pass > > --- > > From this we know that depmod_out will have the lowercase version of the > > path to the module. We also know that exists() is case sensitive and > > therein lies the issue. Since the path to the module will include kernel > > attributes the only reason folks may not be seeing this issue as that the > > attributes are only numbers, periods and lowercase alpha chars. Add a singe > > upper alpha char in the kernel extended name and users will have this > > issue, as we have seen it. Which kernel module has an upper case character? > > Can Alloc improve the commit log to make this clear, sure. But the change is > > good and should be merged. It seems Alloc is not his real name? Please use your real name for SoB (Chunguang Yang?).