From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9BAA2A00BE; Tue, 14 Jun 2022 12:27:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 836B240DDD; Tue, 14 Jun 2022 12:27:57 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2052.outbound.protection.outlook.com [40.107.92.52]) by mails.dpdk.org (Postfix) with ESMTP id 77CC640C35 for ; Tue, 14 Jun 2022 12:27:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n3R1VrCjltXscspxGU+ja4TJW21bkyrs+dIDQaYysc2AO6+hFwsf5WIRrTq/kEAObdA7NxT70adce/N8jrzRXGkbQJiK3Pp6mS0jDdGMCaoi6aJFlfLo7MZDzoeiRyPEOWRuQY3RInM7rdYJcRUSvhb2IWS9zGRoZxcywNhJmHWG4U+b1Z8ZLeomUiBHU6FogHiPO1oqS6ysmt9UsSZst4fS+NwzG1wwoGWM1+BmWy1IDB+Qf0FoJY38j6LuPUn60rfJXyJszCV5sVwKtsELDC/skLXOMkqdk8dVsrGJO5qgB4NUZnptY89r7BTN8mSsEPX1WORFgClAOZduATbGFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oTMOKdXlkUr4SZ56D5JSS4v9gpgf3jqsuVKkEToXHMU=; b=GpaPxPNj64fsT9/fzNYv3SCGhRi3WygDYDOUmCok7X4iahFi/tu8tP//mz+zNS81jCFm6WyEykTa8JGNsc91pYeChceAxd+MrlelW57Lrn1hIlw2gzBL8MyXyeIn0APB3C9bjY66OdtlFerDikgi1iqtt+ZshtO2Ys4y0vAnZAL8lRa3xYBmBKecyXDM98Qak+q3g8Sj+W0QB3af254pGveYGNPqTb05J6hoA8tle9U3hQxrv2bOV64Bc13azZuTEnf/xf8JUdx2+ajUVMVi+40oMqAUG0xsWWRMDPiN8TlqrOV9EsHev2K0CwFPvN1q/mQrHCCQo/NaBL7j+s9R6w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=monjalon.net smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oTMOKdXlkUr4SZ56D5JSS4v9gpgf3jqsuVKkEToXHMU=; b=YavSXYvnR1M8s8pkNVY57YdAV/Cm1qeJw983BIlF6UPQK7KWmUYZg4EL+40lOJgvhiY1gWJ+GhP4ReGck5XCQSRKLwVbrS5oCnzfHe2WdNrAcsrJh0nDALRUUsGU6hXdlBTUCR2bGaTSvnst4dza8w+e5Huyi5yup1Db5fGhS00= Received: from DM6PR03CA0017.namprd03.prod.outlook.com (2603:10b6:5:40::30) by SJ0PR02MB7231.namprd02.prod.outlook.com (2603:10b6:a03:299::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.13; Tue, 14 Jun 2022 10:27:52 +0000 Received: from DM3NAM02FT057.eop-nam02.prod.protection.outlook.com (2603:10b6:5:40:cafe::93) by DM6PR03CA0017.outlook.office365.com (2603:10b6:5:40::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.16 via Frontend Transport; Tue, 14 Jun 2022 10:27:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by DM3NAM02FT057.mail.protection.outlook.com (10.13.5.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5332.12 via Frontend Transport; Tue, 14 Jun 2022 10:27:52 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Tue, 14 Jun 2022 11:27:51 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Tue, 14 Jun 2022 11:27:51 +0100 Envelope-to: thomas@monjalon.net, david.marchand@redhat.com, dev@dpdk.org, bruce.richardson@intel.com, stephen@networkplumber.org Received: from [10.71.119.224] (port=55944) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o13m2-0002A9-Md; Tue, 14 Jun 2022 11:27:51 +0100 Message-ID: <0bef1412-9292-57c4-b0c7-4f556586bc76@xilinx.com> Date: Tue, 14 Jun 2022 11:27:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [kmods PATCH] linux/igb_uio: allow modules install Content-Language: en-US From: Ferruh Yigit To: Thomas Monjalon , David Marchand CC: , Bruce Richardson , Stephen Hemminger References: <20220412131453.3927-1-bruce.richardson@intel.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3739877f-e2d5-4ffc-66b7-08da4df089b5 X-MS-TrafficTypeDiagnostic: SJ0PR02MB7231:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LUNolx3/7CSN4PVa8ueB20PAjn1p3CY5ZpNQaA/7AMz+CaeAbrUHUp4Z6ZjVx13XHYudE1srPQ2WjRc3FKOG/TP/DeZuHC+mj56E27iwciX6bEi7OEx0npLPm1PHucPjhl4V0nBKmXODM5tbAzdJc9byBAFPza0Oq1FqGWXhXCa242uke7vmPYeUeotTnbfifFA0lh8XLVKLqAmFs0GnZmCqSD8BrIu85THD081Nwo7P+Wjq0EJRvBVzOAwgsm+fKMBAu7gk7T+XTpSFVsDCYrKNemWnS69RL1XFMpNKCzKV4EPk0/oraQZYXYbg4SLPQMgIAnzJh3MLMbY2l5BFlD5HXZMO0GcoYPImTg61oqR3kfRa+g0Q5g1xBes8+nKPojG2pgs8p7Ao6oC7tO/8Yv1HaBq9fOpfmpQhhb93yGHkrfd68O4pzBpaptg8s6CgATZYTnC5gQJAqswB4eAsJ1sblKL3CrPN5hNzzXd+F4JRG+Gb/d0Wwjlcf6PqEpAfSsRCGtnIXgPda3BJmwGUVbWLpkZIXouTo8Aqyz1ReLopGL7nqV7MXausda+ziyZYwJ+T0J2z3zGWvy72UzyhIvYmzRLIoiGFBPqnyr6CMV+lVBaQtwMruozVEplzFLlzTm2F/iyfIXgzCT19ZrOOzGOs4Fxxt4j041kIr8sqZvXMV6saWeFcoEjhXGuRRSml4L4BgBzmWglkEALhCzMEgUyLd+Rj2i2dZWUXvWAeeMk= X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(46966006)(36840700001)(40470700004)(82310400005)(2906002)(26005)(356005)(53546011)(7636003)(54906003)(186003)(2616005)(426003)(336012)(83380400001)(47076005)(4326008)(316002)(36860700001)(8676002)(5660300002)(31696002)(70586007)(36756003)(9786002)(508600001)(110136005)(8936002)(40460700003)(44832011)(31686004)(70206006)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2022 10:27:52.2172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3739877f-e2d5-4ffc-66b7-08da4df089b5 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: DM3NAM02FT057.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR02MB7231 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 6/14/2022 11:25 AM, Ferruh Yigit wrote: > On 4/12/2022 2:14 PM, Bruce Richardson wrote: >> CAUTION: This message has originated from an External Source. Please >> use proper judgment and caution when opening attachments, clicking >> links, or responding to this email. >> >> >> For those still using the "igb_uio" kernel module, there may be >> occasions where the module is installed in /lib/modules/$VERSION folder >> rather than being insmod'ed from the build directory. To support this, a >> number of changes are needed to the makefile: >> >> * Change the "clean" command to a generic wildcard target where that >>    target is just passed through to the top-level kernel makefile. This >>    should allow all standard kernel module targets, including "clean" and >>    "modules_install" to work. > > ack > >> * To install in /lib/modules, root permissions are needed, so it is >>    likely that users may try installing the module using "sudo". However, >>    under sudo there is often no $PWD environment variable, breaking the >>    build. This can be fixed by changing the environment variable $PWD to >>    the make built-in variable "CURDIR"[1]. > > It can be possible to use shell PWD: > > "make -C $(KSRC)/ M=$$PWD" > > or > > " > PWD := $(shell pwd) > > all: >     make -C $(KSRC)/ M=$(PWD) > " > > But '$(CURDIR)' also seems doing the job, so lgtm. > >> * As a cleanup, the actual kernel module path is got directly by make >>    from the shell, rather than relying on the shell substitution later >>    when making the recursive make call. This improves things slightly for >>    the user as the full recursive command is visible, with the kernel >>    version appearing in place of `uname -r` in the output. >> > > ack > >> [1] While neither PWD nor CURDIR will work correctly in the case where >> one is building outside of the sources directory, this is an edge case, >> and a simple replacement of PWD by CURDIR keeps things simple while >> adding support for "sudo". >> >> Signed-off-by: Bruce Richardson > > Acked-by: Ferruh Yigit > >> --- >>   linux/igb_uio/Makefile | 8 ++++---- >>   1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/linux/igb_uio/Makefile b/linux/igb_uio/Makefile >> index 09ae5d9..bd2e356 100644 >> --- a/linux/igb_uio/Makefile >> +++ b/linux/igb_uio/Makefile >> @@ -1,7 +1,7 @@ >> -KSRC ?= /lib/modules/`uname -r`/build >> +KSRC ?= /lib/modules/$(shell uname -r)/build >> >>   all: >> -       make -C $(KSRC)/ M=$(PWD) >> +       make -C $(KSRC)/ M=$(CURDIR) >> >> -clean: >> -       make -C $(KSRC)/ M=$(PWD) clean >> +%: >> +       make -C $(KSRC)/ M=$(CURDIR) $@ >> -- >> 2.32.0 >> > Btw, igb_uio doesn't compile with '5.19.0-rc2', 'pci_set_dma_mask()' & 'pci_set_consistent_dma_mask()' APIs are no more exist. 'igb_uio' needs to be updated.