From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0100.outbound.protection.outlook.com [207.46.100.100]) by dpdk.org (Postfix) with ESMTP id A84233195 for ; Wed, 9 Dec 2015 17:46:04 +0100 (CET) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Kamil.Rytarowski@caviumnetworks.com; Received: from localhost.localdomain (80.82.22.190) by DM2PR07MB1450.namprd07.prod.outlook.com (10.161.139.144) with Microsoft SMTP Server (TLS) id 15.1.355.16; Wed, 9 Dec 2015 16:46:01 +0000 To: Stephen Hemminger References: <1449588833-485-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <1449667198-27218-1-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <1449667198-27218-2-git-send-email-Kamil.Rytarowski@caviumnetworks.com> <20151209083858.6e812d0a@xeon-e3> From: Kamil Rytarowski Message-ID: <56685ABC.9060803@caviumnetworks.com> Date: Wed, 9 Dec 2015 17:45:48 +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: <20151209083858.6e812d0a@xeon-e3> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [80.82.22.190] X-ClientProxiedBy: VI1PR07CA0084.eurprd07.prod.outlook.com (25.164.94.180) To DM2PR07MB1450.namprd07.prod.outlook.com (25.161.139.144) X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB1450; 2:ter78rgod4YJuyliwfJI9q5RYXMfhW4VPhKTZCCo64hUM3p0ESO3nkkHT/7Jsgj9vpIvd8ZpgEVkhu1CBqFf78Gi6A29LOjE6iYmkQbecwngCuBK6PnzMm/76SSc35SsPayRPsz87WbuwpKfbuvIBQ==; 3:QGSFmnWsoZW2wRLxwEg4E3pmC5d9PArolkjXGWe4ARNvdol0radLoQU779YfRHLpkbrzvfcPDOqltDXsjgqY1PFaWuiIWiyfLNLebCt8Vzb4bYmYPkHPmjCRLiYZw3K9; 25:ONOKiuCW9ZV4S6IxlsWgTNqX7QCZraA7TVksE6+gNmXFf9h6rcdm7VwbhHtIWWmjsdX8rwAsRqpMvXB0EK2tks/VhW7/R2DokLVssT7d361MEmYEiAvwtI76qmtSQJyIXHvnSmfPlGqy2WX6aLNZcUGq5lPedI5Ea0N6GuBCFcEFYN6Fbww3vI+bxxB7kaLI/SdQnm1KQ9ta0lULn+q5gwUa+tWTTkRk0m4uNCk2bBWLHuslA4GjBV4W8cyx9DOk X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR07MB1450; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB1450; 20:+QbIiz3pp9HXtGfXTrANLf3Jsmi4usRx+3JOw3HN5ftOmdOWSFJ85xEioVSFbYwqExAYyXxTfDoduW4oYylpv7k1bKH2iQeIlQEVbV/gRmedoLXfjYS723MEWp4022alZcumFcbuYFeMjvMp3QOaYvaoWJF3gBymNc+HlqzIlttpRrcCGIdTNoljBaijzC4q+iMXYaCBg4dbGkvCuPvFmtPjRwIWuQG9d99dhWQdVNQSkJHZ5xb1S9753FLuNc1dh4ZtgYK1U9L/8dXUdVX0wdIUkEbz2mIh967h00C7n/39O82qIeZ8EisO5MI6OQmAEQKV1DIa2wc4qJVSkPTRdiDAOiJz1GvAtA6ZvqfsPblFA4dTcFPOWN9PNukx2kXc1Ieg0/yMzpUtWx59tSHaG7SBSU0n9kJLXB8fySTCPv0FhV3G3drulGXuZQBvvNRa/w7cJs/Kytpf87ZzOojHOgiMPijWnc++6HdeehjpICTuq3x2/tSYGfWScT6zOV8Hm8i1I4k3vOQLGKJQQbI35TK1sT0iWEE3SVlQfEGXcFVVWm86wxEj0hfgQmPHnE5ldCu0yJzBV4iIJLo3Ybd1f4dTjmGj/qXyVBeYWHkTEC8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236414709691187); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(10201501046)(3002001); SRVR:DM2PR07MB1450; BCL:0; PCL:0; RULEID:; SRVR:DM2PR07MB1450; X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB1450; 4:2zJ/WK8KADJ5c4f8ahCS90S34udEJFB2s/Pn+d/wKc1ijznhIp15Ais3VpL/XvEXjs49OhMKlNTltJUya1iNAVvNVo5ItvSeGMrhzp3LoSQQGV7ffnkuvkoXYP4EtOPQqpg7FHon4gO2mpxtGBt/KVaeCSwyvOtOnmdIa8DnRyltn3yxYCzvVFfFw0qsszkSUthsV/Hj6yMKs0tRuVhhaTSpNAgHJ5YrIgnqN2U6hHuG/us4Qo6Og9XQW5W6qhe+VDIci57o0I8yi7/cEpBOERdLcvHT+vISRAvowZCrET2kMzGXjqhoYhxcQbCwUuLPsz8a3M9FcCOZsGT/Pn6aEAMK4YEcW4GJLRHDH8JhCLRrsAeEFXi4guw5JY8E/GK0tjwyGlWHWqeN9hhNULGGGhzG71DgEoV6isZ9OAVJ/lk= X-Forefront-PRVS: 0785459C39 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(24454002)(199003)(189002)(586003)(3846002)(6116002)(50466002)(47776003)(1096002)(93886004)(19580395003)(19580405001)(80316001)(64126003)(87266999)(189998001)(54356999)(36756003)(5001960100002)(76176999)(50986999)(5004730100002)(42186005)(110136002)(97736004)(65816999)(99136001)(122386002)(40100003)(105586002)(23746002)(87976001)(33656002)(106356001)(59896002)(65806001)(230700001)(65956001)(5008740100001)(4001350100001)(81156007)(66066001)(92566002)(77096005)(101416001)(2950100001)(83506001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR07MB1450; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: caviumnetworks.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; DM2PR07MB1450; 23:XPMKmJDKfv1pOLOwuUqL7/O5UHaQLH2JUBJOj?= =?Windows-1252?Q?n6P0IgUvLK9BS7xHt76ftQ61WqKEsagzlbCuMI8seOyERUBVqK3vGP6G?= =?Windows-1252?Q?/Nzmrhhq4B9k9fsykfMXU9CbgnddMaNFyE3gDCjQ2/6f5b63q5QjoCxy?= =?Windows-1252?Q?fH5Mm5SgklFz2C4dMjQbMp4cTsmeaYv+X+zUz05H8YLQrU195hu/n/7v?= =?Windows-1252?Q?uNYHcgta6128L8Yx3hH2WYywgvytANQX8DMdcghRcR5EDfCaR3bdhC1z?= =?Windows-1252?Q?0V02tPLlUJqfxPwBVObVBdf7vdrddmI9ClDUTb1LwKgtPKUf0PSv6Z2g?= =?Windows-1252?Q?kNeMVRnK0eAT6KrW6uaKdlWuBEs3hfC1HrLX2bHPLgILxvVWEoqtLdlp?= =?Windows-1252?Q?UjVXgWoWVkuzB1IaBvFlgcMYXnOsxj0hw/X4rryW0Wt4lSSFAZzTYNlY?= =?Windows-1252?Q?CvJaVdbXDViHfcehxpv4/ONYem6foBvUeQPcIsktBzwxIDypeVu/kkDq?= =?Windows-1252?Q?gCeI4ayWsrUolXukY0+LK9waj4bcfUt9oi1buTkx/u8/kpnsEiTIR1+S?= =?Windows-1252?Q?3zMnmfQOO4XIrmA54whB9321/JhOQOQWOTObO2OV32VFr1ytVHyM3EOR?= =?Windows-1252?Q?LLGeAoJgEAgEXVUrB+NGJfka6OULxc1+CEtCJ95syaL9wjtf1nU5aLYG?= =?Windows-1252?Q?dH6ECObQVEfXYioUJBbOD/6fMlqDD4gKvwT7yjRYfoG7gIJZs7qlDe7Y?= =?Windows-1252?Q?8wnuY7DxULV7FsTvzVw4KsoEreDid95gVeC4PBTutiBXJt97ef3CsMu4?= =?Windows-1252?Q?AUHb20LoNpqQIXCznhf9ia9Sl6JUAGzLfDbkWKYwfTBeGM9aPvW4qtco?= =?Windows-1252?Q?ECIJ6V5ptsKaaFpWJAjppWFWzTPgB8y2FTW3Um8DgmSdyXNPj+IzFD0h?= =?Windows-1252?Q?BH/QC+2V2jNdlSsOSv/pg1KBw5YOfvEROoxNqZ+EYi/FNvi9MRotbf69?= =?Windows-1252?Q?lKpsT+3YyyKs69s/XBpA3cu614D5RpLzh//n0cvmv0bEb20eeVOU+a+Y?= =?Windows-1252?Q?P5SQdidbImvNPuyRhgt9/fob26neMW87gcEMXcQY593c8XUWanUso7PO?= =?Windows-1252?Q?4WYNthMYEAcLGDcXviGA0Yz2BwnHvxxjLLwyStvO0y9PmQog/9u6oWje?= =?Windows-1252?Q?80vS426vXhJS1T98vBEVgwc/M3zrvNx/L8rLRMlHCmAuDpQtshvzqPBU?= =?Windows-1252?Q?P0S5OS0WaFYMXAn1S0NHaennCuF5eq9X4A2qlDH60E3wfVvHC2uEd7Iy?= =?Windows-1252?Q?ee6hwX2MGBjSzUiY7k1+i9dKUAD8z5eZO8kN/Lp2lic+b1YNIX9NQ7Ak?= =?Windows-1252?Q?QHNk+jLPfzJ?= X-Microsoft-Exchange-Diagnostics: 1; DM2PR07MB1450; 5:CGCnh9ZzqRCA6/oT+kZBztNjnr9Zex1WagQTaDdhqXfAAnWl7hypJyAxidgVy1Y9QRuBvQlrVH6d048ubQRFV1wXracb/9KFGPDYJ2BbHoOb3aIRcMGuGsTwVVt5vIyVRoxuYdHPDK5Dqm/Ywn4yIw==; 24:g3l4wDI5gm6JEsy1sr/YZMmoBBeQcvA61X2jwgx6h28HxdAdMIcyNVJ/1V4nT0JU1MSC/NNvFOn4qAwQ24HvitE1ob5D1ajxoV7oCQ6I21o= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2015 16:46:01.8140 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR07MB1450 Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 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: Wed, 09 Dec 2015 16:46:05 -0000 W dniu 09.12.2015 o 17:38, Stephen Hemminger pisze: > On Wed, 9 Dec 2015 14:19:58 +0100 > Kamil Rytarowski wrote: > >> + /* Check if there is sysfs mounted */ >> + if (stat("/sys/module", &st) != 0) { >> + RTE_LOG(DEBUG, EAL, "sysfs is not mounted! error %i (%s)\n", >> + errno, strerror(errno)); >> return -1; >> } > This check is redundant. Remove it. > If the later "/sys/module/foo" would fail if /sys/module was not present. This check isn't redundant. It checks different thing (sysfs mounted vs module loaded) and formulates different error message. Please see pci_vfio_enable(): module_vfio_type1 = rte_eal_check_module("vfio_iommu_type1"); /* return error directly */ if (module_vfio_type1 == -1) { RTE_LOG(INFO, EAL, "Could not get loaded module details!\n"); return -1; } /* return 0 if VFIO modules not loaded */ if (module_vfio_type1 == 0) { RTE_LOG(INFO, EAL, "VFIO modules not all loaded, " "skip VFIO support...\n"); return 0; }