From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 302B1A0096 for ; Thu, 6 Jun 2019 20:33:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 006931B999; Thu, 6 Jun 2019 20:33:21 +0200 (CEST) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by dpdk.org (Postfix) with ESMTP id A3A2C1B958 for ; Thu, 6 Jun 2019 20:33:20 +0200 (CEST) Received: by mail-wr1-f50.google.com with SMTP id f9so3431096wre.12 for ; Thu, 06 Jun 2019 11:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to:cc; bh=UkMSCURLHub4wnScwQWC2C2eND2AWVUk8qNQ461UdwU=; b=R+o/MJKaDeV5ZBzBa3s/6KjBqmh0dFvrllpTmj+EhXSXNFLYe0zohsx3uNdTtYtaJE VTY0x6Jf+hqwsFK99K3UjKt/sRTW+ja5jqIcnqiBn/IwBYJ8suDsfPn6cK7p64ZvYzhl koZlhaSX+wi91TxcEW5QBjpdzwGcsI3jaDVjdKVTLoAmdsSfjmxbT9EByHKWyukkNr0x Ly4itm+Kyj4wq6jYZ7YWwLqe/kSKJlBIpDLAugNIKQn0nEPWtc5LK5a3tAEoWKV6SMtd XhNyM4pMUyq7kWYCD8cUeXM4veAFcYZwhAFqvmUYfbtXWt3tL4hdDssvZF99ffhVddSl jLfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=UkMSCURLHub4wnScwQWC2C2eND2AWVUk8qNQ461UdwU=; b=Of1KZ3hi+0mZskUzIJVaiU3bL1Jts0KaAA2tTDjFCJnkwkjyno5yX1TmcY/Wdnly2W ndmEoHOUKpY9a1KJk7YAlgxrYX89pHkDtPAchGEiX1+bCkRyYyIqlCYEtQujUjMp0Qtm hW6MRnAZMaaVqojzyRnSfoaDn0+DMgC/u15TPy3/Fr1DI6uuVvcnLStNNUjszq7khhy1 4razlzMLlqu/zN1OIFtH6s6YYrl5jTlgn7uRvo0525F58lrMsFz9v0Fn+2u1J6ZIDpvB qeZmLtSabGgfRTNgfx2rHa2ZlwkP80pxwi6U0tflJy8gWWE1k7RNBiPM29SSlk/KwZO2 S0mg== X-Gm-Message-State: APjAAAUwwjp0njX8q1lwPQa1SUgI5mNFHZpFbqqmGh+yOsq5iDou1Dz/ Yh5/FAd0UM+sZLzAnQpdm613tlN6o5U0u9Nl5uIOJwelW7BxLQ== X-Google-Smtp-Source: APXvYqzXci2r46gNIlG7c+4JQyNOLZAq4H3A2iYAzYUInhLyI7qtWNkrMqGJydLjmo7kHGY7ovgWZBPpjAmhtKyAdRw= X-Received: by 2002:adf:90c3:: with SMTP id i61mr15637001wri.48.1559845999955; Thu, 06 Jun 2019 11:33:19 -0700 (PDT) MIME-Version: 1.0 From: Igor Ryzhov Date: Thu, 6 Jun 2019 21:33:09 +0300 Message-ID: To: dev@dpdk.org Cc: Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-dev] Incorrect install_dir for Linux kernel modules X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi everyone, I faced an issue today with install directory for rte_kni and igb_uio. Modules are installed to '/usr/src/...' instead of '/lib/modules/...'. Right now install_dir for both modules is set to: install_dir: kernel_dir + '/../extra/dpdk' where 'kernel_dir' is set manually or automatically to: kernel_version = run_command('uname', '-r').stdout().strip() kernel_dir = '/lib/modules/' + kernel_version + '/build' I believe the intention of using '/../extra/dpdk' was to come back to '/lib/modules/kernel_version/' and install the modules there, but as '/lib/modules/kernel_version/build' is a symlink, we actually get into the '/usr/src/linux-headers-kernel-version' and install modules there. I see two possible solutions here: 1. Add new 'kernel_install_dir' option. If it is not set, set it automatically: kernel_version = run_command('uname', '-r').stdout().strip() kernel_install_dir = '/lib/modules/' + kernel_version and set install_dir to: install_dir: kernel_install_dir + '/extra/dpdk' 2. Replace 'kernel_dir' option with new option 'kernel_version', and do the following: if kernel_version == '' kernel_version = run_command('uname', '-r').stdout().strip() then set 'kernel_dir' and 'kernel_install_dir' accordingly: kernel_dir = '/lib/modules/' + kernel_version + '/build' kernel_install_dir = 'lib/modules/' + kernel_version and use it for building and installation: custom_target('rte_kni', ... command: ['make', '-j4', '-C', kernel_dir, ... install_dir: kernel_install_dir + '/extra/dpdk', ... I prefer the second one and already have a patch. Can send the patch if maintainers are good with the solution. Best regards, Igor