From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0068.outbound.protection.outlook.com [157.56.110.68]) by dpdk.org (Postfix) with ESMTP id D27CB5424 for ; Mon, 14 Mar 2016 13:16:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-caviumnetworks-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=BglO+0Xpz8Xl66J6CLbeY2MX+7GAsPgxiXQrQtxnKCw=; b=WON6oND+W8YhuPdR5GXqc8d4jg0EIBWeXcqb3ZZjeIQM+P8ZOWf4+VouHtGqKN+Hwa9ZdtA9hKQ1flewuRkKeUt7Wdae3pSYDm08seuprKKxkCzkNbd1zrUjgVb20x9Z85bwfqnE1ZKOIxRcr34wfoTHVfanF4gF22sUOtcRyjM= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.caveonetworks.com (122.167.196.86) by CY1PR0701MB1726.namprd07.prod.outlook.com (10.163.21.140) with Microsoft SMTP Server (TLS) id 15.1.427.16; Mon, 14 Mar 2016 12:16:23 +0000 From: Jerin Jacob To: CC: , Jerin Jacob Date: Mon, 14 Mar 2016 17:45:32 +0530 Message-ID: <1457957732-24066-3-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1457957732-24066-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1457957732-24066-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [122.167.196.86] X-ClientProxiedBy: BM1PR01CA0029.INDPRD01.PROD.OUTLOOK.COM (25.163.198.164) To CY1PR0701MB1726.namprd07.prod.outlook.com (25.163.21.140) X-MS-Office365-Filtering-Correlation-Id: 5c2d1b7c-267b-44dd-7e03-08d34c02763e X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 2:2H6mcH1g87E8w4p2XUbCjSR2Sdt+cT+7RnytY4d4thtg7sYW/7+VxSo+6nf2HoRNKHDaLmlVnE5nK95Ar0EnEZTycemLEEh0LnN1vharqJDveUeSR3XxLkIm0LmqDmJBBWHw76ZvNWCJyPN3LvFdo9wC77czpWO3Ebh1Q6geJMbgXfjck12zunkxzOJGX2YY; 3:8cQd/94eNOWlYCET13d06HNq9UE8Dl5G5/y8NMqyjABLGKAsoLQRhUCpnqRbtAetucjWb/RS09BmnQzn9I1Ys45v1Bv8olLJN4xNDbGuAI+g5ZEsnnwbGBGcT4YkZkHd; 25:xrvNt83cpiutc5Uo/WEuBMUFnEjqWsEJ6RljmTieVJhLCx3nOQBtCkFz1FnjSHzVKXT1+IlchkCnFha9463ScqMAHT3VVqhWyFl2dgqtvBOG5fb+0QWxHtnnCdSuye0oHv+tmgnwBAXuWtgIehURIDy1SCmP8rUzhEtG9OpNyshF/t5aI4FOV+wO6rj0RjqljQtaTzBEhuc/I6SFhMneKV7WFHHGRiXrUnIPoGfwvlOn7XhH0UgpEQFLP0BDZY6iwQZApuuYsmES0BaP4sCZcJRDjX8HQxTAzMkTHc/wSqTu/sOrJUJHRXamhGSh3Dm1cbC2PlEKfsU/ivfvJsSDNA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 20:T+cnecYvCdgHSMKcY7pEWtbVg5Ku7DW9/H7Lj45s+JwOinZWd33sdRKNyjbFVYCmXEaLBWaBLCe/CPewgIFEvawdP7lOFybhoCfC+bu6+w92xulwuvbAROLmFim+v9jpJOgaYEyT874Gn05/+OTuBqApTTlwcb6ZuLODLjxDcX6IFdDaFfXuK1bbLYKD3xTVhn+067sNb3JiakFBOmWNx/JYSpkaeI/piWVpupltbpucHxzPASSSUzY5PAPYYCNQDPDSC+cbnH9IuhyJW68Y3AGneQ+H22BN6/bhg5OzJY8iGY76wsDX0HwPBsOA6b9CPA1aUbAbzCjyOkAVqP1XPS6gHvr5pj/iAJ8wmaTh7xwnQP6FnNT81/KSQrfyoO4J7OrzIeHZTgMbuLjgzhBqRtLDP5+++tSnLMuIcy19nTCOYtxdRhEWEZW7ZBS2XYKMnR6QVjqD5eDA0RPMPilAweRcT5SQYzpVfIUYy/KG79FlfOVlvC66a8zEUVjRk8RkWfpTRasx6Hbmt8+DjxjxryaLZqrnndZXEcrz8iYLReXZgMXYfg53iLziHX3Z4BYPpp2ZoWNKRFxRXntbppUyeQIs0pVc3Tfj2rLag4IX5yE= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY1PR0701MB1726; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1726; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 4:p4/s7aPEZ5dMGd3joFyg7rVgWmMUKcIJERrtlFxF+MLaYLDrYCOYoKY98jrTBwxIJYWIN/lozhjzTKgisa7Ih28g8ADsOnGJCS/rqFfyWzeovD8YHM5VcP8BhG8jMms6Klys9e6mGqr8YEBrbzWIh2tleQmw3Rbg7SGsO7w7u6eYY6qiuLchKAuQcP1XCBd5BPIp4xEirN1/72R1qz6gnCDqg16XPROd25F4kflTd9voA2uATDAMJkBLdtRgDykLVjV8HZCJG4BF00+X/Ph/ih0BQdlP5o5hnu3aoF/hfqhzBzRDgRFpmAeBv+rxDNxd2ncORiCikGV9mazNI7D/Q/OnYnyGJdVI0tYK1Ag5e23TphwH5dB8z3pt8EYUehbN X-Forefront-PRVS: 0881A7A935 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(50226001)(86362001)(48376002)(66066001)(53416004)(76506005)(50986999)(36756003)(76176999)(5003940100001)(50466002)(42186005)(586003)(6116002)(33646002)(2351001)(107886002)(19580395003)(92566002)(110136002)(3846002)(229853001)(77096005)(2950100001)(4001430100002)(5004730100002)(2906002)(81166005)(4326007)(47776003)(1096002)(189998001)(5008740100001)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1726; H:localhost.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0701MB1726; 23:2bInO6W8V/TiIl3Bhbpb5O1n6old7fNRE5yrCy7?= =?us-ascii?Q?eT9cXNSFkdoU7abJt59MnYUjXGEnzjrPedBXKZ41hTvq+tV3SZOabooKVC3n?= =?us-ascii?Q?1svmDLfnHEOMmUvqK2wUKBTw8M+qLOafHPg+yweQFOAbctkrowy4ajTXavHy?= =?us-ascii?Q?3AGT+BdmWJfYG+UxxJnCx3ZPhn/FwZGD75gqzyhdLnOrzAi/D2dp36egQAUk?= =?us-ascii?Q?qycUhH9Zr540BUpMwdDf+qyq5LfVdWhcQ9VP0Js6P3lgCJvRxOtyPdLx+jGM?= =?us-ascii?Q?HvnWFZ1G2Db+cwwUbJsbDBgOgHluGLLoHXmR9Va1oTbvcu8LCz9w41SUWplX?= =?us-ascii?Q?eTJgGuJkiqu+WM/zrHsIWiUYCUjeWkGS2drRffsPmNwbZomACV05J414QXun?= =?us-ascii?Q?InPF0JYPBnTbF7kdUZvakEetgQzeKJbbOlgrVMdJTWgFpQCmT92N3dmelKpF?= =?us-ascii?Q?WFTny+BrdIYbTHI/2pYMtg/vo9RHdN+hqTwHixS+jcv1QylxYr3RlksU+N/8?= =?us-ascii?Q?uQddKYyG1FAU70K/o0ZZ7ckLJ4+wAgBHwY3ACIfj4pF7q1h164uKCP5g/h0N?= =?us-ascii?Q?AG9NqSgFTzUcKH/OySZEAODTEzAb3X9ZwLXiqwEID2Bnq3aenTs0rfBjkRRp?= =?us-ascii?Q?XpaAZd6KGDGkMwTy9vKP7cNHd7OzorgswOxeG7gDqCZjO8V1J+qli/WeHmhS?= =?us-ascii?Q?FfB5tQ9Y1bMfFHmXKzdzOCbT0zITcsFHPdAeCe5XzliGXx0yQj8aGwI1E+A5?= =?us-ascii?Q?R7+P5G6QN8SCQlwdTqUThAH/rdFm4xaMyoot/5PplolM+kIviXJu6e88Vjf8?= =?us-ascii?Q?wuF/3uLHpeA6uMXg6TiOTd7YObGsHlQpEeo/hqq+EWFyYAMqptrgKZS5FEHj?= =?us-ascii?Q?/MBj+tppmy8u/32YAO+oVi77K2ZhNYC8NtJAAdCdDdtyY0MmBGjSk/vHFIba?= =?us-ascii?Q?vxX9e53f8z5HFwXMJlCLlr3iV3MfBcWS0DIbpJXJDJZ+5PucD86gl8t35ema?= =?us-ascii?Q?i0MA=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1726; 5:R55hpP17icwmXkNRCdp7zyFvBcVGQqapFnlL8xxquvw4EjPZpGBVAj8uZddK2OkGCCtd3kureJR15xC1Pl/L4/7f3ESlNvHR9BewLW8IWBXAlwnEWC/d2OkypqEfgJ0NR8/3//fwD7iJZWXfFsTR2g==; 24:unZmWOURn/yUGMzG1vZ/PQoM5b2YFyBCwbEYdRFJXEcEMG6qL5wWwR8Vx8KpixjzN2WOKMA0UYrwcKspjvS5AGs8kFfJWiGkGNkTISOCD8s= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Mar 2016 12:16:23.1042 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1726 Subject: [dpdk-dev] [PATCH 2/2] tools/setup.sh: Support 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: Mon, 14 Mar 2016 12:16:26 -0000 probe the kernel module existence through /sys/module/ to make it work with both module and inbuilt kernel module Signed-off-by: Jerin Jacob --- tools/setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/setup.sh b/tools/setup.sh index b290b87..6097ab7 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -427,7 +427,7 @@ grep_meminfo() # show_nics() { - if /sbin/lsmod | grep -q -e igb_uio -e vfio_pci; then + if [ -d /sys/module/vfio_pci -o -d /sys/module/igb_uio ]; then ${RTE_SDK}/tools/dpdk_nic_bind.py --status else echo "# Please load the 'igb_uio' or 'vfio-pci' kernel module before " @@ -440,7 +440,7 @@ show_nics() # bind_nics_to_vfio() { - if /sbin/lsmod | grep -q vfio_pci ; then + if [ -d /sys/module/vfio_pci ]; then ${RTE_SDK}/tools/dpdk_nic_bind.py --status echo "" echo -n "Enter PCI address of device to bind to VFIO driver: " @@ -458,7 +458,7 @@ bind_nics_to_vfio() # bind_nics_to_igb_uio() { - if /sbin/lsmod | grep -q igb_uio ; then + if [ -d /sys/module/igb_uio ]; then ${RTE_SDK}/tools/dpdk_nic_bind.py --status echo "" echo -n "Enter PCI address of device to bind to IGB UIO driver: " -- 2.1.0