From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kamil Rytarowski Subject: Re: [PATCH v3 2/2] eal/linux: Add support for handling built-in kernel modules Date: Tue, 8 Dec 2015 14:08:01 +0100 Message-ID: <5666D631.2000305@caviumnetworks.com> References: <1449507460-32038-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <1449513365-22282-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <1449513365-22282-2-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <20151207125524.1095237c@xeon-e3> <566685E3.50902@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Panu Matilainen , Stephen Hemminger , Kamil Rytarowski Return-path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0083.outbound.protection.outlook.com [65.55.169.83]) by dpdk.org (Postfix) with ESMTP id F2E043195 for ; Tue, 8 Dec 2015 14:08:16 +0100 (CET) In-Reply-To: <566685E3.50902@redhat.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" W dniu 08.12.2015 o 08:25, Panu Matilainen pisze: > On 12/07/2015 10:55 PM, Stephen Hemminger wrote: >> On Mon, 7 Dec 2015 19:36:05 +0100 >> Kamil Rytarowski wrote: >> >>> + /* Check if there is sysfs mounted */ >>> + if (stat("/sys/module", &st) != 0) { >>> + RTE_LOG(DEBUG, EAL, "Open /sys/module failed: %s\n", >>> + strerror(errno)); >>> return -1; >>> } >> >> This check is useless. >> If /sys/module does not exist then /sys/module/XXX won't exist either. > > Yes, but non-mounted sysfs is an error whereas /sys/module/XXX is > merely an existence test, and the current sole caller in > pci_vfio_enable() even bothers checking for the difference. So its > perhaps a bit academic but its not incorrect. > > At any rate, the debug messages are incorrect/misleading. It's > certainly not trying to *open* these directories so it should not > claim to do so. > Yes, this check is to determine whether there is sysfs mounted. It's different than checking if there is a module loaded. This seems academical, but it retains the original behavior. I will try to improve the logging. > - Panu - > > >