From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id ADF988E90 for ; Mon, 23 Nov 2015 12:42:13 +0100 (CET) Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 773865D; Mon, 23 Nov 2015 11:42:12 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-4-70.ams2.redhat.com [10.36.4.70]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tANBgAIE021950; Mon, 23 Nov 2015 06:42:11 -0500 To: Thomas Monjalon References: <923ebe527219fa16ca91e74b416b978803056d70.1447829123.git.pmatilai@redhat.com> <5652AC5A.4080005@redhat.com> <5046573.RFcWRsU8GT@xps13> From: Panu Matilainen Message-ID: <5652FB92.2050107@redhat.com> Date: Mon, 23 Nov 2015 13:42:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5046573.RFcWRsU8GT@xps13> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] eal: fix plugindir processing to be filesystem agnostic 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: Mon, 23 Nov 2015 11:42:13 -0000 On 11/23/2015 12:41 PM, Thomas Monjalon wrote: > Hi Panu, > > 2015-11-23 08:04, Panu Matilainen: >> On 11/20/2015 06:38 PM, David Marchand wrote: >>> It looks like you would skip the symbolic links while you were not before. >>> Intended ? >> >> Intended. We want to accept symlinks in the driver directory, but the >> actual drivers are always regular files. > > No we use symbolic links: > http://dpdk.org/browse/dpdk/commit/mk/rte.lib.mk?id=133b75923 > http://dpdk.org/browse/dpdk/tree/mk/rte.lib.mk#n170 Those symlinks eventually point to the actual drivers which are always regular files (and not for example directories), that is the point. Please apply. > > On the same topic, you've added a check in 9f8eb1d9: > + if (stat(solib->name, &sb) == -1) { > + RTE_LOG(ERR, EAL, "Invalid plugin specified: %s: %s\n", > + solib->name, strerror(errno)); > > It is a regression because we cannot anymore load a plugin from > LD_LIBRARY_PATH without specifying its full path. > It can be tested with scripts/test-null.sh. > How do you suggest to fix it? My first and foremost thought is regret over messing with -d at all, instead of keeping with the original plan of a new -D option for directories. Supporting directories with -d opened up all these annoying little issues that did not exist in the original plan, and lost the ability to disable/override the default plugindir. I suppose the fix is to only use a successful stat to determine if something is a directory and feed everything else to dlopen() which will then fail on its own if file is not existent. I'll send a separate patch for the regression. - Panu - > Thanks >