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 19D10A0495 for ; Mon, 10 Jun 2019 10:32:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D58221BF93; Mon, 10 Jun 2019 10:32:22 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by dpdk.org (Postfix) with ESMTP id 315D01BF92 for ; Mon, 10 Jun 2019 10:32:22 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id d18so8223080wrs.5 for ; Mon, 10 Jun 2019 01:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nfware-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Qi+/27JkOY7qsEWekLTGWO2R9kLrZ/KahlCMSsu+vRU=; b=D9GTpoBa91P+awZp+cnoptp/bP8Y9mgXAaKynKHwLA9EF2Ka5BF6eqrGr2Ai7IjcLG VIhKDv+k8zbdRRMwuBGuPNY1uTuTs9Om9e7N2dFI2bhuGBY2rUKi8RvnBMlGgqVypKD9 bqatus2RJZukgAzzrjWU6gN2baCw+mYXvGxAndYh6m4K485P/yq7gmeMq6r4z5kSfaFS 5z5pgeN861i6QkJcrzrF97W5LmCfc9WWPpOJQ+T0aOkiiBEQ4zgOkHbYEG3MWjFgT96V eWhGhe8va1pTETZWJX3fXAMhlIGWNmGKf6eE6PkoeDsoADX97FWrSbsZFKq+fU0S+wzC QzHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Qi+/27JkOY7qsEWekLTGWO2R9kLrZ/KahlCMSsu+vRU=; b=hPtoRq2e+B7txVpr/Q09UjK/Waz2WG7/PZ8Y1rp8us3KJ+6U4fIDTI2OfkmXMRA+7A 29/ZF/1XPsu4uDTmZIld+csYnY1byjAtOt5ZhGrAJhbmTZHI1J/4824CmeyzAD0wID/G QI6T0MR3hSU9eR1yagoh8tyLyqbDx9H8o0Dbw7oxik0BcMUpsdRsO2UspkoUh/bdlRFh AgYxDfm5+kUbX/bYAUTWOqUCmTswhcaSv3juK97RXVqZUk25B6hXMZqefeMedd9MFIqe qY1T8jIqQ3PAWPLEkbgf792Q+XhjyoyLQvHh8qjcLzrfsmeWSo+RSUqkwSDAdibgaKNZ pUNw== X-Gm-Message-State: APjAAAXUJl49GkKLLAof8k95nXQM+n/kDHtjocg62YREZ04sTwXbHpOu vxwPpVqXfACJcR1NpBBaSOHQ3EDBO0RDYuGZwI+WgA== X-Google-Smtp-Source: APXvYqy/ZsT5dH+9s4dGegsUkqRmdSUy13L5JMl2DTVGBeT0wRy77GBRfGpYTh/e0jF/QMmNqCGsp40aas/eAvsx56c= X-Received: by 2002:adf:9d81:: with SMTP id p1mr30960156wre.294.1560155541827; Mon, 10 Jun 2019 01:32:21 -0700 (PDT) MIME-Version: 1.0 References: <20190607092900.GA1600@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20190607092900.GA1600@bricha3-MOBL.ger.corp.intel.com> From: Igor Ryzhov Date: Mon, 10 Jun 2019 11:32:11 +0300 Message-ID: To: Bruce Richardson Cc: dev@dpdk.org, Ferruh Yigit Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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" Done =E2=80=93 http://patches.dpdk.org/patch/54619/ On Fri, Jun 7, 2019 at 12:29 PM Bruce Richardson wrote: > On Thu, Jun 06, 2019 at 09:33:09PM +0300, Igor Ryzhov wrote: > > 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 =3D run_command('uname', '-r').stdout().strip() > > kernel_dir =3D '/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 =3D run_command('uname', '-r').stdout().strip() > > kernel_install_dir =3D '/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 =3D=3D '' > > > > kernel_version =3D run_command('uname', '-r').stdout().strip() > > > > > > then set 'kernel_dir' and 'kernel_install_dir' accordingly: > > > > kernel_dir =3D '/lib/modules/' + kernel_version + '/build' > > > > kernel_install_dir =3D '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. > > > Thanks for highlighting this, and I agree with option 2 as a good solutio= n. > Please send out the patch. > > /Bruce >