From mboxrd@z Thu Jan 1 00:00:00 1970 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) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kamil.Rytarowski@caviumnetworks.com; Received: from localhost.localdomain (80.82.22.190) by CY1PR07MB1448.namprd07.prod.outlook.com (10.161.167.146) with Microsoft SMTP Server (TLS) id 15.1.337.19; Tue, 8 Dec 2015 13:08:14 +0000 To: Panu Matilainen , 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> <566685E3.50902@redhat.com> From: Kamil Rytarowski Message-ID: <5666D631.2000305@caviumnetworks.com> Date: Tue, 8 Dec 2015 14:08:01 +0100 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: <566685E3.50902@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [80.82.22.190] X-ClientProxiedBy: AM3PR08CA0036.eurprd08.prod.outlook.com (25.160.207.174) To CY1PR07MB1448.namprd07.prod.outlook.com (25.161.167.146) X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1448; 2:+gyXpslZBSf15BTH5LULr+uJ1SXwT3x9sTKn44GGFzXDMKElh9KHXGyPYVdM1/pfOpIeyu02KvRcYM6iajCxOJYQ902KRNxeVBY1mtH1chSe6iknQTbnBwuP0WymwB2bo2Jev2yNmwYyeVvbiuqu1A==; 3:lmiWTmP/xFO1IwkX0deoVuUg5+tdfWmY+imrEVk0+cIs12s5argToh0LluBsbl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ispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(3002001)(10201501046); SRVR:CY1PR07MB1448; BCL:0; PCL:0; RULEID:; SRVR:CY1PR07MB1448; X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1448; 4:GBpuTo8vlHtuLe/8lE+u/pdQlOD7WfbSN6oXzMNClw66gmQYUo/2zJKw4vE6OVjG0rA7JUm4cT5W1lhwFtZ7JYMalgcpCWfuQL8BAR2e5FHleeCWSy0YL/bjxEkX8//7FWCXx4hTu9gZoByRkaXHi2IvpCISbk3ENtvy7ppb2KO798Kr4CJKWkxCudWinXR27zThBSF976VvppKzHPrQy1/xEV/JkHy5kK77vwvPGtWdt6hU5+EWy5duaqyb4U4kXJB6b9bAQoj1Z7MRbIqNWD7UjfXyWoEmgQ93ZbKkqQLy8ovQsx8sQb5t3lLYLWz4REwGd+dZia8VBqIvJleXd8XBPE81pdg0VpXIAuL30MwuRZphbOBMLHjb34/1RWSpqtIWfh365mYvu3kGcp9UqOzyc3PXb2sVgyAcI6pmFBoiEznsfvd/ABXKGbvusakb X-Forefront-PRVS: 0784C803FD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(6069001)(6009001)(479174004)(124014002)(377454003)(24454002)(189002)(199003)(76176999)(6116002)(5001960100002)(40100003)(4001450100002)(66066001)(65956001)(122386002)(59896002)(65806001)(36756003)(93886004)(81156007)(2950100001)(65816999)(87976001)(50466002)(83506001)(47776003)(64126003)(97736004)(5001770100001)(189998001)(50986999)(4001350100001)(77096005)(101416001)(87266999)(54356999)(106356001)(42186005)(105586002)(586003)(23676002)(92566002)(19580395003)(1096002)(5004730100002)(230700001)(19580405001)(80316001)(33656002)(5008740100001)(3846002)(7099028)(21314002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR07MB1448; 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: =?utf-8?B?MTtDWTFQUjA3TUIxNDQ4OzIzOnJ6d3lZczR3RkFFak5pbkJLWE5GK0J5cmdV?= =?utf-8?B?M1lZUnJvQ0laM2NxbDNTNHRiYnZ5a0Y3aStJdU1oNjdYRG5pZFhqMFJGV3d6?= =?utf-8?B?UkpEZXFneUw4Wm9jRTEyd0h2K3crRDI4Z0VHOHFCNHgycWtIaXhCU3ordy9M?= =?utf-8?B?VklWWlFKN1lSVW1xcXRhbnpYQmpWai9Kdk1kMVFGd1gvcndIR085ODRRSjRQ?= =?utf-8?B?RWdiUi9yNWoyM2RrSkcvbkxCeUswZDY2VUJReWdxU0s1VVFReVJlVnRSNnBW?= =?utf-8?B?SWtBelB3NFVCcXQraWhxTGtyWDZIQ0FPQmttQ0hkb3ZBOHlTN1BMN1RyRTc5?= =?utf-8?B?aFMrNkJVOGZiWXhGYTMzbnorYXh1OXZOYStyUnhpQTloTDNlZHJZOStRZ1NE?= =?utf-8?B?Y2xvWVdkeURwaWdTTTVtOVR0WnNEdWtjZFFOV2RUd25ac0ovT0U1ajNMUEZP?= =?utf-8?B?R1kyWGlyMmpDeCtvbkMwbitHdlVsU0RCM2hjSHhzNjdLOTJZMENvV05tUmlD?= =?utf-8?B?Z2pxZDliMkdiV3o3ajFBS0pyaEtzUytOaWMxc3FiUFF1YmFzR1JPeFVKMG1P?= =?utf-8?B?VEI3ak4wZVYxRU5Gbjg4Rmh4enlQdFk4TGtKU0txaDJ4OEZ3RGl4ZzBmaWo1?= =?utf-8?B?cSthK0hIaW92NUdDbjFZanlsQjBUQ0dUWG01TmgwUDJFdlJCRXR1U21xQTdY?= =?utf-8?B?bGY3OExIdW5KWmwzaUxBdmxySWw3aGlkT0NGWml5ZVdUWlJzTlRWN2RESEVo?= =?utf-8?B?ejZoVzZ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zZ2YW5zRE9E?= =?utf-8?B?MXpNUEs5NDVQSkJVRVdKbFk5WFg1Y2pKT0FWeUtwS1NrWTBPcStzQUlmQnpH?= =?utf-8?B?NDNRcDNxOEJhUVJtdlNkdURHa3JzRWYvRGZ6OExYVWw4WDF0Zy9pS3pHRldh?= =?utf-8?B?NnNUcVZnK2pMRUUrS1UwU2pGL1JnbHZvWkU2RSsvSTNOUlJwdEVodnEzY0V2?= =?utf-8?B?VTBpdDlPWjI1TldLd2ltU0xpZEYrWHFRdnFDbXczTWpEd3RLUDMyMklLc1lv?= =?utf-8?B?a1lkL1g4NFh5NUIzdjhBMDZFL09qUVA3di9oV21BcHpwTXM2N3hpMmRFclIv?= =?utf-8?B?TEpxNWVJd3M0d09MSVpXQUdZMW1uRDBGUGNWQT09?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR07MB1448; 5:WPR2mVs0GD1FABVCNKfEfB8+EGd0NqBbkfmYPTriO2DetQAWqd/iciqFaUjuIozfWcZUd/7g0/DRBUdN9Qdr+CV/7sOi/Zq3qmTbTYoA+HRq0obefvx/qtwFd2GxQDTEfwA9tCvgaW5iYMiPm9RdCg==; 24:E82dM1dwl4hyFOQ4FIu7PkK+PO0KUgpS/P1Fv/klClbf39HPiGN3ylMSIFXGj2qBTrJJnoy5yll1y6OjlyNb4YaPhhluyCDy0nGACOeH00k= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2015 13:08:14.6294 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB1448 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 13:08:17 -0000 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 - > > >