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 D76D9FFA for ; Tue, 8 Dec 2015 08:25:25 +0100 (CET) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 3F1498EFFA; Tue, 8 Dec 2015 07:25:25 +0000 (UTC) Received: from sopuli.koti.laiskiainen.org (vpn1-5-22.ams2.redhat.com [10.36.5.22]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB87PNe3018200; Tue, 8 Dec 2015 02:25:24 -0500 To: Stephen Hemminger , Kamil Rytarowski 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> From: Panu Matilainen Message-ID: <566685E3.50902@redhat.com> Date: Tue, 8 Dec 2015 09:25:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20151207125524.1095237c@xeon-e3> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3 2/2] eal/linux: 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, 08 Dec 2015 07:25:26 -0000 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. - Panu -