From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) by dpdk.org (Postfix) with ESMTP id 80967C3C6 for ; Fri, 10 Jul 2015 22:44:23 +0200 (CEST) Received: by padck2 with SMTP id ck2so9055994pad.0 for ; Fri, 10 Jul 2015 13:44:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=Vqr7GwCODKY/pzCEIaburZNlBbQpC9aR3Ne3Th74PUs=; b=izy+LgM/NFNGsdpY4gMvhjd9uxvxJfKHCDN4K8gcgZG+0Zjz05QtvNTLdSeqcn71XT pDPLPyICIC5hOQH75kwTSKWAc1d1+E7bbiFHuTTCI19r4vBD9HO3WQUMg3L85w0Y+vvk +K7TIge4TkJGyNl8NS6BqNuuSjj4u4nE80bFFywBcj72NGm0e5924+vUoa29ylRdc7t6 UM9fZ3cMnpcqGVJwWqWtM1i9A9n9sgXnzpv+caqJtkL4Z1gUdhquuH1V4qT+3eCiHrNb sAl7+qa4gCjxuC6D/SybO/RzsbCMQIya2dxSCIu4cMoI+vlYbqED8NJEAfpl1bx1d+vA liVg== X-Gm-Message-State: ALoCoQlVJRe+VE8Oi/3gmnt5fzi3KlQQUFABfGSlYsACr8oEZ5oFMgbh1fSeZJyLVtI1+XfhCvRC X-Received: by 10.68.217.2 with SMTP id ou2mr45691304pbc.71.1436561062799; Fri, 10 Jul 2015 13:44:22 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id a7sm10196338pbu.0.2015.07.10.13.44.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 13:44:22 -0700 (PDT) Date: Fri, 10 Jul 2015 13:44:31 -0700 From: Stephen Hemminger To: Thomas Monjalon Message-ID: <20150710134431.3456762d@urahara> In-Reply-To: <6809322.q4mZEddvC3@xps13> References: <1436484387-29273-1-git-send-email-stephen@networkplumber.org> <2141795.rDVNFltQvv@xps13> <20150710102914.3db19e8a@urahara> <6809322.q4mZEddvC3@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, Stephen Hemminger Subject: Re: [dpdk-dev] [PATCH v2 1/2] vfio: fix build if build envrionment is on old kernel 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: Fri, 10 Jul 2015 20:44:24 -0000 On Fri, 10 Jul 2015 22:19:58 +0200 Thomas Monjalon wrote: > 2015-07-10 10:29, Stephen Hemminger: > > On Fri, 10 Jul 2015 01:43:17 +0200 > > Thomas Monjalon wrote: > > > > > 2015-07-09 16:26, Stephen Hemminger: > > > > From: Stephen Hemminger > > > > > > > > The build of DPDK may be done on a system where Linux headers > > > > in /usr/include (and therefore kernel version macro) are much > > > > older than the target runtime system. > > > > > > It seems strange wanting to build a feature not present in the kernel > > > headers. Why not upgrading the build system kernel? > > > > The build machine is running Debian with stock headers and kernel. > > I can see many people having build environments controlled by other > > parts of organization where you are not allowed to update packages. > > > > > > In order to work around this, one solution is to put in simplified > > > > kernel header (this is what the compat stuff is already doing). > > > > > > The other solution (as already suggested by Anatoly) is to have a configure > > > script (not an autotool one). It would make clear that VFIO support is not > > > built. > > > Ref: http://dpdk.org/ml/archives/dev/2015-April/016772.html > > > > That won't solve the issue. > > That allows to see the error earlier and more clearly. > > > The other possiblities are: > > 1. Fail the build if VFIO is configured but headers files are missing. > > This is better than surprising user at runtime. > > 2. Don't use /usr/include/linux as path as expected path of kernel headers > > instead use build path (this is what modules do). > > The latter one seems to be the right one. There is a name for that technique: > cross-compilation. If you want to build DPDK to run on another system with > different kernel and libraries, you should adapt the toolchain and libraries > headers. And guess what? include/linux/ is part of this toolchain. > Problem solved. The toolchain Just-works for build igb_uio, kni, etc. Why doesn't it work for VFIO. I would view that as a of the mk scripts.